Skip to content

Commit

Permalink
Merge branch 'main' into spike/noble-usdc
Browse files Browse the repository at this point in the history
* main:
  feat(sequencer)!: enforce block ordering by transaction group  (#1618)
  fix(cli): ensure checkTx passes before waiting for inclusion (#1636)
  chore(sequencer)!: update storage keys locations and values (ENG-898) (#1616)
  chore: cargo audit warning (#1644)
  chore(proto, core)!: remove action suffix from all action types (#1630)
  feat(sequencer)!: add limit to total amount of transactions in parked  (#1638)
  • Loading branch information
steezeburger committed Oct 11, 2024
2 parents 3cfd1a4 + 412eebe commit 6d14c99
Show file tree
Hide file tree
Showing 157 changed files with 6,805 additions and 2,277 deletions.
29 changes: 15 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.23.1
version: 0.23.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
1 change: 1 addition & 0 deletions charts/sequencer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ data:
OTEL_SERVICE_NAME: "{{ tpl .Values.sequencer.otel.serviceName . }}"
{{- if not .Values.global.dev }}
{{- else }}
ASTRIA_SEQUENCER_MEMPOOL_PARKED_MAX_TX_COUNT: "{{ .Values.sequencer.mempool.parked.maxTxCount }}"
{{- end }}
---
3 changes: 3 additions & 0 deletions charts/sequencer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ genesis:
# pubKey: lV57+rGs2vac7mvkGHP1oBFGHPJM3a+WoAzeFDCJDNU=

sequencer:
mempool:
parked:
maxTxCount: 200
metrics:
enabled: false
otel:
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-bridge-contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ where
let to = parse_destination_chain_as_address(&event)
.map_err(GetWithdrawalActionsError::destination_chain_as_address)?;

let action = astria_core::protocol::transaction::v1alpha1::action::BridgeUnlockAction {
let action = astria_core::protocol::transaction::v1alpha1::action::BridgeUnlock {
to,
amount,
rollup_block_number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use astria_core::{
memos::v1alpha1::Ics20WithdrawalFromRollup,
transaction::v1alpha1::{
action::{
BridgeUnlockAction,
BridgeUnlock,
Ics20Withdrawal,
},
Action,
Expand Down Expand Up @@ -435,7 +435,7 @@ pub fn make_native_bridge_unlock_action(receipt: &TransactionReceipt) -> Action
let rollup_transaction_hash = receipt.transaction_hash.encode_hex();
let event_index = receipt.logs[0].log_index.unwrap().encode_hex();

let inner = BridgeUnlockAction {
let inner = BridgeUnlock {
to: default_sequencer_address(),
amount: 1_000_000u128,
rollup_block_number: receipt.block_number.unwrap().as_u64(),
Expand Down Expand Up @@ -485,7 +485,7 @@ pub fn make_erc20_bridge_unlock_action(receipt: &TransactionReceipt) -> Action {
// use the second event because the erc20 transfer also emits an event
let event_index = receipt.logs[1].log_index.unwrap().encode_hex();

let inner = BridgeUnlockAction {
let inner = BridgeUnlock {
to: default_sequencer_address(),
amount: 1_000_000u128,
rollup_block_number: receipt.block_number.unwrap().as_u64(),
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/sequencer/bridge_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use astria_core::{
Address,
},
protocol::transaction::v1alpha1::{
action::BridgeLockAction,
action::BridgeLock,
Action,
},
};
Expand Down Expand Up @@ -62,7 +62,7 @@ impl Command {
self.sequencer_chain_id.clone(),
&self.prefix,
self.private_key.as_str(),
Action::BridgeLock(BridgeLockAction {
Action::BridgeLock(BridgeLock {
to: self.to_address,
asset: self.asset.clone(),
amount: self.amount,
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/sequencer/init_bridge_account.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use astria_core::{
primitive::v1::asset,
protocol::transaction::v1alpha1::{
action::InitBridgeAccountAction,
action::InitBridgeAccount,
Action,
},
};
Expand Down Expand Up @@ -57,7 +57,7 @@ impl Command {
self.sequencer_chain_id.clone(),
&self.prefix,
self.private_key.as_str(),
Action::InitBridgeAccount(InitBridgeAccountAction {
Action::InitBridgeAccount(InitBridgeAccount {
rollup_id,
asset: self.asset.clone(),
fee_asset: self.fee_asset.clone(),
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-cli/src/sequencer/sudo/fee_asset.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use astria_core::{
primitive::v1::asset,
protocol::transaction::v1alpha1::{
action::FeeAssetChangeAction,
action::FeeAssetChange,
Action,
},
};
Expand Down Expand Up @@ -50,7 +50,7 @@ impl Add {
args.sequencer_chain_id.clone(),
&args.prefix,
args.private_key.as_str(),
Action::FeeAssetChange(FeeAssetChangeAction::Addition(args.asset.clone())),
Action::FeeAssetChange(FeeAssetChange::Addition(args.asset.clone())),
)
.await
.wrap_err("failed to submit FeeAssetChangeAction::Addition transaction")?;
Expand All @@ -75,7 +75,7 @@ impl Remove {
args.sequencer_chain_id.clone(),
&args.prefix,
args.private_key.as_str(),
Action::FeeAssetChange(FeeAssetChangeAction::Removal(args.asset.clone())),
Action::FeeAssetChange(FeeAssetChange::Removal(args.asset.clone())),
)
.await
.wrap_err("failed to submit FeeAssetChangeAction::Removal transaction")?;
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use astria_core::{
primitive::v1::Address,
protocol::transaction::v1alpha1::{
action::IbcRelayerChangeAction,
action::IbcRelayerChange,
Action,
},
};
Expand Down Expand Up @@ -47,7 +47,7 @@ impl Add {
args.sequencer_chain_id.clone(),
&args.prefix,
args.private_key.as_str(),
Action::IbcRelayerChange(IbcRelayerChangeAction::Addition(args.address)),
Action::IbcRelayerChange(IbcRelayerChange::Addition(args.address)),
)
.await
.wrap_err("failed to submit IbcRelayerChangeAction::Addition transaction")?;
Expand All @@ -72,7 +72,7 @@ impl Remove {
args.sequencer_chain_id.clone(),
&args.prefix,
args.private_key.as_str(),
Action::IbcRelayerChange(IbcRelayerChangeAction::Removal(args.address)),
Action::IbcRelayerChange(IbcRelayerChange::Removal(args.address)),
)
.await
.wrap_err("failed to submit IbcRelayerChangeAction::Removal transaction")?;
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use astria_core::{
primitive::v1::Address,
protocol::transaction::v1alpha1::{
action::SudoAddressChangeAction,
action::SudoAddressChange,
Action,
},
};
Expand Down Expand Up @@ -49,7 +49,7 @@ impl Command {
self.sequencer_chain_id.clone(),
&self.prefix,
self.private_key.as_str(),
Action::SudoAddressChange(SudoAddressChangeAction {
Action::SudoAddressChange(SudoAddressChange {
new_address: self.address,
}),
)
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/sequencer/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use astria_core::{
Address,
},
protocol::transaction::v1alpha1::{
action::TransferAction,
action::Transfer,
Action,
},
};
Expand Down Expand Up @@ -61,7 +61,7 @@ impl Command {
self.sequencer_chain_id.clone(),
&self.prefix,
self.private_key.as_str(),
Action::Transfer(TransferAction {
Action::Transfer(Transfer {
to: self.to_address,
amount: self.amount,
asset: self.asset.clone(),
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ pub(crate) async fn submit_transaction(
.await
.wrap_err("failed to submit transaction")?;

let tx_response = sequencer_client.wait_for_tx_inclusion(res.hash).await;

ensure!(res.code.is_ok(), "failed to check tx: {}", res.log);

let tx_response = sequencer_client.wait_for_tx_inclusion(res.hash).await;

ensure!(
tx_response.tx_result.code.is_ok(),
"failed to execute tx: {}",
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-composer/src/collectors/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use astria_core::{
asset,
RollupId,
},
protocol::transaction::v1alpha1::action::SequenceAction,
protocol::transaction::v1alpha1::action::Sequence,
};
use astria_eyre::eyre::{
self,
Expand Down Expand Up @@ -194,7 +194,7 @@ impl Geth {
if let Some(tx) = tx_res {
let tx_hash = tx.hash;
let data = tx.rlp().to_vec();
let seq_action = SequenceAction {
let seq_action = Sequence {
rollup_id,
data: data.into(),
fee_asset: fee_asset.clone(),
Expand Down Expand Up @@ -234,7 +234,7 @@ impl Geth {
#[instrument(skip_all)]
async fn forward_geth_tx(
executor_handle: &Handle,
seq_action: SequenceAction,
seq_action: Sequence,
tx_hash: ethers::types::H256,
txs_dropped_counter: &Counter,
) -> eyre::Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-composer/src/collectors/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use astria_core::{
asset,
RollupId,
},
protocol::transaction::v1alpha1::action::SequenceAction,
protocol::transaction::v1alpha1::action::Sequence,
};
use tokio::sync::mpsc::error::SendTimeoutError;
use tonic::{
Expand Down Expand Up @@ -62,7 +62,7 @@ impl GrpcCollectorService for Grpc {
return Err(Status::invalid_argument("invalid rollup id"));
};

let sequence_action = SequenceAction {
let sequence_action = Sequence {
rollup_id,
data: submit_rollup_tx_request.data,
fee_asset: self.fee_asset.clone(),
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-composer/src/executor/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
use astria_core::{
crypto::SigningKey,
primitive::v1::Address,
protocol::transaction::v1alpha1::action::SequenceAction,
protocol::transaction::v1alpha1::action::Sequence,
};
use astria_eyre::eyre::{
self,
Expand Down Expand Up @@ -63,7 +63,7 @@ impl Builder {
.wrap_err("failed constructing a sequencer address from private key")?;

let (serialized_rollup_transaction_tx, serialized_rollup_transaction_rx) =
tokio::sync::mpsc::channel::<SequenceAction>(256);
tokio::sync::mpsc::channel::<Sequence>(256);

Ok((
super::Executor {
Expand Down
Loading

0 comments on commit 6d14c99

Please sign in to comment.