fix: skip configure-state-sync for S3 snapshot restores#62
Merged
Conversation
configure-state-sync enables CometBFT's state sync protocol, which discovers and applies snapshot chunks from peers. This is only needed for StateSync source bootstrapping, not S3 snapshot restores. S3 snapshot-restore writes a complete data directory (app.db, blockstore, state). CometBFT should start normally with statesync.enable=false and block-sync forward. When configure-state-sync runs on an S3-restored node, it overwrites this with enable=true, causing seid to ignore the restored data and loop forever: "no snapshots discovered, sleeping." Fix both buildBasePlan and buildBootstrapProgression to only insert configure-state-sync when hasStateSync(snap) is true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bdchatham
added a commit
that referenced
this pull request
Apr 10, 2026
Reverts the logic change from #62 that skipped configure-state-sync for S3 snapshot sources. The original rationale assumed S3 snapshot-restore writes a complete data directory, but the sidecar extracts ABCI snapshot chunks to data/snapshots/. Without configure-state-sync (useLocalSnapshot: true), CometBFT starts with statesync.enable=false, never applies the snapshot, and panics at InitChain with an empty state DB. Restores the original guard (`snap != nil`) so configure-state-sync runs for both S3 and StateSync sources. Fixes the pacific-1-shadow-replayer canonicalRpc port typo (2665 → 26657). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
bdchatham
added a commit
that referenced
this pull request
Apr 10, 2026
Reverts the logic change from #62 that skipped configure-state-sync for S3 snapshot sources. The original rationale assumed S3 snapshot-restore writes a complete data directory, but the sidecar extracts ABCI snapshot chunks to data/snapshots/. Without configure-state-sync (useLocalSnapshot: true), CometBFT starts with statesync.enable=false, never applies the snapshot, and panics at InitChain with an empty state DB. Restores the original guard (`snap != nil`) so configure-state-sync runs for both S3 and StateSync sources. Fixes the pacific-1-shadow-replayer canonicalRpc port typo (2665 → 26657). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
configure-state-syncwas incorrectly inserted into init plans for S3 snapshot restores, causing nodes to ignore restored data and loop forever: "no snapshots discovered, sleeping."Root Cause
S3
snapshot-restorewrites a complete data directory (app.db, blockstore, state). CometBFT should start withstatesync.enable=falseand block-sync forward. Butconfigure-state-syncruns afterconfig-applyand overwrites withenable=true, causing seid to enter its state sync reactor and try to discover snapshot chunks from peers — which have already rotated.Fix
Change both
buildBasePlanandbuildBootstrapProgressionto only insertconfigure-state-syncwhenhasStateSync(snap)is true (StateSync source), not when any snapshot source exists.Tests
TaskConfigureStateSyncfrom S3 snapshot plan progression assertionsTest plan
make test— all tests passconfigure-state-syncconfigure-state-sync🤖 Generated with Claude Code