Repository navigation
Share one forkable hub between firehose and tier1 - #281
Merged
Merged
Conversation
Contributor
sduchesneau
marked this pull request as ready for review
October 8, 2026 14:07
UlysseCorbeil
approved these changes
Oct 8, 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.
When
firehoseandsubstreams-tier1run in the same process, they now share one forkable hub instead of each connecting to the relayer and holding its own copy of the live blocks. Both hubs also keep the same number of final blocks:max(200, 2 × bundle size), from substreams'HubKeepFinalBlocks. Firehose usedmax(500, 2 × bundle size).Depends on streamingfast/bstream#80 and streamingfast/substreams#983.
How
Runtime.Apps.cmd/apps/shared_hub.gobuilds the hub once with substreams'NewLiveHub, the hub tier1 has always used: partial blocks, burst from LIB. It starts the hub, updates both apps' head metrics from it, and passes it to both apps through their modules. Each app waits on itsReadyand shuts down if it terminates.stream.WithoutPartialBlocks(), so a hub fed with partial blocks for tier1 does not change what firehose sends: each block arrives once, complete, as before. Firehose's own hub never had partial blocks, so this does nothing when the hub is not shared.--firehose-discard-partial-blocks, since tier1 needs the partial blocks.Memory on Solana
Live blocks only, at today's 100-block bundles:
The accounts stream goes from 4.1 GiB to 1.2 GiB in a process running both.
Behavior change
Firehose clients resuming between 200 and 500 blocks below the last irreversible block are now served from merged-blocks files instead of memory.
Tested
devel/standard):substreams runthrough tier1 streamed live blocks.