You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: execution/evm/README.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Since the `PureEngineClient` relies on the Engine API, the genesis configuration
20
20
1. The genesis file must include post-merge hardfork configurations
21
21
2.`terminalTotalDifficulty` must be set to 0
22
22
3.`terminalTotalDifficultyPassed` must be set to true
23
-
4. Hardforks like `mergeNetsplitBlock`, `shanghaiTime`, `cancunTime`and `pragueTime` should be properly configured
23
+
4. Hardforks like `mergeNetsplitBlock`, `shanghaiTime`, `cancunTime`, `pragueTime`, and optionally `amsterdamTime` should be properly configured
24
24
25
25
Example of required genesis configuration:
26
26
@@ -43,18 +43,31 @@ Example of required genesis configuration:
43
43
"terminalTotalDifficultyPassed": true,
44
44
"shanghaiTime": 0,
45
45
"cancunTime": 0,
46
-
"pragueTime": 0
46
+
"pragueTime": 0,
47
+
"amsterdamTime": 0
47
48
}
48
49
}
49
50
```
50
51
51
52
Without these settings, the Engine API will not be available, and the `PureEngineClient` will not function correctly.
52
53
54
+
### Engine API Versions
55
+
56
+
ev-node uses fork-aware Engine API methods:
57
+
58
+
- Prague payloads use `engine_forkchoiceUpdatedV3`, `engine_getPayloadV4`, and `engine_newPayloadV4`.
59
+
- Osaka/Fusaka payloads fall forward from `engine_getPayloadV4` to `engine_getPayloadV5` on unsupported-fork responses.
60
+
- Amsterdam payloads use `engine_forkchoiceUpdatedV4`, `engine_getPayloadV6`, and `engine_newPayloadV5`.
61
+
62
+
ev-node auto-detects Engine API versions by retrying on unsupported-fork responses. For payload builds, it first tries `engine_forkchoiceUpdatedV3`; if the execution layer rejects that method for Amsterdam, ev-node retries `engine_forkchoiceUpdatedV4` with a deterministic `slotNumber` derived from rollup block height and caches V4 for future calls.
63
+
64
+
Amsterdam adds `slotNumber` to payload attributes and `executionPayload.blockAccessList` to built payloads. ev-node does not compute the block access list; it preserves the raw `executionPayload` returned by ev-reth and submits that object unchanged to `engine_newPayloadV5`.
65
+
53
66
### PayloadID Storage
54
67
55
68
The `PureEngineClient` maintains the `payloadID` between calls:
56
69
57
-
1. During `InitChain`, a payload ID is obtained from the Engine API via `engine_forkchoiceUpdatedV3`
70
+
1. During `InitChain`, the genesis forkchoice is acknowledged through the Engine API
58
71
2. This payload ID is stored in the client instance as `c.payloadID`
59
72
3. The stored payload ID is used in subsequent calls to `GetTxs` to retrieve the current execution payload
60
73
4. After each `ExecuteTxs` call, a new payload ID is obtained and stored for the next block
@@ -66,7 +79,7 @@ The `PureEngineClient` implements a unique approach to transaction execution:
66
79
1. In `GetTxs`, the entire execution payload is serialized to JSON and returned as the first transaction
67
80
2. In `ExecuteTxs`, this first transaction is deserialized back into an execution payload
68
81
3. The remaining transactions are added to the payload's transaction list
69
-
4. The complete payload is then submitted to the execution client via `engine_newPayloadV4`
82
+
4. The complete payload is then submitted to the execution client via the fork-appropriate `engine_newPayload` method
0 commit comments