Fix partial-blocks streaming: undo on reorg, no gaps, no stream errors#799
Merged
Merged
Conversation
Contributor
Author
A partial block that does not extend the transactions already sent now triggers a BlockUndoSignal (last valid = parent) instead of killing the stream with 'first transactions does not match expected hash'. After such an undo, further non-last partials of that block are muted until its last partial or full block settles it, so churning versions produce a single undo. Repeated undos to the same junction are no longer suppressed once partial data has been sent.
Brings streamingfast/bstream#49: the hub subscription no longer skips past a StepNewPartial under subscriber lag, and the forkable ignores non-last partial versions of a block already settled by its lastPartial. This also guarantees a partial block is never delivered before its parent, so the pipeline needs no parent-link checking of its own.
801f8f0 to
24ae2a7
Compare
maoueh
approved these changes
Jun 10, 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.
With
--partial-blocks, a flashblock reorg could kill the stream withfirst transactions does not match expected hashor emit erratic UNDO signals. Fixed behavior:BlockUndoSignal(last valid = parent block) instead of anInternalerror; further non-last partials of that block are then muted until its last partial (or full block) settles itAlso bumps bstream to include streamingfast/bstream#49 (live streams no longer lose the closing
StepNewPartialof a block — the root trigger of these conditions). That fix also guarantees a partial is never delivered before its parent block, so no parent-link checking is needed pipeline-side.🤖 Generated with Claude Code