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 295e05b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
11 changes: 3 additions & 8 deletions src/engine/openrpc/methods/payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,10 @@
required: true
schema:
$ref: '#/components/schemas/hash32'
- name: Execution requests
- name: Execution requests hash
required: true
schema:
type: array
items:
$ref: '#/components/schemas/bytes'
$ref: '#/components/schemas/hash32'
result:
name: Payload status
schema:
Expand Down Expand Up @@ -264,10 +262,7 @@
- name: Root of the parent beacon block
value: '0x169630f535b4a41330164c6e5c92b1224c0c407f582d407d0ac3d206cd32fd52'
- name: Execution requests
value:
- '0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9003f5102dabe0a27b1746098d1dc17a5d3fbd478759fea9287e4e419b3c3cef20100000000000000b1acdb2c4d3df3f1b8d3bfd33421660df358d84d78d16c4603551935f4b67643373e7eb63dcb16ec359be0ec41fee33b03a16e80745f2374ff1d3c352508ac5d857c6476d3c3bcf7e6ca37427c9209f17be3af5264c0e2132b3dd1156c28b4e9f000000000000000a5c85a60ba2905c215f6a12872e62b1ee037051364244043a5f639aa81b04a204c55e7cc851f29c7c183be253ea1510b001db70c485b6264692f26b8aeaab5b0c384180df8e2184a21a808a3ec8e86ca01000000000000009561731785b48cf1886412234531e4940064584463e96ac63a1a154320227e333fb51addc4a89b7e0d3f862d7c1fd4ea03bd8eb3d8806f1e7daf591cbbbb92b0beb74d13c01617f22c5026b4f9f9f294a8a7c32db895de3b01bee0132c9209e1f100000000000000'
- '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0000000000000000000000000000000000000000000000000000010f698daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a75530100000000000000'
- '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d098daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
value: '0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9003f5102dabe0a27b1746098d1dc17a5d3fbd478759fea9287e4e419b3c3cef20100000000000000b1acdb2c4d3df3f1b8d3bfd33421660df358d84d78d16c4603551935f4b67643373e7eb63dcb16ec359be0ec41fee33b03a16e80745f2374ff1d3c352508ac5d857c6476d3c3bcf7e6ca37427c9209f17be3af5264c0e2132b3dd1156c28b4e9f000000000000000a5c85a60ba2905c215f6a12872e62b1ee037051364244043a5f639aa81b04a204c55e7cc851f29c7c183be253ea1510b001db70c485b6264692f26b8aeaab5b0c384180df8e2184a21a808a3ec8e86ca01000000000000009561731785b48cf1886412234531e4940064584463e96ac63a1a154320227e333fb51addc4a89b7e0d3f862d7c1fd4ea03bd8eb3d8806f1e7daf591cbbbb92b0beb74d13c01617f22c5026b4f9f9f294a8a7c32db895de3b01bee0132c9209e1f100000000000000'
result:
name: Payload status
value:
Expand Down
11 changes: 3 additions & 8 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,10 +47,7 @@ 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

Expand Down

0 comments on commit 295e05b

Please sign in to comment.