Skip to content

Commit 6c3f168

Browse files
authored
Update BlobsBundle for Fulu (#4187)
1 parent 4dd8dba commit 6c3f168

File tree

4 files changed

+59
-5
lines changed

4 files changed

+59
-5
lines changed

presets/mainnet/fulu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
FIELD_ELEMENTS_PER_CELL: 64
77
# `uint64(2 * 4096)` (= 8192)
88
FIELD_ELEMENTS_PER_EXT_BLOB: 8192
9-
# uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))
9+
# `uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))`
1010
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4

presets/minimal/fulu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
FIELD_ELEMENTS_PER_CELL: 64
77
# `uint64(2 * 4096)` (= 8192)
88
FIELD_ELEMENTS_PER_EXT_BLOB: 8192
9-
# uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))
9+
# `uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))`
1010
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4

specs/deneb/validator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Please see related Beacon Chain doc before continuing and use them as a referenc
4646
```python
4747
@dataclass
4848
class BlobsBundle(object):
49-
commitments: Sequence[KZGCommitment]
50-
proofs: Sequence[KZGProof]
51-
blobs: Sequence[Blob]
49+
commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK]
50+
proofs: List[KZGProof, MAX_BLOB_COMMITMENTS_PER_BLOCK]
51+
blobs: List[Blob, MAX_BLOB_COMMITMENTS_PER_BLOCK]
5252
```
5353

5454
### Modified `GetPayloadResponse`

specs/fulu/validator.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
- [Prerequisites](#prerequisites)
1111
- [Configuration](#configuration)
1212
- [Custody setting](#custody-setting)
13+
- [Helpers](#helpers)
14+
- [`BlobsBundle`](#blobsbundle)
15+
- [Modified `GetPayloadResponse`](#modified-getpayloadresponse)
16+
- [Protocol](#protocol)
17+
- [`ExecutionEngine`](#executionengine)
18+
- [Modified `get_payload`](#modified-get_payload)
1319
- [Beacon chain responsibilities](#beacon-chain-responsibilities)
1420
- [Validator custody](#validator-custody)
1521
- [Block and sidecar proposal](#block-and-sidecar-proposal)
@@ -44,6 +50,54 @@ document and used throughout.
4450
| `VALIDATOR_CUSTODY_REQUIREMENT` | `8` | Minimum number of custody groups an honest node with validators attached custodies and serves samples from |
4551
| `BALANCE_PER_ADDITIONAL_CUSTODY_GROUP` | `Gwei(32 * 10**9)` | Balance increment corresponding to one additional group to custody |
4652

53+
## Helpers
54+
55+
### `BlobsBundle`
56+
57+
*[Modified in Fulu:EIP7594]*
58+
59+
The `BlobsBundle` object is modified to include cell KZG proofs instead of blob KZG proofs.
60+
61+
```python
62+
@dataclass
63+
class BlobsBundle(object):
64+
commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK]
65+
# [Modified in Fulu:EIP7594]
66+
proofs: List[KZGProof, FIELD_ELEMENTS_PER_EXT_BLOB * MAX_BLOB_COMMITMENTS_PER_BLOCK]
67+
blobs: List[Blob, MAX_BLOB_COMMITMENTS_PER_BLOCK]
68+
```
69+
70+
### Modified `GetPayloadResponse`
71+
72+
*[Modified in Fulu:EIP7594]*
73+
74+
The `GetPayloadResponse` object is modified to use the updated `BlobsBundle` object.
75+
76+
```python
77+
@dataclass
78+
class GetPayloadResponse(object):
79+
execution_payload: ExecutionPayload
80+
block_value: uint256
81+
blobs_bundle: BlobsBundle # [Modified in Fulu:EIP7594]
82+
```
83+
84+
## Protocol
85+
86+
### `ExecutionEngine`
87+
88+
#### Modified `get_payload`
89+
90+
The `get_payload` method is modified to return the updated `GetPayloadResponse` object.
91+
92+
```python
93+
def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse:
94+
"""
95+
Return ExecutionPayload, uint256, BlobsBundle objects.
96+
"""
97+
# pylint: disable=unused-argument
98+
...
99+
```
100+
47101
## Beacon chain responsibilities
48102

49103
### Validator custody

0 commit comments

Comments
 (0)