Skip to content

fix: honor configured start_block on cold start#107

Open
aliraghebi wants to merge 1 commit into
fystack:mainfrom
aliraghebi:fix/honor-start-block-cold-start
Open

fix: honor configured start_block on cold start#107
aliraghebi wants to merge 1 commit into
fystack:mainfrom
aliraghebi:fix/honor-start-block-cold-start

Conversation

@aliraghebi

@aliraghebi aliraghebi commented Jul 13, 2026

Copy link
Copy Markdown

Fixes #106

The start_block config field (ChainConfig.StartBlock, yaml start_block) was defined, validated, and documented for every chain in config.example.yaml, but never read anywhere in the codebase. On a cold start with no persisted checkpoint, RegularWorker.determineStartingBlock always anchored on the current chain head, silently discarding the configured start_block and making backfills from a chosen height impossible.

Use start_block as the cold-start anchor when the block store is healthy and has no prior block. A warm start (existing KV checkpoint) still wins and resumes from the checkpoint, and a down store still falls back to the chain head so a broken store never re-triggers a backfill from start_block on every restart.

The start_block config field (ChainConfig.StartBlock, yaml `start_block`) was
defined, validated, and documented for every chain in config.example.yaml, but
never read anywhere in the codebase. On a cold start with no persisted
checkpoint, RegularWorker.determineStartingBlock always anchored on the current
chain head, silently discarding the configured start_block and making backfills
from a chosen height impossible.

Use start_block as the cold-start anchor when the block store is healthy and has
no prior block. A warm start (existing KV checkpoint) still wins and resumes from
the checkpoint, and a down store still falls back to the chain head so a broken
store never re-triggers a backfill from start_block on every restart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: start_block config field is parsed and validated but never used

1 participant