fix(postage): resume live sync where snapshot replay stopped#5517
Merged
Conversation
Member
Author
|
Here is the failing test @acud and @martinconic On current branch, you can find this test in |
sbackend123
approved these changes
Jun 25, 2026
janos
approved these changes
Jun 25, 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.
Checklist
Description
Follow-up to #5499. When booting from the postage snapshot, the snapshot replay
stops a few blocks below the snapshot's max block (the listener trims
tailSizeand rounds to a
batchFactormultiple). But live sync was forced to resume fromthe snapshot's nominal tip (
maxBlock + 1) viasnapshotResumeBlock, skippingthose few blocks. A
BatchCreatedin that gap later surfaces asget batch <id>: storage: not found.Fix: drop the
snapshotResumeBlockoverride.Startalready resumes fromcs.Block + 1, and the replay advancescs.Blockas it goes, so live sync nowresumes exactly where the replay stopped and re-fetches the trimmed tail from the
chain. No events skipped, none double-processed.
pkg/postage/batchservice: removesnapshotResumeBlockand theStartoverride; remove
ResumeBlockfrom theSnapshotstruct.pkg/postage/snapshot:Newstill parses the snapshot eagerly (corruptionguard), but no longer carries a resume block.
TestSnapshotRebuildasserts live resumes from the replay's last block;TestReplayStopsBelowMaxBlock(real listener + filterer) asserts the replaystops below
maxBlock; restoredTestSnapshotLogFilterer_RealSnapshot(droppedby the chore: revert #5343 #5482 revert) parses the embedded blob and asserts it is non-empty.
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Related to #5495, follow-up to #5499. Restores a real-archive test removed by the
#5343 revert (#5482).
Screenshots (if appropriate):
AI Disclosure