Skip to content

Conversation

@xqft
Copy link
Contributor

@xqft xqft commented Nov 27, 2025

Motivation

To implement the Pico zkVM as a backend for L1 proving.

A particularity of Pico is that it requires compiling ethrex-prover in nightly (if the pico feature flag is enabled). This also propagates into ethrex-replay.

@github-actions github-actions bot added the L2 Rollup client label Nov 27, 2025
@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Lines of code report

Total lines added: 89
Total lines removed: 0
Total lines changed: 89

Detailed view
+----------------------------------------------------------------+-------+------+
| File                                                           | Lines | Diff |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backend/mod.rs                     | 62    | +8   |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backend/pico.rs                    | 41    | +41  |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/build.rs             | 213   | +20  |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/src/lib.rs           | 29    | +4   |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/src/pico/src/main.rs | 10    | +10  |
+----------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/lib.rs                             | 64    | +6   |
+----------------------------------------------------------------+-------+------+

@github-actions
Copy link

github-actions bot commented Nov 27, 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.998 ± 0.025 2.965 3.030 1.00 ± 0.02
main_levm_BubbleSort 3.103 ± 0.026 3.080 3.149 1.04 ± 0.02
pr_revm_BubbleSort 2.987 ± 0.051 2.945 3.091 1.00
pr_levm_BubbleSort 3.094 ± 0.027 3.070 3.152 1.04 ± 0.02

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 967.7 ± 8.5 958.1 984.5 1.00
main_levm_ERC20Approval 1092.7 ± 1.9 1090.3 1095.6 1.13 ± 0.01
pr_revm_ERC20Approval 979.2 ± 26.7 958.1 1031.4 1.01 ± 0.03
pr_levm_ERC20Approval 1089.9 ± 8.9 1078.5 1111.9 1.13 ± 0.01

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 132.7 ± 1.1 131.3 134.1 1.01 ± 0.01
main_levm_ERC20Mint 165.5 ± 1.4 163.4 167.7 1.26 ± 0.01
pr_revm_ERC20Mint 131.4 ± 0.7 130.6 132.5 1.00
pr_levm_ERC20Mint 164.1 ± 1.4 162.4 167.0 1.25 ± 0.01

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 232.7 ± 4.9 226.8 240.5 1.01 ± 0.02
main_levm_ERC20Transfer 280.2 ± 5.1 276.1 294.0 1.22 ± 0.03
pr_revm_ERC20Transfer 229.4 ± 2.3 226.9 234.5 1.00
pr_levm_ERC20Transfer 276.0 ± 1.8 272.9 279.5 1.20 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 225.3 ± 0.5 224.4 226.4 1.01 ± 0.00
main_levm_Factorial 272.3 ± 2.0 270.8 276.3 1.22 ± 0.01
pr_revm_Factorial 223.9 ± 0.6 223.1 225.0 1.00
pr_levm_Factorial 270.8 ± 1.3 269.8 274.4 1.21 ± 0.01

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.662 ± 0.052 1.537 1.732 1.00
main_levm_FactorialRecursive 8.263 ± 0.036 8.208 8.327 4.97 ± 0.16
pr_revm_FactorialRecursive 1.682 ± 0.026 1.632 1.721 1.01 ± 0.04
pr_levm_FactorialRecursive 8.281 ± 0.039 8.218 8.359 4.98 ± 0.16

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 207.3 ± 2.3 206.1 213.7 1.01 ± 0.01
main_levm_Fibonacci 268.8 ± 4.5 259.6 278.7 1.31 ± 0.02
pr_revm_Fibonacci 205.5 ± 0.8 204.2 207.2 1.00
pr_levm_Fibonacci 265.4 ± 1.6 263.8 268.5 1.29 ± 0.01

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 877.1 ± 6.9 862.9 884.2 1.17 ± 0.02
main_levm_FibonacciRecursive 747.7 ± 9.0 730.7 761.1 1.00
pr_revm_FibonacciRecursive 867.7 ± 8.1 849.5 875.8 1.16 ± 0.02
pr_levm_FibonacciRecursive 751.4 ± 4.7 745.6 759.7 1.00 ± 0.01

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.2 ± 0.8 8.8 11.4 1.11 ± 0.10
pr_revm_ManyHashes 8.3 ± 0.1 8.2 8.4 1.00 ± 0.01
pr_levm_ManyHashes 9.0 ± 0.1 8.9 9.2 1.09 ± 0.01

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 266.0 ± 6.3 260.4 280.4 1.10 ± 0.03
main_levm_MstoreBench 242.9 ± 2.4 240.6 248.5 1.00 ± 0.02
pr_revm_MstoreBench 262.6 ± 3.9 258.4 268.3 1.08 ± 0.02
pr_levm_MstoreBench 242.5 ± 3.3 239.1 251.4 1.00

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 293.5 ± 1.6 291.0 295.6 1.01 ± 0.01
main_levm_Push 294.0 ± 0.7 292.9 295.2 1.01 ± 0.01
pr_revm_Push 292.0 ± 1.4 289.2 295.2 1.00
pr_levm_Push 305.3 ± 0.9 304.3 306.7 1.05 ± 0.01

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 167.1 ± 4.6 160.9 177.5 1.88 ± 0.06
main_levm_SstoreBench_no_opt 90.0 ± 1.7 87.9 92.0 1.02 ± 0.02
pr_revm_SstoreBench_no_opt 165.7 ± 3.6 160.4 168.9 1.87 ± 0.05
pr_levm_SstoreBench_no_opt 88.7 ± 1.2 87.6 92.0 1.00

@xqft xqft marked this pull request as ready for review November 28, 2025 19:04
@xqft xqft requested a review from ManuelBilbao as a code owner November 28, 2025 19:04
Copilot AI review requested due to automatic review settings November 28, 2025 19:04
@xqft xqft requested review from a team and avilagaston9 as code owners November 28, 2025 19:04
Copilot finished reviewing on behalf of xqft November 28, 2025 19:05
@xqft xqft changed the title feat(l2): add support for Pico backend feat(prover): add support for Pico backend Nov 28, 2025
@github-actions github-actions bot removed the L2 Rollup client label Nov 28, 2025
@xqft xqft changed the title feat(prover): add support for Pico backend feat(l2): add support for Pico backend Nov 28, 2025
@github-actions github-actions bot added the L2 Rollup client label Nov 28, 2025
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 adds support for the Pico zkVM backend to the ethrex L2 prover infrastructure. Pico requires compilation with nightly Rust, which propagates the nightly requirement to ethrex-prover and ethrex-replay when the pico feature flag is enabled.

Key Changes:

  • Added Pico backend implementation with prove, execute, and verify functions
  • Integrated Pico guest program with rkyv serialization
  • Updated CI workflows to support Pico compilation and testing
  • Modified KZG API calls to use new from_slice methods

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
crates/l2/prover/src/backend/pico.rs New Pico backend implementation with prove/execute/verify functions
crates/l2/prover/src/guest_program/src/pico/src/main.rs Pico guest program entry point using pico_sdk
crates/l2/prover/src/guest_program/src/pico/Cargo.toml Dependencies for Pico guest program with patches for compatibility
crates/l2/prover/src/guest_program/build.rs Build script to compile Pico program using cargo pico
crates/vm/levm/Cargo.toml Added pico feature flag for LEVM
crates/common/crypto/kzg.rs Updated kzg-rs API calls to use from_slice constructors
.github/workflows/tag_release.yaml CI pipeline for building and releasing Pico artifacts
.github/workflows/pr-main_l2_prover.yaml PR validation workflow for Pico backend

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

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

Labels

L2 Rollup client

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants