fix: archive nodes bootstrap via block sync, not state sync#84
Merged
fix: archive nodes bootstrap via block sync, not state sync#84
Conversation
The archive planner hardcoded a state-sync SnapshotSource, causing archive nodes to state-sync from a recent height instead of block syncing from genesis. This meant archive nodes had pruned state and produced small (~500MB) snapshots instead of full (~48GB) ones. Removes the hardcoded state-sync source so archive nodes use the genesis/block-sync base progression. Adds test coverage for the archive planner's task progression, peer handling, and snapshot generation overrides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update TestBuildPlan_Archive to expect genesis/block-sync progression (no configure-state-sync). Preallocate slice in archive_test.go. 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
SnapshotSourcefrom the archive plannerContext
The archive planner's
snapshotSource()method hardcoded&SnapshotSource{StateSync: &StateSyncSource{}}, which meant archive nodes bootstrapped via state sync and only had pruned state from a recent height. This caused two problems:snapshotGenerationwas configured on syncer nodes instead of archive nodes, since archive snapshots were too small to be usefulWith this fix, archive nodes block sync from peers (the "genesis" progression), retaining full history. Combined with moving
snapshotGenerationto the archive SeiNodeDeployment, this restores the correct snapshot pipeline.Test plan
TestArchivePlanner_BlockSyncProgression— no snapshot-restore or state-sync tasksTestArchivePlanner_WithPeers— discover-peers included when peers configuredTestArchivePlanner_SnapshotGenerationOverrides— snapshot-interval and keep-recent setTestArchivePlanner_NoSnapshotGenerationOverrides— nil when not configuredTestArchivePlanner_Mode— returns "archive"🤖 Generated with Claude Code