Skip to content

Conversation

@iovoid
Copy link
Contributor

@iovoid iovoid commented Nov 26, 2025

Motivation

The PrecompileError enum had two variants that were not in use. One of them, KzgError, contained a string which caused the size of the PrecompileError enum to increase.

Description

This PR removes the unused variants, causing both PrecompileError and ExceptionalHalt (which used PrecompileError) to shrink from 24 bytes to just one.

@iovoid iovoid requested a review from a team as a code owner November 26, 2025 15:32
@github-actions github-actions bot added the levm Lambda EVM implementation label Nov 26, 2025
@github-actions
Copy link

Lines of code report

Total lines added: 0
Total lines removed: 4
Total lines changed: 4

Detailed view
+-------------------------------------+-------+------+
| File                                | Lines | Diff |
+-------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/errors.rs | 230   | -4   |
+-------------------------------------+-------+------+

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Nov 26, 2025
@github-actions
Copy link

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 2.787 ± 0.013 2.769 2.818 1.00
main_levm_BubbleSort 2.863 ± 0.013 2.851 2.896 1.03 ± 0.01
pr_revm_BubbleSort 2.794 ± 0.031 2.769 2.876 1.00 ± 0.01
pr_levm_BubbleSort 2.864 ± 0.019 2.853 2.917 1.03 ± 0.01

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 923.7 ± 12.9 912.7 943.6 1.01 ± 0.02
main_levm_ERC20Approval 1015.6 ± 3.9 1011.0 1023.7 1.11 ± 0.01
pr_revm_ERC20Approval 916.3 ± 8.7 909.3 938.9 1.00
pr_levm_ERC20Approval 1019.1 ± 5.8 1012.9 1028.1 1.11 ± 0.01

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 121.2 ± 1.7 119.9 124.8 1.00
main_levm_ERC20Mint 148.7 ± 1.4 147.3 150.9 1.23 ± 0.02
pr_revm_ERC20Mint 121.4 ± 2.0 120.0 125.1 1.00 ± 0.02
pr_levm_ERC20Mint 148.1 ± 0.7 147.2 149.4 1.22 ± 0.02

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 217.0 ± 3.2 214.7 225.3 1.00 ± 0.02
main_levm_ERC20Transfer 258.9 ± 1.9 256.8 262.4 1.19 ± 0.02
pr_revm_ERC20Transfer 217.0 ± 2.4 215.0 222.7 1.00
pr_levm_ERC20Transfer 259.1 ± 1.5 256.8 260.9 1.19 ± 0.02

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 184.6 ± 1.3 183.0 187.2 1.00
main_levm_Factorial 217.4 ± 2.8 215.7 225.2 1.18 ± 0.02
pr_revm_Factorial 184.7 ± 1.5 183.0 188.0 1.00 ± 0.01
pr_levm_Factorial 216.9 ± 2.9 215.1 225.1 1.18 ± 0.02

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.337 ± 0.034 1.258 1.367 1.00
main_levm_FactorialRecursive 6.329 ± 0.068 6.254 6.473 4.74 ± 0.13
pr_revm_FactorialRecursive 1.345 ± 0.022 1.321 1.378 1.01 ± 0.03
pr_levm_FactorialRecursive 6.294 ± 0.070 6.173 6.398 4.71 ± 0.13

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 154.7 ± 4.5 152.1 166.8 1.00 ± 0.04
main_levm_Fibonacci 202.0 ± 5.0 197.5 209.3 1.31 ± 0.04
pr_revm_Fibonacci 154.2 ± 3.3 151.6 162.5 1.00
pr_levm_Fibonacci 199.2 ± 2.4 197.2 203.1 1.29 ± 0.03

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 722.5 ± 7.5 712.6 738.0 1.15 ± 0.02
main_levm_FibonacciRecursive 631.2 ± 6.9 621.5 647.0 1.00 ± 0.01
pr_revm_FibonacciRecursive 718.5 ± 5.1 710.5 724.9 1.14 ± 0.01
pr_levm_FibonacciRecursive 630.9 ± 5.2 623.0 641.9 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 7.9 ± 0.3 7.7 8.7 1.02 ± 0.04
main_levm_ManyHashes 8.5 ± 0.4 8.3 9.4 1.10 ± 0.05
pr_revm_ManyHashes 7.8 ± 0.0 7.7 7.8 1.00
pr_levm_ManyHashes 8.5 ± 0.1 8.4 8.7 1.09 ± 0.02

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 261.2 ± 3.2 258.0 268.6 1.22 ± 0.02
main_levm_MstoreBench 213.3 ± 1.1 211.8 215.8 1.00
pr_revm_MstoreBench 258.4 ± 0.6 257.6 259.6 1.21 ± 0.01
pr_levm_MstoreBench 213.7 ± 2.5 211.0 219.1 1.00 ± 0.01

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 243.1 ± 3.9 240.6 253.4 1.00 ± 0.02
main_levm_Push 243.2 ± 1.5 241.4 246.5 1.00 ± 0.01
pr_revm_Push 242.6 ± 0.7 241.5 243.3 1.00
pr_levm_Push 247.1 ± 7.1 241.9 260.9 1.02 ± 0.03

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 143.8 ± 3.6 142.2 153.8 1.82 ± 0.05
main_levm_SstoreBench_no_opt 78.8 ± 1.1 78.0 82.0 1.00
pr_revm_SstoreBench_no_opt 144.5 ± 4.5 141.8 156.5 1.83 ± 0.06
pr_levm_SstoreBench_no_opt 79.0 ± 2.0 77.4 84.5 1.00 ± 0.03

@JereSalo JereSalo added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit c9fd96e Nov 26, 2025
58 checks passed
@JereSalo JereSalo deleted the remove_unused_precompileerror_variants branch November 26, 2025 16:43
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

levm Lambda EVM implementation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants