Repository navigation
tools check merged-blocks: add --validate-block-count - #357
Open
matthewdarwin wants to merge 3 commits into
Open
matthewdarwin wants to merge 3 commits into
matthewdarwin wants to merge 3 commits into
Conversation
Drops the "Segment ... contained only N blocks" line printed for each merged-blocks file holding fewer blocks than the bundle size. On chains that skip block numbers (Solana skips slots) nearly every file is short and the line drowns the real findings. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maoueh
requested changes
Nov 18, 2026
maoueh
left a comment
Contributor
There was a problem hiding this comment.
I would like a better name, not sure exactly of the name, but I'm not finding this naming clear enough.
The name like this felt like short holes wouldn't be reported. It could be inverted also maybe an be ValidateBlockCount true
…lock-count The short-segment line is now an option that is on by default (--validate-block-count, MergedBlocksCheckOptions.ValidateBlockCount), turned off with --validate-block-count=false, so the name says what is checked rather than reading like holes would be hidden. The deprecated CheckMergedBlocks sets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Thanks, good point: the name read as if short holes would be hidden. I inverted it as you suggested. It's now |
maoueh
approved these changes
Nov 19, 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.
What
tools check merged-blocks --validate-blocksprints🔶 Segment <file> contained only N blocks (< 100), this can happen on some chainsfor every merged-blocks file holding fewer blocks than the bundle size. On chains that skip block numbers, Solana for example (skipped slots), nearly every file is short. A full-chain run then prints hundreds of thousands of these lines, and the real findings (holes, unlinkable blocks, bundle-boundary problems) are hard to spot.--validate-block-count(MergedBlocksCheckOptions.ValidateBlockCount) controls that check.true, so the output is unchanged unless an operator passes--validate-block-count=falseon a chain where short files are expected.check.CheckMergedBlocksWithOptions: the field isfalsewhen left unset, so they needValidateBlockCount: trueto keep the line. The deprecatedcheck.CheckMergedBlockssets it. The CHANGELOG entry says so. Within firehose-core the only callers are the CLI and that wrapper.Tests
TestCheckMergedBlocks_ValidateBlockCountuses a store with a short file whose blocks skip numbers but still link, and a bloated file.ValidateBlockCount: true, the short-file line is printed.go test -race ./cmd/tools/check/,go vetandgofmtpass.firecore tools check merged-blocks --helpshows the flag with(default true).Independent of #356 (
--parallel), which moves this line intosegment.go; whichever merges second needs a one-line rebase.🤖 Generated with Claude Code