hub: count blocks, not partials, toward the unlinkable limit - #64
Merged
sduchesneau merged 1 commit intoAug 17, 2026
Merged
Conversation
WithMaxConsecutiveUnlinkableBlocks names a number of blocks, but the counter was advanced by every message. A flash-block chain delivers one block as several partials that all fail the same link check, so a hub configured for 5 gave up after 2 blocks. Intermediate partials no longer count; a plain block and a block's final partial do.
sduchesneau
deleted the
fix/unlinkable-count-skips-non-final-flash-blocks
branch
August 17, 2026 16:00
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.
hub.WithMaxConsecutiveUnlinkableBlocksnames a number of blocks, but the counter was advanced by every message reachingForkableHub.ProcessBlock.A flash-block chain delivers one block as several partials, and each of them fails the same
forkable.Linkablecheck for the same reason. So a hub configured for 5 gave up after 2 blocks on a chain sending 4 partials per block — the limit's meaning depended on how the chain chose to slice its blocks.Intermediate partials (
PartialIndex != 0withoutLastPartial) no longer count. A plain block counts, a block's final partial counts, and any linkable block still resets the count, so the gap this exists to catch — one the one-block store can no longer bridge — is still reported, just per block.The predicate is the one already guarding readiness a few lines above, extracted as
isNonFinalPartial.Covered by
TestForkableHub_ProcessBlock_UnlinkableCountSkipsNonFinalFlashBlocks: 30 intermediate partials never trip it, final partials trip it after exactly the configured number of blocks with partials interleaved, plain blocks trip it, and a linkable block resets it. The first two subtests fail without the change.Verified end to end against substreams tier1 (
hub.WithMaxConsecutiveUnlinkableBlocks(5)) with a workspace replace: thetests_e2epartial-block suite and the full suite both pass.🤖 Generated with Claude Code