Skip to content

Commit 8c90d88

Browse files
authored
feat: update evm execution to support prague (#2324)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for the "pragueTime" hardfork in EVM genesis configurations. - **Bug Fixes** - Updated execution client interactions to use the latest Ethereum Engine API methods for payload retrieval and submission. - **Documentation** - Improved documentation to reflect the new "pragueTime" configuration and updated API usage examples. - **Chores** - Upgraded Docker images for the EVM and execution clients to newer versions. - Updated configuration files and environment variables to align with the latest genesis hash and image versions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent bf597a7 commit 8c90d88

7 files changed

Lines changed: 15 additions & 11 deletions

File tree

apps/evm/single/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This directory contains the implementation of a single EVM sequencer using Rollk
3131
```bash
3232
./evm-single start \
3333
--evm.jwt-secret $(cat <path_to>/go-execution-evm/docker/jwttoken/jwt.hex) \
34-
--evm.genesis-hash 0x0a962a0d163416829894c89cb604ae422323bcdf02d7ea08b94d68d3e026a380 \
34+
--evm.genesis-hash 0xe720f8ec96a43a741b1ab34819acfeb029ce4f083fe73c5a08c1f6a7b17a8568 \
3535
--rollkit.node.block_time 1s \
3636
--rollkit.node.aggregator=true \
3737
--rollkit.signer.passphrase secret

apps/evm/single/chain/genesis.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"terminalTotalDifficulty": 0,
1616
"terminalTotalDifficultyPassed": true,
1717
"shanghaiTime": 0,
18-
"cancunTime": 0
18+
"cancunTime": 0,
19+
"pragueTime": 0
1920
},
2021
"nonce": "0x0",
2122
"timestamp": "0x0",

apps/evm/single/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
reth:
55
container_name: reth
66
restart: unless-stopped
7-
image: ghcr.io/paradigmxyz/reth:v1.2.1
7+
image: ghcr.io/paradigmxyz/reth:v1.4.6
88
ports:
99
- "9001:9001"
1010
- "30303:30303"
@@ -52,7 +52,7 @@ services:
5252
- EVM_ENGINE_URL=http://reth:8551
5353
- EVM_ETH_URL=http://reth:8545
5454
- EVM_JWT_SECRET=f747494bb0fb338a0d71f5f9fe5b5034c17cc988c229b59fd71e005ee692e9bf
55-
- EVM_GENESIS_HASH=0x0a962a0d163416829894c89cb604ae422323bcdf02d7ea08b94d68d3e026a380
55+
- EVM_GENESIS_HASH=0xe720f8ec96a43a741b1ab34819acfeb029ce4f083fe73c5a08c1f6a7b17a8568
5656
- EVM_BLOCK_TIME=1s
5757
- EVM_SIGNER_PASSPHRASE=secret
5858
# - DA_ADDRESS=http://localhost:26658

execution/evm/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Since the `PureEngineClient` relies on the Engine API, the genesis configuration
2020
1. The genesis file must include post-merge hardfork configurations
2121
2. `terminalTotalDifficulty` must be set to 0
2222
3. `terminalTotalDifficultyPassed` must be set to true
23-
4. Hardforks like `mergeNetsplitBlock`, `shanghaiTime`, and `cancunTime` should be properly configured
23+
4. Hardforks like `mergeNetsplitBlock`, `shanghaiTime`, `cancunTime` and `pragueTime` should be properly configured
2424

2525
Example of required genesis configuration:
2626

@@ -42,7 +42,8 @@ Example of required genesis configuration:
4242
"terminalTotalDifficulty": 0,
4343
"terminalTotalDifficultyPassed": true,
4444
"shanghaiTime": 0,
45-
"cancunTime": 0
45+
"cancunTime": 0,
46+
"pragueTime": 0
4647
}
4748
}
4849
```
@@ -65,7 +66,7 @@ The `PureEngineClient` implements a unique approach to transaction execution:
6566
1. In `GetTxs`, the entire execution payload is serialized to JSON and returned as the first transaction
6667
2. In `ExecuteTxs`, this first transaction is deserialized back into an execution payload
6768
3. The remaining transactions are added to the payload's transaction list
68-
4. The complete payload is then submitted to the execution client via `engine_newPayloadV3`
69+
4. The complete payload is then submitted to the execution client via `engine_newPayloadV4`
6970

7071
This approach ensures that:
7172

execution/evm/docker/chain/genesis.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"terminalTotalDifficulty": 0,
1616
"terminalTotalDifficultyPassed": true,
1717
"shanghaiTime": 0,
18-
"cancunTime": 0
18+
"cancunTime": 0,
19+
"pragueTime": 0
1920
},
2021
"nonce": "0x0",
2122
"timestamp": "0x0",

execution/evm/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
reth:
2222
container_name: reth
2323
restart: unless-stopped
24-
image: ghcr.io/paradigmxyz/reth:v1.2.1
24+
image: ghcr.io/paradigmxyz/reth:v1.4.6
2525
depends_on:
2626
jwt-init:
2727
condition: service_completed_successfully

execution/evm/execution.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,18 @@ func (c *EngineClient) ExecuteTxs(ctx context.Context, txs [][]byte, blockHeight
232232

233233
// get payload
234234
var payloadResult engine.ExecutionPayloadEnvelope
235-
err = c.engineClient.CallContext(ctx, &payloadResult, "engine_getPayloadV3", *forkchoiceResult.PayloadID)
235+
err = c.engineClient.CallContext(ctx, &payloadResult, "engine_getPayloadV4", *forkchoiceResult.PayloadID)
236236
if err != nil {
237237
return nil, 0, fmt.Errorf("get payload failed: %w", err)
238238
}
239239

240240
// submit payload
241241
var newPayloadResult engine.PayloadStatusV1
242-
err = c.engineClient.CallContext(ctx, &newPayloadResult, "engine_newPayloadV3",
242+
err = c.engineClient.CallContext(ctx, &newPayloadResult, "engine_newPayloadV4",
243243
payloadResult.ExecutionPayload,
244244
[]string{}, // No blob hashes
245245
c.genesisHash.Hex(),
246+
[][]byte{}, // No execution requests
246247
)
247248
if err != nil {
248249
return nil, 0, fmt.Errorf("new payload submission failed: %w", err)

0 commit comments

Comments
 (0)