Skip to content

Conversation

@JereSalo
Copy link
Contributor

@JereSalo JereSalo commented Nov 7, 2025

Motivation

Description

  • Go back to using ark_bn254 for risc0

Created issue to fix it in another moment as it is not a priority right now, it should be low hanging though #5241

@JereSalo JereSalo self-assigned this Nov 7, 2025
@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Nov 7, 2025
@JereSalo JereSalo marked this pull request as ready for review November 7, 2025 21:27
@JereSalo JereSalo requested a review from a team as a code owner November 7, 2025 21:27
Copilot AI review requested due to automatic review settings November 7, 2025 21:27
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Lines of code report

Total lines added: 0
Total lines removed: 3
Total lines changed: 3

Detailed view
+------------------------------------------+-------+------+
| File                                     | Lines | Diff |
+------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/precompiles.rs | 1645  | -3   |
+------------------------------------------+-------+------+

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes RISC0-specific support from the bn254_g1_mul precompile function, consolidating it to only support the SP1 feature flag for the substrate-bn implementation.

  • Simplified feature flag conditionals for bn254_g1_mul to only check for sp1 instead of both sp1 and risc0
  • Removed RISC0-specific workaround code that handled differences in substrate-bn's multiplication API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JereSalo JereSalo enabled auto-merge November 7, 2025 21:32
@github-actions
Copy link

github-actions bot commented Nov 7, 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 2.988 ± 0.019 2.965 3.017 1.00 ± 0.01
main_levm_BubbleSort 3.275 ± 0.012 3.258 3.296 1.10 ± 0.01
pr_revm_BubbleSort 2.978 ± 0.008 2.967 2.991 1.00
pr_levm_BubbleSort 3.213 ± 0.039 3.192 3.321 1.08 ± 0.01

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 977.5 ± 11.3 967.5 999.8 1.00
main_levm_ERC20Approval 1161.7 ± 9.7 1149.4 1177.1 1.19 ± 0.02
pr_revm_ERC20Approval 978.3 ± 10.4 970.6 1006.1 1.00 ± 0.02
pr_levm_ERC20Approval 1156.8 ± 11.6 1146.8 1181.4 1.18 ± 0.02

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 131.9 ± 0.9 131.0 134.2 1.00
main_levm_ERC20Mint 170.8 ± 1.1 169.1 172.0 1.30 ± 0.01
pr_revm_ERC20Mint 132.4 ± 1.3 131.0 135.5 1.00 ± 0.01
pr_levm_ERC20Mint 169.9 ± 1.4 168.1 172.0 1.29 ± 0.01

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 231.0 ± 2.3 229.1 235.9 1.00 ± 0.01
main_levm_ERC20Transfer 290.4 ± 3.1 287.0 294.7 1.26 ± 0.01
pr_revm_ERC20Transfer 230.8 ± 1.0 229.4 232.0 1.00
pr_levm_ERC20Transfer 286.2 ± 2.0 283.5 289.0 1.24 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 222.6 ± 0.6 221.3 223.4 1.00
main_levm_Factorial 281.2 ± 9.2 273.8 298.9 1.26 ± 0.04
pr_revm_Factorial 224.4 ± 1.2 222.8 226.7 1.01 ± 0.01
pr_levm_Factorial 281.4 ± 17.6 272.5 326.4 1.26 ± 0.08

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.616 ± 0.033 1.565 1.680 1.01 ± 0.03
main_levm_FactorialRecursive 8.539 ± 0.129 8.470 8.903 5.35 ± 0.14
pr_revm_FactorialRecursive 1.596 ± 0.035 1.523 1.633 1.00
pr_levm_FactorialRecursive 8.556 ± 0.105 8.475 8.830 5.36 ± 0.13

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 203.8 ± 2.3 202.1 210.2 1.00 ± 0.01
main_levm_Fibonacci 261.8 ± 2.7 258.8 265.5 1.29 ± 0.02
pr_revm_Fibonacci 203.4 ± 1.4 200.9 204.7 1.00
pr_levm_Fibonacci 263.1 ± 3.7 256.2 266.3 1.29 ± 0.02

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 826.7 ± 6.2 819.5 839.6 1.07 ± 0.02
main_levm_FibonacciRecursive 781.5 ± 6.8 773.6 792.0 1.01 ± 0.02
pr_revm_FibonacciRecursive 836.9 ± 9.0 823.5 855.8 1.08 ± 0.02
pr_levm_FibonacciRecursive 774.5 ± 14.2 758.7 804.3 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 8.2 ± 0.0 8.2 8.3 1.00
main_levm_ManyHashes 9.9 ± 0.1 9.8 10.2 1.21 ± 0.02
pr_revm_ManyHashes 8.3 ± 0.1 8.2 8.5 1.01 ± 0.01
pr_levm_ManyHashes 9.6 ± 0.1 9.4 9.9 1.16 ± 0.02

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 265.1 ± 5.7 260.6 275.6 1.12 ± 0.03
main_levm_MstoreBench 237.2 ± 1.6 234.5 239.8 1.00
pr_revm_MstoreBench 265.0 ± 5.8 260.4 277.1 1.12 ± 0.03
pr_levm_MstoreBench 237.2 ± 2.6 234.1 241.4 1.00 ± 0.01

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 293.8 ± 1.3 291.5 295.5 1.00
main_levm_Push 319.9 ± 1.2 318.1 322.3 1.09 ± 0.01
pr_revm_Push 294.4 ± 1.1 292.3 295.7 1.00 ± 0.01
pr_levm_Push 312.0 ± 5.1 308.0 325.8 1.06 ± 0.02

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 168.5 ± 7.7 161.1 183.7 1.88 ± 0.10
main_levm_SstoreBench_no_opt 89.9 ± 2.2 87.8 92.9 1.00 ± 0.04
pr_revm_SstoreBench_no_opt 165.7 ± 3.6 160.9 171.1 1.85 ± 0.07
pr_levm_SstoreBench_no_opt 89.6 ± 2.6 87.3 95.4 1.00

@JereSalo JereSalo added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit a6c7501 Nov 7, 2025
68 checks passed
@JereSalo JereSalo deleted the try_fix_replay_risc0 branch November 7, 2025 22:26
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 7, 2025
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Nov 7, 2025
xqft pushed a commit that referenced this pull request Nov 11, 2025
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->
- Go back to using `ark_bn254` for risc0

Created issue to fix it in another moment as it is not a priority right
now, it should be low hanging though
#5241
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: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants