fix(sequencer): submit genesis block to Bedrock on fresh start#409
Open
fix(sequencer): submit genesis block to Bedrock on fresh start#409
Conversation
The sequencer created the genesis block's inscribe transaction but discarded it (`_tx`), never posting it to Bedrock. The indexer's `search_for_channel_start` scans backward through L1 blocks looking for an L2 block with `block_id == 1` to locate the channel start. Since genesis was never on L1, the search looped indefinitely, clearing its buffer on every cycle, and `current_state` was never updated past genesis. On a fresh DB start, submit the genesis block to Bedrock immediately after creating it, mirroring what `produce_new_block` does for all subsequent blocks. On restart the genesis block is already on Bedrock from the initial run, so submission is skipped. Fixes the `indexer_state_consistency` integration test.
Arjentix
approved these changes
Mar 30, 2026
Collaborator
Arjentix
left a comment
There was a problem hiding this comment.
Hey, thanks for the PR. IMO this is a good addition, but not a fix, because we actually have a thread which retries pending blocks, so it should immediately retry genesis.
Also you can see that indexer tests are still failing. We concluded that this is probably something on bedrock side and currently we disabled this tests in CI while we're waiting for the fix. When you rebase to main you'll see it's removed from CI.
Anyway I'd not merge without @Pravdyvy 's approval.
Pravdyvy
approved these changes
Apr 24, 2026
Collaborator
Pravdyvy
left a comment
There was a problem hiding this comment.
lgtm. Latest main should fix the tests.
Contributor
Author
|
You want me to rebase this, or you guys wanna close this one? |
Collaborator
It is useful. You can rebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sequencer created the genesis block's inscribe transaction but discarded it (
_tx), never posting it to Bedrock. The indexer'ssearch_for_channel_startscans backward through L1 blocks looking for an L2 block withblock_id == 1to locate the channel start. Since genesis was never on L1, the search looped indefinitely, clearing its buffer on every cycle, andcurrent_statewas never updated past genesis.On a fresh DB start, submit the genesis block to Bedrock immediately after creating it, mirroring what
produce_new_blockdoes for all subsequent blocks. On restart the genesis block is already on Bedrock from the initial run, so submission is skipped.Fixes the
indexer_state_consistencyintegration test.