Verify the blobs bundle against the block's blob hashes - #536
Open
0w3n-d wants to merge 1 commit into
Open
Conversation
The submission carries one bundle for the whole block, so the block's blob versioned hashes must match its commitments in order. ethrex's BlobsBundle::validate is per transaction and does not fit that shape, so this checks the lengths and hashes and calls verify_cell_kzg_proof_batch directly. Blob gas accounting needs nothing: verify_blob_gas_usage already runs in validate_block_pre_execution. Step 8 of #527. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 31, 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.
Issue: #527 (step 8 of 10)
Base branch:
od/builder-sim-blacklist-step6(#535, step 6). Retarget as thestack merges.
What this PR does
validateandvalidate_mergedtake the submission'sBlobsBundleand checkit against the block:
blobs * CELLS_PER_EXT_BLOB);transaction, match the bundle's commitments;
verify_cell_kzg_proof_batchaccepts the proofs.ethrex's own
BlobsBundle::validateis per transaction, and a submissioncarries one bundle for the whole block, so it does not fit that shape. The parts
that do fit —
validate_blob_commitment_hashesand the KZG batch verify — arecalled directly rather than reimplemented.
Blob gas accounting needs nothing here:
verify_blob_gas_usagealready runsinside
validate_block_pre_execution, which step 4 calls.What this PR deliberately does not do
No pre-Fulu bundle format. Only EIP-7594 cell proofs are accepted, matching the
decision to serve V5 and the merged method only.
Tests
Written first and signed off before implementation. 7 new, 48 in the file:
blob_gas_used > 0, so it cannotpass by the blob transaction having been dropped from the block.
corrupt cell proof, a spare blob, and an empty bundle for a block that has a
blob transaction are each rejected.
The bundles are real:
BlobsBundle::create_from_blobscomputes genuinecommitments and cell proofs, and
verify_cell_kzg_proof_batchis doing actualwork in these tests.
One fixture note: the blobs differ from each other by construction. With
all-zero blobs every commitment is identical, which silently turned the
commitment-mismatch test into a no-op — it passed while testing nothing.
just fmt-check,just testandcargo clippy --all-features --no-deps -- -D warningsare clean. 82 tests pass in
helix-builder, up from 75.Reviewer checklist
lint,unit-test) is green