Repository navigation
perf(p2p): verify one KZG batch per block for fetched data columns #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8d41b83
perf(p2p): verify one KZG batch per block for fetched data columns
MegaRedHand abe310a
perf(p2p): verify a block group's shared header signature once
MegaRedHand 0ee30f2
Merge main into perf/column-kzg-batch-per-block
MegaRedHand 2b20cb7
Merge main into perf/column-kzg-batch-per-block
MegaRedHand 1101593
Merge main into perf/column-kzg-batch-per-block
MegaRedHand ad33f09
Merge main into perf/column-kzg-batch-per-block
MegaRedHand 5a3aab4
Merge main into perf/column-kzg-batch-per-block
MegaRedHand c738374
Merge main into perf/column-kzg-batch-per-block
MegaRedHand ab21359
fix(state-transition): check each column's lengths in verify_column_c…
MegaRedHand 6805df6
test(state-transition): time the column KZG batch from 1 to 128 columns
MegaRedHand b3f541b
perf(state-transition): judge a block's shared column rules once per …
MegaRedHand 0ec7ceb
fix(p2p): keep one sidecar per block and column index in a check call
MegaRedHand e775465
perf(p2p): verify a block's column proofs in sub-batches across permits
MegaRedHand 5f8c9c6
docs: describe the per-block column checks where they are explained
MegaRedHand 87c266a
fix(p2p): split a block's columns into sub-batches one size apart
MegaRedHand c17eeed
fix(p2p): count the column sidecars a panic or a closed pool drops
MegaRedHand 11b312e
refactor(state-transition): skip an empty KZG batch and a second comm…
MegaRedHand e335380
docs: separate the wall-clock and CPU comparisons for an 8-column batch
MegaRedHand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The single-column path gets a per-column length check for free: c-kzg returns
Errwhen one column's cells, commitments and proofs differ in length. Here the columns are concatenated first, so only the totals are compared. A column with 2 cells and 1 commitment next to one with 1 cell and 2 commitments has matching totals, and the first column's second cell is then verified against the second column's first commitment.It is unreachable through today's callers, since
verify_data_column_sidecarandgloas_verify_data_column_sidecarrun first, but the function ispuband the precondition lives only in the doc comment. A per-column length check before flattening restores the guard.verify_column_cellsabove could then delegate to this with oneColumnCells, so gossip and the chain path share one implementation of the rule instead of two copies of the cell-conversion loop.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ab21359.
verify_column_cells_batchchecks that each entry's cells, commitments and proofs have equal length and returnsErrotherwise, as c-kzg does for one column.verify_column_cellsnow delegates to it with oneColumnCells, so gossip and the chain path share one cell-conversion loop.a_batch_entry_whose_lengths_disagree_is_refused_even_when_the_totals_matchsplits one real 3-blob column into (2 cells, 1 commitment, 2 proofs) and (1 cell, 2 commitments, 1 proof). Flattened, those are exactly the whole column, which the test also asserts verifies. It fails with the check disabled.