From 7266433d5192e57ad1068231b46bf9c4f2f93692 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 9 Apr 2026 18:07:04 +0200 Subject: [PATCH] debug --- indexer/core/src/lib.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/indexer/core/src/lib.rs b/indexer/core/src/lib.rs index e68e97c0..4de92e51 100644 --- a/indexer/core/src/lib.rs +++ b/indexer/core/src/lib.rs @@ -143,7 +143,22 @@ impl IndexerCore { info!("Parsed {} L2 blocks with ids {:?}", l2_block_vec.len(), l2_blocks_parsed_ids); for l2_block in l2_block_vec { - self.store.put_block(l2_block.clone(), l1_header).await?; + // TODO: proper fix is to make the sequencer's genesis include a + // trailing `clock_invocation(0)` (and have the indexer's + // `open_db_with_genesis` not pre-apply state transitions) so the + // inscribed genesis can flow through `put_block` like any other + // block. For now we skip re-applying it. + // + // The channel-start (block_id == 1) is the sequencer's genesis + // inscription that we re-discover during initial search. The + // indexer already has its own locally-constructed genesis in + // the store from `open_db_with_genesis`, so re-applying the + // inscribed copy is both redundant and would fail the strict + // block validation in `put_block` (the inscribed genesis lacks + // the trailing clock invocation). + if l2_block.header.block_id != 1 { + self.store.put_block(l2_block.clone(), l1_header).await?; + } yield Ok(l2_block); }