Skip to content
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

Engine API: validate blob versioned hashes #407

Merged
merged 5 commits into from
May 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/engine/experimental/blob-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
- [Methods](#methods)
- [engine_newPayloadV3](#engine_newpayloadv3)
- [Request](#request)
- [Specification](#specification)
- [Response](#response)
- [Specification](#specification)
- [engine_getPayloadV3](#engine_getpayloadv3)
- [Request](#request-1)
- [Response](#response-1)
Expand Down Expand Up @@ -67,15 +67,18 @@ The fields are encoded as follows:
- `ExecutionPayloadV2` **MUST** be used if the `timestamp` value is greater or equal to the Shanghai and lower than the EIP-4844 activation timestamp,
- `ExecutionPayloadV3` **MUST** be used if the `timestamp` value is greater or equal to the EIP-4844 activation timestamp,
- Client software **MUST** return `-32602: Invalid params` error if the wrong version of the structure is used in the method call.

#### Specification

Refer to the specification for `engine_newPayloadV2`.
2. `Array of DATA`, 32 Bytes - Array of blob versioned hashes to validate.

#### Response

Refer to the response for `engine_newPayloadV2`.

#### Specification

This method follows the same specification as `engine_newPayloadV2` with the addition of the following:

1. Client software **MUST** validate blob versioned hashes array as being equal to the corresponding array obtained from transactions of the [`BLOB_TX_TYPE`](https://eips.ethereum.org/EIPS/eip-4844#new-transaction-type) type contained by the payload respecting the order of their inclusion. Client software **MUST** run this validation in all cases even if this branch or any other branches of the block tree are in an active sync process and return `{status: INVALID, latestValidHash: null, validationError: errorMessage | null}` if it fails.
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

### engine_getPayloadV3

The response of this method is extended with [`BlobsBundleV1`](#blobsbundlev1) containing the blobs, their respective KZG commitments
Expand Down