-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update block's blob_kzg_commitments
size limit to MAX_BLOB_COMMITMENTS_PER_BLOCK (4096)
#3338
Changes from 8 commits
17dac8c
5e43f43
1aad9b5
9f530a7
a75292b
8ccc257
4458645
feb1968
a05b689
f0a4281
e9cc8dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -40,6 +40,8 @@ | |||||
|
||||||
This upgrade adds blobs to the beacon chain as part of Deneb. This is an extension of the Capella upgrade. | ||||||
|
||||||
The blob transactions are packed into the execution payload by the EL/builder with their corresponding blobs being independently transmitted and are limited by `MAX_DATA_GAS_PER_BLOCK // DATA_GAS_PER_BLOB`. However the CL limit is independently defined by `MAX_BLOBS_PER_BLOCK`. | ||||||
|
||||||
## Custom types | ||||||
|
||||||
| Name | SSZ equivalent | Description | | ||||||
|
@@ -68,7 +70,8 @@ This upgrade adds blobs to the beacon chain as part of Deneb. This is an extensi | |||||
|
||||||
| Name | Value | | ||||||
| - | - | | ||||||
| `MAX_BLOBS_PER_BLOCK` | `uint64(2**2)` (= 4) | | ||||||
| `MAX_BLOB_COMMITMENTS_PER_BLOCK` | `uint64(2**12)` (= 4096) | hardfork independent fixed theoretical limit same as `LIMIT_BLOBS_PER_TX` (see EIP 4844) | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think mentioning the EL constants in the consensus spec is a good idea, since I think we should make the EL and CL as independent to each other as possible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its more of an EIP constant imo |
||||||
| `MAX_BLOBS_PER_BLOCK` | `uint64(2**2)` (= 4) | Maximum number of blobs in a single block limited by `MAX_BLOB_COMMITMENTS_PER_BLOCK` | | ||||||
|
||||||
## Configuration | ||||||
|
||||||
|
@@ -96,7 +99,7 @@ class BeaconBlockBody(Container): | |||||
# Execution | ||||||
execution_payload: ExecutionPayload # [Modified in Deneb] | ||||||
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] | ||||||
blob_kzg_commitments: List[KZGCommitment, MAX_BLOBS_PER_BLOCK] # [New in Deneb] | ||||||
blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] # [New in Deneb] | ||||||
``` | ||||||
|
||||||
#### `ExecutionPayload` | ||||||
|
@@ -251,6 +254,9 @@ def process_execution_payload(state: BeaconState, payload: ExecutionPayload, exe | |||||
|
||||||
```python | ||||||
def process_blob_kzg_commitments(body: BeaconBlockBody) -> None: | ||||||
# Verify commitments are under limit | ||||||
assert len(body.blob_kzg_commitments) <= MAX_BLOBS_PER_BLOCK | ||||||
# Verify commitments match with corresponding blob transactions | ||||||
assert verify_kzg_commitments_against_transactions(body.execution_payload.transactions, body.blob_kzg_commitments) | ||||||
``` | ||||||
|
||||||
|
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.
Not sure I would put this reference to execution-layer constraints here.
Definitely don't need a reference to "builder", and there is no definition of EL in the consensus-layer specs at this point. If we want to reference that layer use
ExecutionEngine