Repository navigation
feat(config): default from_latest to true, honor start_block on cold start - #116
Merged
Merged
Conversation
…start from_latest is now a *bool that defaults to true when unset in both defaults and the chain config. On a cold start, a chain with from_latest: false begins at its configured start_block instead of the chain head. Config validation rejects from_latest: false without a start_block.
vietddude
approved these changes
Oct 8, 2026
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.
Summary
from_latestis now a*boolthat defaults totruewhen unset in bothdefaultsand the chain config. A per-chain value overridesdefaults.from_latest: falsebegins at its configuredstart_blockinstead of the chain head. Previouslystart_blockwas ignored entirely.from_latest: falsewithout astart_block(> 0), rather than silently falling back to the chain head.start_block.Notes
start_blockis more thanmax_lag(default 100) behind head, the regular worker skips ahead and queues the gap for the catchup worker, which needs--catchupenabled.Test plan
go test ./pkg/common/config/ ./internal/worker/start_block,from_latestignoresstart_block, warm restart ignoresstart_block, defaults inheritance, validation