-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update BlobsBundle for Fulu #4187
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
Changes from all commits
89d3551
58319bf
1f7f457
8005da2
9ed39ea
3e80fb1
655e320
93840ca
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,6 +10,12 @@ | |||||
| - [Prerequisites](#prerequisites) | ||||||
| - [Configuration](#configuration) | ||||||
| - [Custody setting](#custody-setting) | ||||||
| - [Helpers](#helpers) | ||||||
| - [`BlobsBundle`](#blobsbundle) | ||||||
| - [Modified `GetPayloadResponse`](#modified-getpayloadresponse) | ||||||
| - [Protocol](#protocol) | ||||||
| - [`ExecutionEngine`](#executionengine) | ||||||
| - [Modified `get_payload`](#modified-get_payload) | ||||||
| - [Beacon chain responsibilities](#beacon-chain-responsibilities) | ||||||
| - [Validator custody](#validator-custody) | ||||||
| - [Block and sidecar proposal](#block-and-sidecar-proposal) | ||||||
|
|
@@ -44,6 +50,54 @@ document and used throughout. | |||||
| | `VALIDATOR_CUSTODY_REQUIREMENT` | `8` | Minimum number of custody groups an honest node with validators attached custodies and serves samples from | | ||||||
| | `BALANCE_PER_ADDITIONAL_CUSTODY_GROUP` | `Gwei(32 * 10**9)` | Balance increment corresponding to one additional group to custody | | ||||||
|
|
||||||
| ## Helpers | ||||||
|
|
||||||
| ### `BlobsBundle` | ||||||
|
|
||||||
| *[Modified in Fulu:EIP7594]* | ||||||
|
|
||||||
| The `BlobsBundle` object is modified to include cell KZG proofs instead of blob KZG proofs. | ||||||
|
|
||||||
| ```python | ||||||
| @dataclass | ||||||
| class BlobsBundle(object): | ||||||
| commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] | ||||||
| # [Modified in Fulu:EIP7594] | ||||||
| proofs: List[KZGProof, FIELD_ELEMENTS_PER_EXT_BLOB * MAX_BLOB_COMMITMENTS_PER_BLOCK] | ||||||
|
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
I think length of max cell proofs per block should be derived from
Member
Author
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. Hi @hangleang, using 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. Look good to me then 🎉 |
||||||
| blobs: List[Blob, MAX_BLOB_COMMITMENTS_PER_BLOCK] | ||||||
| ``` | ||||||
|
|
||||||
| ### Modified `GetPayloadResponse` | ||||||
|
|
||||||
| *[Modified in Fulu:EIP7594]* | ||||||
|
|
||||||
| The `GetPayloadResponse` object is modified to use the updated `BlobsBundle` object. | ||||||
|
|
||||||
| ```python | ||||||
| @dataclass | ||||||
| class GetPayloadResponse(object): | ||||||
| execution_payload: ExecutionPayload | ||||||
| block_value: uint256 | ||||||
| blobs_bundle: BlobsBundle # [Modified in Fulu:EIP7594] | ||||||
| ``` | ||||||
|
|
||||||
| ## Protocol | ||||||
|
|
||||||
| ### `ExecutionEngine` | ||||||
|
|
||||||
| #### Modified `get_payload` | ||||||
|
|
||||||
| The `get_payload` method is modified to return the updated `GetPayloadResponse` object. | ||||||
|
|
||||||
| ```python | ||||||
| def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse: | ||||||
| """ | ||||||
| Return ExecutionPayload, uint256, BlobsBundle objects. | ||||||
| """ | ||||||
| # pylint: disable=unused-argument | ||||||
| ... | ||||||
| ``` | ||||||
|
|
||||||
| ## Beacon chain responsibilities | ||||||
|
|
||||||
| ### Validator custody | ||||||
|
|
||||||
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.
Do we ever hash BlobsBundle? Otherwise the value of MAX_CELLS_PER_EXT_BLOB is meaninglesss
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.
I don't understand. What do you mean exactly? This will be SSZ encoded in the builder flow.
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 max length of the SSZ list doesn't affect SSZ encoding, it only affects tree hashing. So if we don't ever need to hash this object, the number here doesn't matter - i think this is what @dapplion meant.
IMO defining the max length still make sense though for validation purpose, but the structure we sent over the wire remains unchanged.