diff --git a/core/lib/dal/src/eth_sender_dal.rs b/core/lib/dal/src/eth_sender_dal.rs index c76547422d8f..2266d6fb60f9 100644 --- a/core/lib/dal/src/eth_sender_dal.rs +++ b/core/lib/dal/src/eth_sender_dal.rs @@ -413,8 +413,8 @@ impl EthSenderDal<'_, '_> { WHERE id = $2 "#, - eth_tx_id as i32, chain_id as i64, + eth_tx_id as i32, ) .execute(self.storage.conn()) .await?; diff --git a/core/node/eth_sender/src/eth_tx_aggregator.rs b/core/node/eth_sender/src/eth_tx_aggregator.rs index 7d6a6b234742..7f304e2f72b7 100644 --- a/core/node/eth_sender/src/eth_tx_aggregator.rs +++ b/core/node/eth_sender/src/eth_tx_aggregator.rs @@ -383,8 +383,14 @@ impl EthTxAggregator { ); return Ok(()); } + let is_gateway = self.settlement_mode.is_gateway(); let tx = self - .save_eth_tx(storage, &agg_op, contracts_are_pre_shared_bridge, false) + .save_eth_tx( + storage, + &agg_op, + contracts_are_pre_shared_bridge, + is_gateway, + ) .await?; Self::report_eth_tx_saving(storage, &agg_op, &tx).await; } @@ -556,9 +562,9 @@ impl EthTxAggregator { // We may be using a custom sender for commit transactions, so use this // var whatever it actually is: a `None` for single-addr operator or `Some` // for multi-addr operator in 4844 mode. - let sender_addr = match op_type { - AggregatedActionType::Commit => self.custom_commit_sender_addr, - _ => None, + let sender_addr = match (op_type, is_gateway) { + (AggregatedActionType::Commit, false) => self.custom_commit_sender_addr, + (_, _) => None, }; let nonce = self.get_next_nonce(&mut transaction, sender_addr).await?; let encoded_aggregated_op = diff --git a/core/node/eth_sender/src/eth_tx_manager.rs b/core/node/eth_sender/src/eth_tx_manager.rs index a97aed88a0a5..0d78ab71c62d 100644 --- a/core/node/eth_sender/src/eth_tx_manager.rs +++ b/core/node/eth_sender/src/eth_tx_manager.rs @@ -49,13 +49,18 @@ impl EthTxManager { gas_adjuster, max_acceptable_priority_fee_in_gwei: config.max_acceptable_priority_fee_in_gwei, }; + let l1_interface = Box::new(RealL1Interface { + ethereum_gateway, + ethereum_gateway_blobs, + l2_gateway, + wait_confirmations: config.wait_confirmations, + }); + tracing::info!( + "Started eth_tx_manager supporting {:?} operators", + l1_interface.supported_operator_types() + ); Self { - l1_interface: Box::new(RealL1Interface { - ethereum_gateway, - ethereum_gateway_blobs, - l2_gateway, - wait_confirmations: config.wait_confirmations, - }), + l1_interface, config, fees_oracle: Box::new(fees_oracle), pool, @@ -257,10 +262,10 @@ impl EthTxManager { } pub(crate) fn operator_address(&self, operator_type: OperatorType) -> Option
{ - if operator_type == OperatorType::NonBlob { - None - } else { + if operator_type == OperatorType::Blob { self.l1_interface.get_blobs_operator_account() + } else { + None } } // Monitors the in-flight transactions, marks mined ones as confirmed, @@ -519,9 +524,10 @@ impl EthTxManager { tracing::info!("Stop signal received, eth_tx_manager is shutting down"); break; } + let operator_to_track = self.l1_interface.supported_operator_types()[0]; let l1_block_numbers = self .l1_interface - .get_l1_block_numbers(OperatorType::Blob) + .get_l1_block_numbers(operator_to_track) .await?; METRICS.track_block_numbers(&l1_block_numbers); @@ -643,7 +649,7 @@ impl EthTxManager { .get_l1_block_numbers(operator_type) .await .unwrap(); - tracing::info!( + tracing::debug!( "Loop iteration at block {} for {operator_type:?} operator", l1_block_numbers.latest ); diff --git a/core/node/fee_model/src/l1_gas_price/gas_adjuster/mod.rs b/core/node/fee_model/src/l1_gas_price/gas_adjuster/mod.rs index 4ed9cf1330ea..e6842b92fdba 100644 --- a/core/node/fee_model/src/l1_gas_price/gas_adjuster/mod.rs +++ b/core/node/fee_model/src/l1_gas_price/gas_adjuster/mod.rs @@ -86,7 +86,7 @@ impl GasAdjuster { anyhow::ensure!( matches!(pubdata_sending_mode, PubdataSendingMode::RelayedL2Calldata), - "Only relayed L2 calldata is available for L2 mode" + "Only relayed L2 calldata is available for L2 mode, got: {pubdata_sending_mode:?}" ); } else { anyhow::ensure!(!client.gateway_mode, "Must be L1 client in L1 mode"); diff --git a/core/node/node_framework/src/implementations/layers/eth_sender/aggregator.rs b/core/node/node_framework/src/implementations/layers/eth_sender/aggregator.rs index cfe701326bd6..310580aeb3a3 100644 --- a/core/node/node_framework/src/implementations/layers/eth_sender/aggregator.rs +++ b/core/node/node_framework/src/implementations/layers/eth_sender/aggregator.rs @@ -8,10 +8,7 @@ use zksync_types::{commitment::L1BatchCommitmentMode, settlement::SettlementMode use crate::{ implementations::resources::{ circuit_breakers::CircuitBreakersResource, - eth_interface::{ - BoundEthInterfaceForBlobsResource, BoundEthInterfaceForL2Resource, - BoundEthInterfaceResource, - }, + eth_interface::{BoundEthInterfaceForBlobsResource, BoundEthInterfaceResource}, object_store::ObjectStoreResource, pools::{MasterPool, PoolResource, ReplicaPool}, }, @@ -55,7 +52,6 @@ pub struct Input { pub replica_pool: PoolResource