fix(sync): cap data column range database batches - #17331
Open
exocognosis wants to merge 1 commit into
Open
Conversation
|
|
exocognosis
marked this pull request as ready for review
August 12, 2026 13:43
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.
Problem
validateDataColumnsByRangepreserves the full normalized request width inrangeParams.size. The sharedblockRangeBatcherinterprets that value as the slot width for each database lookup, so a request spanning thousands of slots can cause one large synchronousdb.Blocksread before response quotas stop stream writes.The block and blob range handlers already separate the full request range from the size of each database batch. The data column handler did not apply an equivalent bound.
Solution
startandendslots so valid requests still cover their complete range.sizeto the configured block batch limit.Impact
This prevents large data column range requests from creating a single wide block database read. It does not reject valid requests, change their normalized range, or reduce the response quota. It only bounds the amount of block data loaded by each batch iteration.
Validation
go test ./beacon-chain/sync -run '^TestValidateDataColumnsByRange$' -count=1go test ./beacon-chain/sync -count=1gofmton the modified Go filesgit diff --checkCloses #17314