diff --git a/crates/primitives/src/node/config.rs b/crates/primitives/src/node/config.rs index 69dfab40..92a8bf69 100644 --- a/crates/primitives/src/node/config.rs +++ b/crates/primitives/src/node/config.rs @@ -53,10 +53,10 @@ pub const DEV_SYSTEM_CONTRACT_ADDRESS: Address = address!("000000000000000000000000000000000003dead"); /// The L1 start block for Mainnet. -pub const MAINNET_L1_START_BLOCK_NUMBER: u64 = 18318215; +pub const MAINNET_L1_START_BLOCK_NUMBER: u64 = 18306000; /// The L1 start block for Sepolia. -pub const SEPOLIA_L1_START_BLOCK_NUMBER: u64 = 4041343; +pub const SEPOLIA_L1_START_BLOCK_NUMBER: u64 = 4038000; /// The L1 start block for Devnet. pub const DEV_L1_START_BLOCK_NUMBER: u64 = 0; diff --git a/crates/watcher/src/lib.rs b/crates/watcher/src/lib.rs index 9471d738..85b38e0b 100644 --- a/crates/watcher/src/lib.rs +++ b/crates/watcher/src/lib.rs @@ -429,13 +429,14 @@ where /// Handles the batch commits events. #[tracing::instrument(skip_all)] async fn handle_batch_commits(&self, logs: &[Log]) -> L1WatcherResult> { - // filter commit logs. + // filter commit logs and skip genesis batch (batch_index == 0). let mut commit_logs_with_tx = logs .iter() .map(|l| (l, l.transaction_hash)) .filter_map(|(log, tx_hash)| { let tx_hash = tx_hash?; try_decode_log::(&log.inner) + .filter(|decoded| !decoded.data.batch_index.is_zero()) .map(|decoded| (log, decoded.data, tx_hash)) }) .collect::>(); @@ -509,11 +510,13 @@ where &self, logs: &[Log], ) -> L1WatcherResult> { - // filter finalize logs. + // filter finalize logs and skip genesis batch (batch_index == 0). logs.iter() .map(|l| (l, l.block_number)) .filter_map(|(log, bn)| { - try_decode_log::(&log.inner).map(|decoded| (decoded.data, bn)) + try_decode_log::(&log.inner) + .filter(|decoded| !decoded.data.batch_index.is_zero()) + .map(|decoded| (decoded.data, bn)) }) .map(|(decoded_log, maybe_block_number)| { // fetch the finalize transaction.