Skip to content

Conversation

@tomip01
Copy link
Contributor

@tomip01 tomip01 commented Dec 23, 2025

Motivation

We don't want to have in main outdated Cargo.locks. This can happen if a dependency is added in a crate that is a dependency of any zkVM backend

Description

  • Add rules:
    • update-cargo-lock
    • check-cargo-lock
  • Add new workflow that runs make check-cargo-lock on every PR to ensure all Cargo.locks are up to date.

You can check a test run here

@tomip01 tomip01 changed the title add workflow and test change ci(l1,l2): add required check for outdated Cargo.lock Dec 23, 2025
@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Dec 23, 2025
@tomip01 tomip01 marked this pull request as ready for review December 23, 2025 19:59
@tomip01 tomip01 requested a review from a team as a code owner December 23, 2025 19:59
Copilot AI review requested due to automatic review settings December 23, 2025 19:59
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Dec 23, 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 a new CI check to the L1 workflow to ensure that Cargo.lock files for zkVM backends and TEE quote-gen remain up-to-date in the main branch. This prevents issues that can occur when dependencies are added to crates that are dependencies of zkVM backends, but the corresponding Cargo.lock files aren't updated.

Key changes:

  • Adds check-guest-program-cargo-lock job that runs make update-cargo-lock and verifies no diffs exist in the Cargo.lock files
  • Integrates this new job as a dependency of the all-tests required check job
Comments suppressed due to low confidence (1)

.github/workflows/pr-main_l1.yaml:350

  • The all-tests job's conditional logic and success check are incomplete. The job was updated to depend on check-guest-program-cargo-lock, but:
  1. The if condition at line 338 doesn't check if check-guest-program-cargo-lock was skipped (unlike the checks for run-assertoor and run-hive)
  2. The steps section (lines 340-350) doesn't verify that check-guest-program-cargo-lock succeeded

This means if check-guest-program-cargo-lock fails, the all-tests job could still pass, defeating the purpose of adding this required check. Add a condition like && needs.check-guest-program-cargo-lock.result != 'skipped' to line 338, and add a success check in the steps section similar to the ones for other jobs.

    needs: [detect-changes, run-assertoor, run-hive, check-guest-program-cargo-lock]
    # Make sure this job runs even if the previous jobs failed or were skipped
    if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.run-assertoor.result != 'skipped' && needs.run-hive.result != 'skipped' }}
    steps:
      - name: Check if any job failed
        run: |
          if [ "${{ needs.run-assertoor.result }}" != "success" ]; then
            echo "Job Assertoor Tx Check failed"
            exit 1
          fi

          if [ "${{ needs.run-hive.result }}" != "success" ]; then
            echo "Job Hive failed"
            exit 1
          fi

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

Comment on lines 320 to 331
- name: Update Cargo.lock files
run: |
make update-cargo-lock
- name: Check Cargo.lock files are committed
run: |
git diff --exit-code -- \
crates/l2/prover/src/guest_program/src/sp1/Cargo.lock \
crates/l2/prover/src/guest_program/src/risc0/Cargo.lock \
crates/l2/prover/src/guest_program/src/zisk/Cargo.lock \
crates/l2/prover/src/guest_program/src/openvm/Cargo.lock \
crates/l2/tee/quote-gen/Cargo.lock
Copy link
Contributor

Choose a reason for hiding this comment

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

cargo check --locked already does this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right! changed here 96eb2b6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a bit slower though

@tomip01 tomip01 force-pushed the add_requiered_cargo_lock_check branch from 022819e to 96eb2b6 Compare December 23, 2025 20:43
@github-actions
Copy link

github-actions bot commented Dec 23, 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 3.015 ± 0.032 2.979 3.073 1.00
main_levm_BubbleSort 3.132 ± 0.019 3.101 3.165 1.04 ± 0.01
pr_revm_BubbleSort 3.075 ± 0.242 2.981 3.765 1.02 ± 0.08
pr_levm_BubbleSort 3.186 ± 0.065 3.138 3.351 1.06 ± 0.02

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 994.3 ± 8.4 983.1 1014.3 1.00 ± 0.02
main_levm_ERC20Approval 1115.9 ± 19.4 1096.5 1157.3 1.13 ± 0.03
pr_revm_ERC20Approval 990.4 ± 14.2 978.7 1021.9 1.00
pr_levm_ERC20Approval 1128.7 ± 18.6 1113.1 1174.6 1.14 ± 0.02

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 133.2 ± 1.1 131.9 135.2 1.00
main_levm_ERC20Mint 167.4 ± 1.4 166.1 170.3 1.26 ± 0.02
pr_revm_ERC20Mint 134.1 ± 3.1 132.4 142.8 1.01 ± 0.02
pr_levm_ERC20Mint 167.0 ± 1.8 165.4 171.5 1.25 ± 0.02

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 230.2 ± 0.9 229.3 232.2 1.00
main_levm_ERC20Transfer 279.8 ± 7.6 274.9 300.7 1.22 ± 0.03
pr_revm_ERC20Transfer 233.4 ± 2.1 231.2 238.8 1.01 ± 0.01
pr_levm_ERC20Transfer 280.5 ± 4.3 276.9 291.7 1.22 ± 0.02

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 230.5 ± 1.0 228.9 232.4 1.00
main_levm_Factorial 275.3 ± 11.2 269.4 307.0 1.19 ± 0.05
pr_revm_Factorial 230.9 ± 1.3 229.5 233.9 1.00 ± 0.01
pr_levm_Factorial 273.6 ± 0.7 272.6 274.7 1.19 ± 0.01

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.667 ± 0.032 1.604 1.701 1.00 ± 0.02
main_levm_FactorialRecursive 8.462 ± 0.052 8.404 8.581 5.09 ± 0.06
pr_revm_FactorialRecursive 1.663 ± 0.018 1.642 1.693 1.00
pr_levm_FactorialRecursive 8.487 ± 0.042 8.417 8.542 5.10 ± 0.06

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 210.8 ± 0.7 209.9 212.6 1.00 ± 0.01
main_levm_Fibonacci 262.6 ± 3.5 256.7 266.6 1.25 ± 0.02
pr_revm_Fibonacci 210.6 ± 2.6 205.9 215.4 1.00
pr_levm_Fibonacci 267.7 ± 16.0 254.4 297.2 1.27 ± 0.08

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 885.3 ± 10.9 866.4 897.9 1.18 ± 0.05
main_levm_FibonacciRecursive 773.4 ± 26.9 726.5 803.9 1.03 ± 0.06
pr_revm_FibonacciRecursive 880.0 ± 9.3 868.5 901.4 1.17 ± 0.05
pr_levm_FibonacciRecursive 751.0 ± 33.2 700.3 803.0 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 8.3 ± 0.1 8.3 8.4 1.00 ± 0.01
main_levm_ManyHashes 9.3 ± 0.1 9.2 9.4 1.11 ± 0.02
pr_revm_ManyHashes 8.3 ± 0.1 8.2 8.5 1.00
pr_levm_ManyHashes 9.4 ± 0.4 9.2 10.7 1.13 ± 0.05

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 269.9 ± 5.5 266.0 280.3 1.02 ± 0.02
main_levm_MstoreBench 265.3 ± 1.1 263.4 267.7 1.00
pr_revm_MstoreBench 267.8 ± 3.4 264.4 276.2 1.01 ± 0.01
pr_levm_MstoreBench 267.3 ± 2.4 263.9 271.6 1.01 ± 0.01

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 295.6 ± 1.2 294.4 297.7 1.00 ± 0.01
main_levm_Push 380.3 ± 6.7 371.7 391.5 1.29 ± 0.02
pr_revm_Push 295.2 ± 1.0 293.1 296.6 1.00
pr_levm_Push 401.9 ± 7.6 390.2 414.6 1.36 ± 0.03

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 169.0 ± 4.0 164.0 178.0 1.88 ± 0.05
main_levm_SstoreBench_no_opt 89.9 ± 1.2 87.8 90.9 1.00
pr_revm_SstoreBench_no_opt 166.1 ± 3.2 162.7 170.5 1.85 ± 0.04
pr_levm_SstoreBench_no_opt 91.1 ± 1.8 87.8 93.2 1.01 ± 0.02

@ManuelBilbao ManuelBilbao added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit c7ead8c Jan 5, 2026
72 of 73 checks passed
@ManuelBilbao ManuelBilbao deleted the add_requiered_cargo_lock_check branch January 5, 2026 18:24
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Jan 5, 2026
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Jan 5, 2026
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.

5 participants