Skip to content

Commit

Permalink
engine: send only execution requests hash commitment instead of full …
Browse files Browse the repository at this point in the history
…requests
  • Loading branch information
lightclient committed Oct 7, 2024
1 parent 48de028 commit fbb5de1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 32 deletions.
28 changes: 9 additions & 19 deletions src/engine/openrpc/methods/payload.yaml

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions src/engine/prague.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp

### engine_newPayloadV4

Method parameter list is extended with `executionRequests`.
Method parameter list is extended with `executionRequestsHash`.

#### Request

Expand All @@ -35,9 +35,7 @@ Method parameter list is extended with `executionRequests`.
1. `executionPayload`: [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3).
2. `expectedBlobVersionedHashes`: `Array of DATA`, 32 Bytes - Array of expected blob versioned hashes to validate.
3. `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
4. `executionRequests`: `Array of DATA` - List of execution layer triggered requests,
each element of the list represents an SSZ encoded list of requests of a certain type as it is defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685)
Elements of the list **MUST** be ordered by `requestType` in ascending order.
4. `executionRequestsHash`: `DATA`, 32 Bytes - Hash of execution layer triggered requests, defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685)

#### Response

Expand All @@ -49,14 +47,11 @@ This method follows the same specification as [`engine_newPayloadV3`](./cancun.m

1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of the payload does not fall within the time frame of the Prague fork.

2. Given the `executionRequests`, client software **MUST** compute the execution requests commitment
and incorporate it into the `blockHash` validation process.
That is, if the computed commitment does not match the corresponding commitment in the execution layer block header,
the call **MUST** return `{status: INVALID, latestValidHash: null, validationError: errorMessage | null}`.
2. Client software **MUST** incorporate the given `executionRequestsHash` into the `blockHash` validation process. That is, if the computed hash does not match the corresponding hash in the `executionPayload`, the call **MUST** return `{status: INVALID, latestValidHash: null, validationError: errorMessage | null}`.

### engine_getPayloadV4

The response of this method is extended with the `executionRequests` field.
The response of this method is extended with the `executionRequestsHash` field.

#### Request

Expand All @@ -72,7 +67,7 @@ The response of this method is extended with the `executionRequests` field.
- `blockValue` : `QUANTITY`, 256 Bits - The expected value to be received by the `feeRecipient` in wei
- `blobsBundle`: [`BlobsBundleV1`](#BlobsBundleV1) - Bundle with data corresponding to blob transactions included into `executionPayload`
- `shouldOverrideBuilder` : `BOOLEAN` - Suggestion from the execution layer to use this `executionPayload` instead of an externally provided one
- `executionRequests`: `Array of DATA` - Execution layer triggered requests obtained from the `executionPayload` transaction execution.
- `executionRequestsHash`: `DATA`, Bytes 32 - Hash of execution layer triggered requests obtained from the `executionPayload` transaction execution.
* error: code and message set in case an exception happens while getting the payload.

#### Specification
Expand All @@ -81,9 +76,7 @@ This method follows the same specification as [`engine_getPayloadV3`](./cancun.m

1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of the built payload does not fall within the time frame of the Prague fork.

2. The call **MUST** return `executionRequests` list representing execution layer triggered requests obtained from the `executionPayload` transaction execution.
Each element of the list represents an SSZ encoded list of requests of a certain type as it is defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685).
Elements of the `executionRequests` list **MUST** be ordered by the `requestType` in ascending order.
2. The call **MUST** return `executionRequestsHash` representing the corresponding execution layer header field triggered requests obtained from the `executionPayload` transaction execution.

### Update the methods of previous forks

Expand Down

0 comments on commit fbb5de1

Please sign in to comment.