Skip to content

Conversation

@SDartayet
Copy link
Contributor

Motivation

Improve the maintainability of our code with regards to future forks.

Description

The current way we handle activation timestamps and blob schedules is to have a struct field per fork. This creates maintainability issues down the line, since it requires a separate function to check if the fork is activated, a new match arm for its blobschedule, etc. This PR moves the timestamps and blob schedules into arrays, such that all that's required in the future is to modify an array containing the post-merge forks to add a new one.

Closes #issue_number

@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Nov 4, 2025
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Lines of code report

Total lines added: 13
Total lines removed: 289
Total lines changed: 302

Detailed view
+--------------------------------------------------------------+-------+------+
| File                                                         | Lines | Diff |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                       | 1302  | +1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/constants.rs                        | 13    | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/mempool.rs                          | 707   | -26  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs                          | 672   | -4   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/config/networks.rs                      | 183   | +5   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/block.rs                          | 882   | +4   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/genesis.rs                        | 713   | -239 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer/payload_builder.rs | 270   | -7   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/engine/blobs.rs                 | 139   | +2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs                          | 825   | -6   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs                               | 1515  | -6   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/environment.rs                     | 94    | +1   |
+--------------------------------------------------------------+-------+------+

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Benchmark Results Comparison

No significant difference was registered for any benchmark run.

Detailed Results

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
main_revm_BubbleSort 4.774 ± 0.037 4.744 4.871 1.04 ± 0.01
main_levm_BubbleSort 4.606 ± 0.018 4.586 4.644 1.00
pr_revm_BubbleSort 4.798 ± 0.020 4.769 4.836 1.04 ± 0.01
pr_levm_BubbleSort 4.614 ± 0.016 4.582 4.640 1.00 ± 0.01

Benchmark Results: ERC20Approval

Command Mean [s] Min [s] Max [s] Relative
main_revm_ERC20Approval 1.555 ± 0.008 1.547 1.568 1.00
main_levm_ERC20Approval 1.675 ± 0.022 1.655 1.726 1.08 ± 0.02
pr_revm_ERC20Approval 1.559 ± 0.010 1.550 1.581 1.00 ± 0.01
pr_levm_ERC20Approval 1.674 ± 0.019 1.655 1.725 1.08 ± 0.01

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 187.5 ± 1.2 186.5 189.8 1.00
main_levm_ERC20Mint 208.2 ± 2.6 206.1 214.1 1.11 ± 0.02
pr_revm_ERC20Mint 187.8 ± 0.9 187.1 189.7 1.00 ± 0.01
pr_levm_ERC20Mint 208.1 ± 2.5 205.7 212.5 1.11 ± 0.02

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 356.5 ± 2.2 354.8 362.1 1.00
main_levm_ERC20Transfer 390.9 ± 1.7 388.8 394.2 1.10 ± 0.01
pr_revm_ERC20Transfer 356.6 ± 1.3 355.3 359.2 1.00 ± 0.01
pr_levm_ERC20Transfer 395.1 ± 4.6 391.7 406.9 1.11 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 240.3 ± 0.5 239.7 241.4 1.00
main_levm_Factorial 278.3 ± 1.8 276.8 283.0 1.16 ± 0.01
pr_revm_Factorial 244.9 ± 4.6 242.3 257.4 1.02 ± 0.02
pr_levm_Factorial 280.4 ± 2.3 278.6 285.6 1.17 ± 0.01

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.662 ± 0.038 1.601 1.714 1.00
main_levm_FactorialRecursive 8.607 ± 0.053 8.499 8.682 5.18 ± 0.12
pr_revm_FactorialRecursive 1.671 ± 0.036 1.633 1.754 1.01 ± 0.03
pr_levm_FactorialRecursive 8.590 ± 0.035 8.544 8.652 5.17 ± 0.12

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 214.7 ± 1.3 212.9 217.8 1.00
main_levm_Fibonacci 263.2 ± 4.0 256.3 268.7 1.23 ± 0.02
pr_revm_Fibonacci 216.5 ± 0.6 215.8 217.7 1.01 ± 0.01
pr_levm_Fibonacci 264.8 ± 3.1 260.4 272.0 1.23 ± 0.02

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 868.1 ± 4.2 861.9 873.4 1.12 ± 0.01
main_levm_FibonacciRecursive 796.1 ± 24.7 780.9 861.2 1.02 ± 0.03
pr_revm_FibonacciRecursive 869.2 ± 6.5 856.1 877.8 1.12 ± 0.01
pr_levm_FibonacciRecursive 778.0 ± 7.0 769.5 795.1 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 12.6 ± 0.1 12.4 12.7 1.00
main_levm_ManyHashes 13.8 ± 0.2 13.6 14.1 1.10 ± 0.01
pr_revm_ManyHashes 12.6 ± 0.0 12.5 12.7 1.00 ± 0.01
pr_levm_ManyHashes 13.8 ± 0.1 13.7 13.9 1.10 ± 0.01

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 274.2 ± 0.9 272.8 275.4 1.03 ± 0.03
main_levm_MstoreBench 266.9 ± 8.7 262.8 291.6 1.00
pr_revm_MstoreBench 273.7 ± 1.8 272.5 278.6 1.03 ± 0.03
pr_levm_MstoreBench 270.2 ± 12.1 262.9 293.1 1.01 ± 0.06

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 299.9 ± 1.2 298.2 302.0 1.00 ± 0.00
main_levm_Push 315.5 ± 13.3 308.6 352.9 1.05 ± 0.04
pr_revm_Push 299.4 ± 0.7 298.3 300.3 1.00
pr_levm_Push 310.5 ± 2.0 308.1 315.1 1.04 ± 0.01

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 221.5 ± 6.1 219.4 238.7 2.49 ± 0.07
main_levm_SstoreBench_no_opt 90.6 ± 2.4 88.4 94.9 1.02 ± 0.03
pr_revm_SstoreBench_no_opt 219.7 ± 1.3 218.7 223.3 2.47 ± 0.03
pr_levm_SstoreBench_no_opt 89.1 ± 1.1 88.2 91.2 1.00

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

Labels

L1 Ethereum client L2 Rollup client

Projects

Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants