feat: update evm execution to support prague - #2324
Conversation
WalkthroughThis update introduces support for the "pragueTime" hardfork in EVM genesis configurations and documentation, upgrades the Changes
Sequence Diagram(s)sequenceDiagram
participant Sequencer
participant EngineClient
participant ExecutionEngine
Sequencer->>EngineClient: ExecuteTxs()
EngineClient->>ExecutionEngine: engine_getPayloadV4(payload_id)
ExecutionEngine-->>EngineClient: payload_v4
EngineClient->>ExecutionEngine: engine_newPayloadV4(payload_v4, [])
ExecutionEngine-->>EngineClient: status
EngineClient-->>Sequencer: result
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/evm/single/README.md(1 hunks)apps/evm/single/chain/genesis.json(1 hunks)apps/evm/single/docker-compose.yml(2 hunks)execution/evm/README.md(3 hunks)execution/evm/docker/chain/genesis.json(1 hunks)execution/evm/docker/docker-compose.yml(1 hunks)execution/evm/execution.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (10)
apps/evm/single/README.md (1)
34-34: Verify genesis hash consistency.Ensure the updated
--evm.genesis-hashvalue (0xe720f8ec96a43a741b1ab34819acfeb029ce4f083fe73c5a08c1f6a7b17a8568) matches the actual hash ofapps/evm/single/chain/genesis.jsonafter addingpragueTime.execution/evm/docker/chain/genesis.json (1)
18-19: AddpragueTimehardfork activation timestamp.The new
"pragueTime": 0field alongside"cancunTime": 0correctly extends the post-merge configuration for the Prague upgrade.execution/evm/docker/docker-compose.yml (1)
24-24: Bumprethimage to v1.4.6.Updating to
ghcr.io/paradigmxyz/reth:v1.4.6is necessary for Prague support—please verify that this version includes the required Engine API v4 and genesis compatibility.apps/evm/single/chain/genesis.json (1)
18-19: MirrorpragueTimeaddition in single sequencer genesis.The JSON now includes both
"cancunTime": 0and"pragueTime": 0, aligning this chain with the updated fork schedule.execution/evm/README.md (3)
23-23: DocumentpragueTimein genesis requirements.The checklist now correctly mentions
pragueTimealongside other post-merge settings.
45-46: Update example genesis JSON snippet.The code block now reflects the additions of
"cancunTime": 0and"pragueTime": 0, keeping examples in sync with configuration.
69-69: Switch to Engine API v4 payload submission.Documenting
engine_newPayloadV4ensures the guide matches the implementation changes inexecution/evm/execution.go. Verify no remaining v3 references persist.apps/evm/single/docker-compose.yml (2)
55-55:Details
❓ Verification inconclusive
Verify the updated genesis hash matches the new genesis configuration.
The genesis hash has been updated, which suggests the genesis configuration now includes Prague hardfork parameters. Ensure this hash corresponds to the correct genesis configuration with
"pragueTime": 0.
🏁 Script executed:
#!/bin/bash # Description: Verify genesis hash matches the genesis configuration # Expected: The hash should correspond to a genesis config with pragueTime # Find and examine genesis configuration files fd -e json genesis | head -5 | xargs -I {} sh -c 'echo "=== {} ==="; cat {}'Length of output: 2350
Verify the genesis hash against the updated config
Both
apps/evm/single/chain/genesis.jsonandexecution/evm/docker/chain/genesis.jsoninclude"pragueTime": 0Please compute the canonical JSON hash and ensure it matches the value in your Docker Compose:
# Example using jq + keccak-256sum jq -S . apps/evm/single/chain/genesis.json | tr -d '\n' \ | keccak-256sum \ | awk '{print "0x"$1}'Verify that this output equals
0xe720f8ec96a43a741b1ab34819acfeb029ce4f083fe73c5a08c1f6a7b17a8568.
If it does, the update is correct.
7-7:Details
❓ Verification inconclusive
Verify reth v1.4.6 supports Prague hardfork and is compatible.
The image version is updated from v1.2.1 to v1.4.6, which is a significant jump. Ensure this version supports the Prague hardfork features and verify there are no breaking changes that could affect the current configuration.
🌐 Web query:
Does reth v1.4.6 support Ethereum Prague hardfork and what are the key changes from v1.2.1?💡 Result:
Based on the search results, there is no specific mention of Reth v1.4.6 or its features regarding the Ethereum Prague hardfork. The most recent version mentioned in the search results is Reth v1.3.10[1]. However, I can provide information about Reth's position on the Prague hardfork and what we know about recent Reth versions.
Reth and the Prague Hardfork
Reth is actively preparing for the Prague hardfork, which is expected to be implemented on Ethereum testnets by Q3 2024 and on the mainnet by the end of 2024[3][5]. The Paradigm Reth team has expressed their views on which EIPs (Ethereum Improvement Proposals) should be included in Prague, but there's no confirmation that v1.4.6 specifically supports this upcoming hardfork.
The Paradigm Reth team has indicated they are committed to contributing to the Prague/Electra hardfork development[8]. They've outlined several priorities for Prague including:
- Support for staking-related EIPs, particularly EIP-7002 which enables trustless re-staking and staking pools[3][5]
- Independent EVM changes[5]
- Priority EIPs: 7002, 6110, and 2537[5][9]
Recent Reth Versions
The search results mention several recent versions of Reth:
- Reth v1.3.10 - The latest version mentioned in the search results, which contains various bug fixes[1].
- Reth v1.3.6 - An earlier version with some refactoring and fixes[1].
- Reth v1.3.5 - Released on April 2[1].
The Reth team announced a Beta version in March 2024, indicating they intended to release Reth 1.0 by the end of Q2 2024 as their first production-ready release recommended for staking operations[8].
Key Changes in Recent Versions
Since v1.2.1 is not specifically mentioned in the search results, I cannot provide a direct comparison. However, for Reth v1.3.10, the release notes mention several changes including:
- Addition of the CLI
--rpc.txfeecapflag- Lower backoff duration for trusted or static peers
- Prague activation in custom-evm example
- Configuration for reserved CPU cores
- Exemption of static peers from removal
- Various fixes for code hash in code override, CompactEnvelope, and other components[1]
Reth also appears to be preparing for the upcoming "opstack isthmus hardfork" as mentioned in the release notes[1].
For users considering adoption, Reth has recommended different priorities for updates based on user class. For v1.3.10, both Payload Builders and Non-Payload Builders are advised to update with "High" priority[1].
In summary, while Reth is actively working on Prague hardfork support, there is no specific information about v1.4.6 or a direct comparison with v1.2.1 in the search results.
Citations:
- 1: https://github.com/paradigmxyz/reth/releases
- 2: paradigmxyz/reth#7363
- 3: https://www.paradigm.xyz/2024/01/ethereum-2024
- 4: https://reth.rs/docs/reth_ethereum_forks/index.html
- 5: https://www.aicoin.com/en/article/385834
- 6: https://www.binance.com/en/square/post/2894531945769
- 7: https://www.binance.com/en/square/post/2024-01-18-paradigm-reth-2024-prague-2894566515898
- 8: https://www.paradigm.xyz/2024/03/reth-beta
- 9: https://www.theblockbeats.info/en/news/50053
- 10: https://reth.rs/docs/reth/chainspec/index.html
Verify Reth v1.4.6 Compatibility and Genesis Hash
I wasn’t able to find official confirmation that v1.4.6 includes Prague hardfork support or details on breaking changes since v1.2.1. Please manually confirm the following before merging:
- Review the Reth v1.4.6 release notes (e.g. on GitHub or in the Docker image’s documentation) to ensure all required Prague/EIP-7002, 6110, 2537 changes are present.
- Spin up the container (
docker-compose up) and runreth --versionor inspect the binary’s help text for Prague-related flags.- Verify the updated genesis hash on line 55 matches your new chainspec (you can compute it via
reth chainspec hash path/to/chainspec.json).execution/evm/execution.go (1)
235-235: LGTM: Correct upgrade to Engine API V4.The upgrade from
engine_getPayloadV3toengine_getPayloadV4is appropriate for Prague hardfork support.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2324 +/- ##
==========================================
- Coverage 53.54% 53.54% -0.01%
==========================================
Files 82 82
Lines 7326 7327 +1
==========================================
Hits 3923 3923
- Misses 2989 2990 +1
Partials 414 414 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Overview
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores