Skip to content

Let streams skip partial blocks of a shared hub - #80

Merged
sduchesneau merged 1 commit into
developfrom
feature/hub-without-partials
Oct 8, 2026
Merged

sduchesneau merged 1 commit into
developfrom
feature/hub-without-partials

Conversation

@sduchesneau

Copy link
Copy Markdown
Contributor

ForkableHub.WithoutPartials() returns the hub as a bstream.ForkableSourceFactory whose sources subscribe without partial blocks: the last partial of a block is delivered as the complete block and the others are dropped, the same handling the relayer gives a client that does not ask for partials. stream.WithoutPartialBlocks() makes a stream use it.

firehose-core needs it to share one hub between firehose and substreams tier1 in the same process. Tier1's hub is fed with partial blocks; firehose's never is, because its live source does not ask for them. Firehose streams go through SourceFromBlockNum, SourceFromCursor and SourceThroughCursor, which always subscribe with partials, so without this a shared hub would change what firehose streams on chains with flash blocks.

Existing methods keep their behavior.

@sduchesneau
sduchesneau merged commit 0873d6f into develop Oct 8, 2026
3 checks passed
@sduchesneau
sduchesneau deleted the feature/hub-without-partials branch October 8, 2026 14:01
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