Skip to content

draft: replace revm execution paths with evm2#25002

Draft
onbjerg wants to merge 194 commits into
mainfrom
codex/excise-revm
Draft

draft: replace revm execution paths with evm2#25002
onbjerg wants to merge 194 commits into
mainfrom
codex/excise-revm

Conversation

@onbjerg

@onbjerg onbjerg commented Jun 8, 2026

Copy link
Copy Markdown
Member

Draft only. This is just an experiment/PoC hacky integration of evm2. This is not mergeable.

Replaces the main revm-backed execution paths with evm2 and removes the revm dependency from the workspace. This gets sync execution running through evm2, but the branch is intentionally dirty and still has several parked/stubbed paths.

Known remaining work:

  • Untangle SpecId handling.
  • Unvendor the temporary reth-core crates.
  • Misc cleanup across touched crates.
  • Untangle abstractions that are revm-specific rather than evm2-specific.
  • Re-add inspectors and re-enable stubbed features:
    • reth-bb / BAL execution paths.
    • RPC call, estimate gas, trace, debug, simulate, and bundle execution helpers.
    • Custom inspector and precompile-cache examples.
    • Payload builder / BAL hooks that were parked.
    • Invalid-block/reorg witness paths that previously relied on revm inspectors or revm state adapters.

onbjerg added 30 commits June 4, 2026 10:47
@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

This comment was marked as outdated.

@decofe

This comment was marked as outdated.

@onbjerg

onbjerg commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

derek bench blocks=500 warmup=125 baseline=main feature=codex/excise-revm bal=false cores=0 run-pairs=2 otlp=true metrics=false samply slack=always

@decofe

decofe commented Jun 8, 2026

Copy link
Copy Markdown
Member

cc @onbjerg

✅ Benchmark complete! View job

Benchmark Results

Configuration

  • Derek command: derek bench blocks=500 warmup=125 baseline=main feature=codex/excise-revm bal=false cores=0 run-pairs=2 otlp=true metrics=false slack=always samply
Metric main codex/excise-revm Change
Mean 30.24ms 116.19ms +284.25% ❌ (±0.86%, floor 1.20%)
P50 26.02ms 103.40ms +297.44% ❌ (±0.91%, floor 1.20%)
P90 46.10ms 194.23ms +321.37% ❌ (±0.69%, floor 1.35%)
P99 170.42ms 295.61ms +73.46% ❌ (±6.71%, floor 5.00%)
Mgas/s 1090.75 273.49 -74.93% ❌ (±0.47%, floor 1.20%)
Wall Clock 30.75s 117.57s +282.37% ❌ (±0.89%, floor 0.70%)
Persist Wait 26.50ms 0.12ms -99.55% ✅ (±1.55%, floor 5.00%)

500 blocks, 125 warmup, 2 run pairs

Wait Time Breakdown

Persistence Wait

Metric main codex/excise-revm
Mean 26.50ms 0.12ms
P50 0.03ms 0.03ms
P95 271.93ms 0.23ms

Trie Cache Update Wait

Metric main codex/excise-revm
Mean 0.14ms 0.06ms
P50 0.00ms 0.00ms
P95 0.76ms 0.36ms

Execution Cache Update Wait

Metric main codex/excise-revm
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Target Metrics

Metric Baseline Feature Change
reth_database_transaction_opened_total{mode="read-write"} mean 0.3158 0.5094 +61.31% ❌ (±9.86%, floor 10.00%)
reth_database_transaction_opened_total{mode="read-only"} mean 81.5475 64.7762 -20.57% ✅ (±2.22%, floor 7.50%)
reth_sync_block_validation_state_root_histogram mean 0.0021 0.0138 +553.31% ❌ (±7.17%, floor 5.00%, materiality 5.88ms)
reth_trie_proof_task_account_worker_idle_time_seconds mean 453.53ms 3155.21ms +595.71% ✅ (±1.39%, floor 7.50%)
reth_trie_proof_task_storage_worker_idle_time_seconds mean 475.22ms 3174.32ms +567.96% ✅ (±2.04%, floor 5.00%)
reth_tree_root_sparse_trie_idle_time_seconds mean 8.51ms 101.48ms +1092.29% ✅ (±2.20%, floor 7.50%, materiality 17.64ms)
reth_tree_root_hashing_task_idle_time_seconds mean 26.08ms 101.21ms +288.03% ✅ (±1.09%, floor 5.00%)
reth_database_transaction_close_duration_seconds{mode="read-write",outcome="commit"} mean 15.60ms 21.74ms +39.40% ❌ (±2.72%, floor 5.00%, materiality 16.81ms)
reth_storage_providers_database_save_blocks_commit_mdbx mean 0.0156 0.0218 +39.41% ❌ (±2.74%, floor 5.00%, materiality 15.99ms)
reth_storage_providers_database_save_blocks_commit_rocksdb mean 0.0027 0.0031 +16.57% ❌ (±2.40%, floor 2.50%, materiality 0.94ms)
reth_storage_providers_database_save_blocks_mdbx mean 32.06ms 38.18ms +19.11% ❌ (±1.15%, floor 5.00%)

Observability

Charts

Latency, Throughput & Diff

Latency, Throughput & Diff

Wait Time Breakdown

Wait Time Breakdown

Gas vs Latency

Gas vs Latency

Samply Profiles

@onbjerg

onbjerg commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

derek bench blocks=500 warmup=125 baseline=main feature=codex/excise-revm bal=false cores=0 run-pairs=1 otlp=true slack=never samply

@decofe

decofe commented Jun 8, 2026

Copy link
Copy Markdown
Member

cc @onbjerg

✅ Benchmark complete! View job

Benchmark Results

Configuration

  • Derek command: derek bench blocks=500 warmup=125 baseline=main feature=codex/excise-revm bal=false cores=0 run-pairs=1 otlp=true metrics=false slack=never samply
Metric main codex/excise-revm Change
Mean 30.29ms 101.32ms +234.49% ❌ (±10.57%, floor 1.20%)
P50 25.81ms 90.65ms +251.22% ❌ (±16.09%, floor 1.20%)
P90 45.61ms 175.47ms +284.71% ❌ (±25.79%, floor 1.35%)
P99 172.00ms 282.65ms +64.33% ❌ (±28.78%, floor 5.00%)
Mgas/s 1095.37 318.61 -70.91% ❌ (±2.34%, floor 1.20%)
Wall Clock 15.43s 51.55s +234.11% ❌ (±10.64%, floor 0.70%)
Persist Wait 26.05ms 0.07ms -99.72% ✅ (±27.32%, floor 5.00%)

500 blocks, 125 warmup, 1 run pairs

Wait Time Breakdown

Persistence Wait

Metric main codex/excise-revm
Mean 26.05ms 0.07ms
P50 0.03ms 0.03ms
P95 241.52ms 0.08ms

Trie Cache Update Wait

Metric main codex/excise-revm
Mean 0.10ms 0.04ms
P50 0.00ms 0.00ms
P95 0.59ms 0.24ms

Execution Cache Update Wait

Metric main codex/excise-revm
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Target Metrics

Metric Baseline Feature Change
reth_database_transaction_opened_total{mode="read-write"} mean 0.3206 0.5078 +58.38% ❌ (±41.81%, floor 10.00%)
reth_database_transaction_opened_total{mode="read-only"} mean 83.2692 64.8663 -22.10% ✅ (±8.12%, floor 7.50%)
reth_sync_block_validation_state_root_histogram mean 0.0021 0.0138 +556.88% ❌ (±50.56%, floor 5.00%, materiality 5.15ms)
reth_trie_proof_task_account_worker_idle_time_seconds mean 464.15ms 2711.75ms +484.24% ✅ (±61.91%, floor 7.50%)
reth_trie_proof_task_storage_worker_idle_time_seconds mean 482.67ms 2731.54ms +465.92% ✅ (±57.83%, floor 5.00%)
reth_tree_root_sparse_trie_idle_time_seconds mean 8.71ms 86.66ms +894.61% ✅ (±114.64%, floor 7.50%, materiality 15.46ms)
reth_tree_root_hashing_task_idle_time_seconds mean 26.21ms 86.35ms +229.51% ✅ (±35.39%, floor 5.00%)

Observability

Charts

Latency, Throughput & Diff

Latency, Throughput & Diff

Wait Time Breakdown

Wait Time Breakdown

Gas vs Latency

Gas vs Latency

Samply Profiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-execution-reth Related to the Execution and EVM

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants