Skip to content

Commit d517f2b

Browse files
mkalining11tech
andauthored
Merge getPayloadV3 and getBlobsBundleV1 (#402)
* Merge getPayloadV3 and getBlobsBundleV1 * Update src/engine/experimental/blob-extension.md Co-authored-by: g11tech <[email protected]> * kzgs -> commitments * Update src/engine/experimental/blob-extension.md --------- Co-authored-by: g11tech <[email protected]>
1 parent 3c1dae6 commit d517f2b

File tree

1 file changed

+10
-35
lines changed

1 file changed

+10
-35
lines changed

src/engine/experimental/blob-extension.md

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ This structure has the syntax of `ExecutionPayloadV2` and appends a single field
5454

5555
The fields are encoded as follows:
5656

57-
- `blockHash`: `DATA`, 32 Bytes
58-
- `kzgs`: `Array of DATA` - Array of `KZGCommitment` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844), 48 bytes each (`DATA`).
57+
- `commitments`: `Array of DATA` - Array of `KZGCommitment` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844), 48 bytes each (`DATA`).
5958
- `proofs`: `Array of DATA` - Array of `KZGProof` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844), 48 bytes each (`DATA`).
6059
- `blobs`: `Array of DATA` - Array of blobs, each blob is `FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded `Blob` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844)
6160

@@ -83,6 +82,9 @@ Refer to the response for `engine_newPayloadV2`.
8382

8483
### engine_getPayloadV3
8584

85+
The response of this method is extended with [`BlobsBundleV1`](#blobsbundlev1) containing the blobs, their respective KZG commitments
86+
and proofs corresponding to the `versioned_hashes` included in the blob transactions of the execution payload.
87+
8688
#### Request
8789

8890
* method: `engine_getPayloadV3`
@@ -98,43 +100,16 @@ Refer to the response for `engine_newPayloadV2`.
98100
- `ExecutionPayloadV2` **MUST** be returned if the payload `timestamp` is greater or equal to the Shanghai timestamp and lower than the EIP-4844 activation timestamp
99101
- `ExecutionPayloadV3` **MUST** be returned if the payload `timestamp` is greater or equal to the EIP-4844 activation timestamp
100102
- `blockValue` : `QUANTITY`, 256 Bits - The expected value to be received by the `feeRecipient` in wei
103+
- `blobsBundle`: [`BlobsBundleV1`](#BlobsBundleV1) - Bundle with data corresponding to blob transactions included into `executionPayload`
101104
* error: code and message set in case an exception happens while getting the payload.
102105

103106
#### Specification
104107

105-
Refer to the specification for `engine_getPayloadV2`.
106-
107-
### engine_getBlobsBundleV1
108-
109-
This method retrieves the blobs and their respective KZG commitments and proofs corresponding to the `versioned_hashes`
110-
included in the blob transactions of the referenced execution payload.
111-
112-
This method may be combined with `engine_getPayloadV2`.
113-
The separation of concerns aims to minimize changes during the testing phase of the EIP.
114-
115-
#### Request
116-
117-
* method: `engine_getBlobsBundleV1`
118-
* params:
119-
1. `payloadId`: `DATA`, 8 Bytes - Identifier of the payload build process
120-
* timeout: 1s
121-
122-
#### Response
123-
124-
* result: [`BlobsBundleV1`](#BlobsBundleV1)
125-
* error: code and message set in case an exception happens while getting the blobs bundle.
126-
127-
#### Specification
128-
129-
1. Given the `payloadId` client software **MUST** return the blobs bundle corresponding to the most recent version of the payload that was served with `engine_getPayload`, if any,
130-
and halt any further changes to the payload. The `engine_getBlobsBundleV1` and `engine_getPayloadV2` results **MUST** be consistent as outlined in items 3, 4 and 5 below.
131-
132-
2. The call **MUST** return `-38001: Unknown payload` error if the build process identified by the `payloadId` does not exist. Note that a payload without any blobs **MUST** return an empty `blobs` and `kzgs` list, not an error.
133-
134-
3. The call **MUST** return `kzgs` matching the versioned hashes of the transactions list of the execution payload, in the same order,
135-
i.e. `assert verify_kzgs_against_transactions(payload.transactions, bundle.kzgs)` (see EIP-4844 consensus-specs).
108+
Refer to the specification for `engine_getPayloadV2` with addition of the following:
136109

137-
4. The call **MUST** return `blobs` and `proofs` that match the `kzgs` list, i.e. `assert len(kzgs) == len(blobs) == len(proofs)` and `assert verify_blob_kzg_proof_batch(bundle.blobs, bundle.kzgs, bundle.proofs)`
110+
1. The call **MUST** return empty `blobs`, `commitments` and `proofs` if the paylaod doesn't contain any blob transactions.
138111

112+
2. The call **MUST** return `commitments` matching the versioned hashes of the transactions list of the execution payload, in the same order,
113+
i.e. `assert verify_kzg_commitments_against_transactions(payload.transactions, bundle.commitments)` (see EIP-4844 consensus-specs).
139114

140-
5. The call **MUST** return `blockHash` to reference the `blockHash` of the corresponding execution payload, intended for the caller to sanity-check the consistency with the `engine_getPayload` call.
115+
3. The call **MUST** return `blobs` and `proofs` that match the `commitments` list, i.e. `assert len(commitments) == len(blobs) == len(proofs)` and `assert verify_blob_kzg_proof_batch(bundle.blobs, bundle.commitments, bundle.proofs)`.

0 commit comments

Comments
 (0)