Skip to content

Commit

Permalink
Set timestamp asserter
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed Mar 4, 2025
1 parent 6d754e2 commit 1d898b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions core/bin/external_node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use zksync_core_leftovers::temp_config_store::read_yaml_repr;
use zksync_dal::{ConnectionPool, Core};
use zksync_metadata_calculator::MetadataCalculatorRecoveryConfig;
use zksync_node_api_server::{
tx_sender::TxSenderConfig,
tx_sender::{TimestampAsserterParams, TxSenderConfig},
web3::{state::InternalApiConfigBuilder, Namespace},
};
use zksync_protobuf_config::proto;
Expand Down Expand Up @@ -1523,7 +1523,14 @@ impl From<&ExternalNodeConfig> for TxSenderConfig {
chain_id: config.required.l2_chain_id,
// Does not matter for EN.
whitelisted_tokens_for_aa: Default::default(),
timestamp_asserter_params: None,
timestamp_asserter_params: config.remote.l2_timestamp_asserter_addr.map(|addr| {
TimestampAsserterParams {
address: addr,
min_time_till_end: Duration::from_secs(
config.optional.timestamp_asserter_min_time_till_end_sec as u64,
),
}
}),
}
}
}
4 changes: 2 additions & 2 deletions core/node/api_server/src/web3/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl InternalApiConfigBuilder {
.current_contracts()
.l2_contracts
.shared_bridge_addr,
// Seems weth is not available
// WETH bridge is not available
l1_weth_bridge: None,
l2_weth_bridge: None,
l2_legacy_shared_bridge: contracts_config
Expand Down Expand Up @@ -302,7 +302,7 @@ impl InternalApiConfig {
.current_contracts()
.l2_contracts
.shared_bridge_addr,
// Seems weth is not available
// WETH bridge is not available
l1_weth_bridge: None,
l2_weth_bridge: None,
l2_legacy_shared_bridge: contracts_config
Expand Down

0 comments on commit 1d898b0

Please sign in to comment.