Skip to content

Fix partial-blocks streaming: undo on reorg, no gaps, no stream errors#799

Merged
sduchesneau merged 2 commits into
developfrom
fix/partial-blocks-undo-and-continuity
Jun 10, 2026
Merged

Fix partial-blocks streaming: undo on reorg, no gaps, no stream errors#799
sduchesneau merged 2 commits into
developfrom
fix/partial-blocks-undo-and-continuity

Conversation

@sduchesneau

@sduchesneau sduchesneau commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

With --partial-blocks, a flashblock reorg could kill the stream with first transactions does not match expected hash or emit erratic UNDO signals. Fixed behavior:

  • a partial block that does not extend the transactions already sent triggers a single BlockUndoSignal (last valid = parent block) instead of an Internal error; further non-last partials of that block are then muted until its last partial (or full block) settles it
  • repeated undos to the same junction are no longer suppressed after partial data has been sent

Also bumps bstream to include streamingfast/bstream#49 (live streams no longer lose the closing StepNewPartial of 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

@sduchesneau

sduchesneau commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

🔍 Vulnerabilities of ghcr.io/streamingfast/substreams:68bbf13

📦 Image Reference ghcr.io/streamingfast/substreams:68bbf13
digestsha256:ca6fb4f6be8eca92e5561f78f9e9169dcadebeb62d00976b5f06ed6b665cdc58
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size119 MB
packages353
📦 Base Image ubuntu:24.04
also known as
  • c136481b8f4cd58cb213a22ee358ea1047bc963a338c61cdccb518e233409f86
  • noble
  • noble-20260509.1
digestsha256:023f8a753c22258c9fe2d0005a7d28258038da7d620e9f93e9ad78aa266f9f11
vulnerabilitiescritical: 0 high: 1 medium: 26 low: 11

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.
@sduchesneau sduchesneau force-pushed the fix/partial-blocks-undo-and-continuity branch from 801f8f0 to 24ae2a7 Compare June 10, 2026 19:04
@sduchesneau sduchesneau requested a review from maoueh June 10, 2026 19:10
@sduchesneau sduchesneau merged commit c3f50ce into develop Jun 10, 2026
6 checks passed
@sduchesneau sduchesneau deleted the fix/partial-blocks-undo-and-continuity branch June 10, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants