Skip to content

Commit 23761ce

Browse files
Jihoon SongJihoon Song
authored andcommitted
Revamp and rebase to Bogota
1 parent 2d0f0f9 commit 23761ce

File tree

1 file changed

+52
-27
lines changed

1 file changed

+52
-27
lines changed
Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Engine API -- EIP-7805
1+
# Engine API -- Bogota
22

3-
Engine API changes introduced in EIP-7805.
3+
Engine API changes introduced in Bogota.
44

5-
This specification is based on and extends [Engine API - Osaka](./osaka.md) specification.
5+
This specification is based on and extends [Engine API - Amsterdam](./amsterdam.md) specification.
66

77
## Table of contents
88

@@ -11,22 +11,24 @@ This specification is based on and extends [Engine API - Osaka](./osaka.md) spec
1111

1212
- [Constants](#constants)
1313
- [Structures](#structures)
14-
- [PayloadAttributesV4](#payloadattributesv4)
14+
- [PayloadAttributesV5](#payloadattributesv5)
1515
- [Routines](#routines)
1616
- [Payload building](#payload-building)
1717
- [Methods](#methods)
18-
- [engine_newPayloadV5](#engine_newpayloadv5)
18+
- [engine_newPayloadV6](#engine_newpayloadv6)
1919
- [Request](#request)
2020
- [Response](#response)
2121
- [Specification](#specification)
2222
- [engine_getInclusionListV1](#engine_getinclusionlistv1)
2323
- [Request](#request-1)
2424
- [Response](#response-1)
2525
- [Specification](#specification-1)
26-
- [engine_forkchoiceUpdatedV4](#engine_forkchoiceupdatedv4)
26+
- [engine_forkchoiceUpdatedV5](#engine_forkchoiceupdatedv5)
2727
- [Request](#request-2)
2828
- [Response](#response-2)
2929
- [Specification](#specification-2)
30+
- [Update the methods of previous forks](#update-the-methods-of-previous-forks)
31+
- [Amsterdam API](#amsterdam-api)
3032

3133
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3234

@@ -38,15 +40,16 @@ This specification is based on and extends [Engine API - Osaka](./osaka.md) spec
3840

3941
## Structures
4042

41-
### PayloadAttributesV4
43+
### PayloadAttributesV5
4244

43-
This structure has the syntax of [`PayloadAttributesV3`](./cancun.md#payloadattributesv3) and appends a single field: `inclusionListTransactions`.
45+
This structure has the syntax of [`PayloadAttributesV4`](./amsterdam.md#payloadattributesv4) and appends a single field: `inclusionListTransactions`.
4446

4547
- `timestamp`: `QUANTITY`, 64 Bits - value for the `timestamp` field of the new payload
4648
- `prevRandao`: `DATA`, 32 Bytes - value for the `prevRandao` field of the new payload
4749
- `suggestedFeeRecipient`: `DATA`, 20 Bytes - suggested value for the `feeRecipient` field of the new payload
4850
- `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure.
4951
- `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
52+
- `slotNumber`: `QUANTITY`, 64 Bits - value for the `slotNumber` field of the new payload
5053
- `inclusionListTransactions`: `Array of DATA` - Array of transaction objects, each object is a byte list (`DATA`) representing `TransactionType || TransactionPayload` or `LegacyTransaction` as defined in [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718).
5154

5255
## Routines
@@ -55,19 +58,19 @@ This structure has the syntax of [`PayloadAttributesV3`](./cancun.md#payloadattr
5558

5659
This routine follows the same specification as [Payload building](./paris.md#payload-building) with the following changes to the processing flow:
5760

58-
1. Client software **SHOULD** take `payloadAttributes.inclusionList` into account during the payload build process. The built `ExecutionPayload` **MUST** satisfy the inclusion list constraints with respect to `payloadAttributes.inclusionList` as defined in [EIP-7805](https://eips.ethereum.org/EIPS/eip-7805).
61+
1. Client software **SHOULD** take `inclusionListTransactions` into account during the payload build process. The built `ExecutionPayload` **MUST** satisfy the inclusion list constraints with respect to `inclusionListTransactions` as defined in [EIP-7805](https://eips.ethereum.org/EIPS/eip-7805).
5962

6063
## Methods
6164

62-
### engine_newPayloadV5
65+
### engine_newPayloadV6
6366

6467
Method parameter list is extended with `inclusionListTransactions`.
6568

6669
#### Request
6770

68-
* method: `engine_newPayloadV5`
71+
* method: `engine_newPayloadV6`
6972
* params:
70-
1. `executionPayload`: [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3).
73+
1. `executionPayload`: [`ExecutionPayloadV4`](./amsterdam.md#executionpayloadv4).
7174
2. `expectedBlobVersionedHashes`: `Array of DATA`, 32 Bytes - Array of expected blob versioned hashes to validate.
7275
3. `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
7376
4. `executionRequests`: `Array of DATA` - List of execution layer triggered requests. Each list element is a `requests` byte array as defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685). The first byte of each element is the `request_type` and the remaining bytes are the `request_data`. Elements of the list **MUST** be ordered by `request_type` in ascending order. Elements with empty `request_data` **MUST** be excluded from the list.
@@ -82,52 +85,74 @@ Method parameter list is extended with `inclusionListTransactions`.
8285

8386
#### Specification
8487

85-
This method follows the same specification as [`engine_newPayloadV4`](./prague.md#engine_newpayloadv4) with the following changes:
88+
This method follows the same specification as [`engine_newPayloadV5`](./amsterdam.md#engine_newpayloadv5) with the following changes:
8689

87-
1. Client software **MUST** return `{status: INCLUSION_LIST_UNSATISFIED, latestValidHash: null, validationError: null}` if `executionPayload` fails to satisfy the inclusion list constraints with respect to `inclusionListTransactions` as defined in [EIP-7805](https://eips.ethereum.org/EIPS/eip-7805).
90+
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of the payload does not fall within the time frame of the Bogota fork.
91+
92+
2. Client software **MUST** return `{status: INCLUSION_LIST_UNSATISFIED, latestValidHash: null, validationError: null}` if `executionPayload` fails to satisfy the inclusion list constraints with respect to `inclusionListTransactions` as defined in [EIP-7805](https://eips.ethereum.org/EIPS/eip-7805).
8893

8994
### engine_getInclusionListV1
9095

9196
#### Request
9297

9398
* method: `engine_getInclusionListV1`
9499
* params:
95-
1. `parentHash`: `DATA`, 32 Bytes - parent hash which returned inclusion list should be built upon.
100+
1. `parentHash`: `DATA`, 32 Bytes - block hash of the parent block upon which the inclusion list should be built.
101+
96102
* timeout: 1s
97103

98104
#### Response
99105

100-
* result: `inclusionListTransactions`: `Array of DATA` - Array of transaction objects, each object is a byte list (`DATA`) representing `TransactionType || TransactionPayload` or `LegacyTransaction` as defined in [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718).
106+
* result: `Array of DATA` - Array of transaction objects, each object is a byte list (`DATA`) representing `TransactionType || TransactionPayload` or `LegacyTransaction` as defined in [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718).
101107
* error: code and message set in case an exception happens while getting the inclusion list.
102108

103109
#### Specification
104110

105-
1. Client software **MUST** provide a list of transactions for the inclusion list based on local view of the mempool and according to the config specifications.
111+
1. Client software **MUST** return `-38006: Unknown parent` error if a block with the given `parentHash` does not exist.
112+
113+
2. Client software **MUST** provide a list of transactions for the inclusion list based on the local view of the mempool. The strategy for selecting which transactions to include is implementation dependent.
106114

107-
2. Client software **MUST** provide a list of transactions within upperbound `MAX_BYTES_PER_INCLUSION_LIST`.
115+
3. Client software **MUST** ensure the byte length of the RLP encoding of the returned transaction list does not exceed `MAX_BYTES_PER_INCLUSION_LIST`.
108116

109-
3. Client software **MUST NOT** include any [blob transaction](https://eips.ethereum.org/EIPS/eip-4844#blob-transaction) within the provided list.
117+
4. Client software **MUST NOT** include any [blob transaction](https://eips.ethereum.org/EIPS/eip-4844#blob-transaction) in the returned transaction list.
110118

111-
4. Client software **MUST** return `-38006: Unknown parent` error if a block with the given `parentHash` does not exist.
112-
113-
### engine_forkchoiceUpdatedV4
119+
### engine_forkchoiceUpdatedV5
114120

115121
#### Request
116122

117-
* method: `engine_forkchoiceUpdatedV4`
123+
* method: `engine_forkchoiceUpdatedV5`
118124
* params:
119125
1. `forkchoiceState`: [`ForkchoiceStateV1`](./paris.md#forkchoicestatev1).
120-
2. `payloadAttributes`: `Object|null` - Instance of [`PayloadAttributesV4`](#payloadattributesv4) or `null`.
126+
2. `payloadAttributes`: `Object|null` - Instance of [`PayloadAttributesV5`](#payloadattributesv5) or `null`.
121127
* timeout: 8s
122128

123129
#### Response
124130

125-
Refer to the response for [`engine_forkchoiceUpdatedV3`](./cancun.md#engine_forkchoiceupdatedv3).
131+
Refer to the response for [`engine_forkchoiceUpdatedV4`](./amsterdam.md#engine_forkchoiceupdatedv4).
126132

127133
#### Specification
128134

129-
This method follows the same specification as [`engine_forkchoiceUpdatedV3`](./cancun.md#engine_forkchoiceupdatedv3) with the following changes to the processing flow:
135+
This method follows the same specification as [`engine_forkchoiceUpdatedV4`](./amsterdam.md#engine_forkchoiceupdatedv4) with the following changes to the processing flow:
130136

131137
1. Extend point (7) of the `engine_forkchoiceUpdatedV1` [specification](./paris.md#specification-1) by defining the following sequence of checks that **MUST** be run over `payloadAttributes`:
132138

133-
1. `payloadAttributes` matches the [`PayloadAttributesV4`](#payloadattributesv4) structure, return `-38003: Invalid payload attributes` on failure.
139+
1. `payloadAttributes` matches the [`PayloadAttributesV5`](#payloadattributesv5) structure, return `-38003: Invalid payload attributes` on failure.
140+
141+
2. `payloadAttributes.timestamp` does not fall within the time frame of the Bogota fork, return `-38005: Unsupported fork` on failure.
142+
143+
3. `payloadAttributes.timestamp` is greater than `timestamp` of a block referenced by `forkchoiceState.headBlockHash`, return `-38003: Invalid payload attributes` on failure.
144+
145+
4. If any of the above checks fails, the `forkchoiceState` update **MUST NOT** be rolled back.
146+
147+
### Update the methods of previous forks
148+
149+
#### Amsterdam API
150+
151+
For the following methods:
152+
153+
- [`engine_newPayloadV5`](./amsterdam.md#engine_newpayloadv5)
154+
- [`engine_forkchoiceUpdatedV4`](./amsterdam.md#engine_forkchoiceupdatedv4)
155+
156+
a validation **MUST** be added:
157+
158+
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload is greater than or equal to the Bogota activation timestamp.

0 commit comments

Comments
 (0)