Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/actions/install-openvm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Install OpenVM"
description: "Install OpenVM Toolchain"

runs:
using: "composite"
steps:
- name: Install OpenVM
shell: bash
run: |
rustup install nightly-2025-02-14
rustup component add rust-src --toolchain nightly-2025-02-14
cargo +1.86 install --locked --git https://github.com/openvm-org/openvm.git --tag v1.4.1 cargo-openvm
45 changes: 31 additions & 14 deletions .github/workflows/pr-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ jobs:
strategy:
fail-fast: false
matrix:
features: ["", "l2", "l2,sp1", "l2,risc0", "l2,zisk", "sp1", "risc0", "zisk"]
features:
[
"",
"l2",
"l2,sp1",
"l2,risc0",
"l2,zisk",
"l2,openvm",
"sp1",
"risc0",
"zisk",
"openvm",
]
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,6 +60,10 @@ jobs:
if: contains(matrix.features, 'zisk')
uses: ./.github/actions/install-zisk

- name: Install OpenVM
if: contains(matrix.features, 'openvm')
uses: ./.github/actions/install-openvm

- name: cargo fmt --check --all
if: matrix.features == '' # Run only without features because it's redundant to run it on all jobs
run: cargo fmt --check --all
Expand Down Expand Up @@ -97,7 +113,7 @@ jobs:
strategy:
fail-fast: false
matrix:
backend: ["sp1", "risc0", "exec"]
backend: ["sp1", "risc0", "exec", "zisk", "openvm"]
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -116,22 +132,23 @@ jobs:
if: matrix.backend == 'sp1'
uses: ./.github/actions/install-sp1

- name: Build Risc0
if: matrix.backend == 'risc0'
run: |
cargo b -r --no-default-features --features "${{ matrix.backend }}"
- name: Install OpenVM
if: matrix.backend == 'openvm'
uses: ./.github/actions/install-openvm
Comment on lines +135 to +137
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The install-openvm action does not exist in .github/actions/. The workflow will fail when trying to execute with the openvm backend because this action cannot be found. Either create the missing action directory and files, or remove openvm from the matrix if it's not ready yet.

Copilot uses AI. Check for mistakes.

- name: Build SP1
if: matrix.backend == 'sp1'
- name: Build
# Skip reason: https://github.com/lambdaclass/ethrex-replay/issues/53
if: ${{ matrix.backend != 'zisk' }}
run: |
cargo b -r --features "${{ matrix.backend }}"

- name: Build No backend
if: matrix.backend == 'exec'
run: |
cargo b -r
if [ "${{ matrix.backend }}" = "exec" ]; then
cargo b -r
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The consolidated build step doesn't handle the risc0 backend correctly. According to the Makefile (line 22), risc0 requires --no-default-features flag in addition to --features risc0. The current implementation will build risc0 with default features enabled, which is inconsistent with the expected behavior. Consider adding special handling for risc0:

if [ "${{ matrix.backend }}" = "exec" ]; then
  cargo b -r
elif [ "${{ matrix.backend }}" = "risc0" ]; then
  cargo b -r --no-default-features --features "${{ matrix.backend }}"
else
  cargo b -r --features "${{ matrix.backend }}"
fi
Suggested change
cargo b -r
cargo b -r
elif [ "${{ matrix.backend }}" = "risc0" ]; then
cargo b -r --no-default-features --features "${{ matrix.backend }}"

Copilot uses AI. Check for mistakes.
else
cargo b -r --features "${{ matrix.backend }}"
fi

- name: Run
# Skip reason: https://github.com/lambdaclass/ethrex-replay/issues/53
if: ${{ matrix.backend != 'zisk' }}
env:
BLOCK_NUMBER: 1265656
NETWORK: hoodi
Expand Down
40 changes: 32 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,48 @@ else
REPLAY_BLOCK_ARGS := $(BLOCK_NUMBER) --rpc-url $(RPC_URL)
endif

## Execution block
# Execution
execute-ci:
cargo r -r --no-default-features -- block $(REPLAY_BLOCK_ARGS)

execute-sp1-ci:
cargo r -r --features sp1 -- block --zkvm sp1 $(REPLAY_BLOCK_ARGS) --bench

execute-risc0-ci:
cargo r -r --no-default-features --features risc0 -- block --zkvm risc0 $(REPLAY_BLOCK_ARGS) --bench

execute-zisk-ci:
cargo r -r --features zisk -- block --zkvm zisk $(REPLAY_BLOCK_ARGS) --bench

execute-openvm-ci:
cargo r -r --features openvm -- block --zkvm openvm $(REPLAY_BLOCK_ARGS) --bench

# Proving

prove-sp1-gpu-ci:
SP1_PROVER=cuda cargo r -r --features "sp1,gpu" -- block --zkvm sp1 --action prove --resource gpu $(REPLAY_BLOCK_ARGS) --bench

prove-risc0-gpu-ci:
cargo r -r --no-default-features --features "risc0,gpu" -- block --zkvm risc0 --action prove --resource gpu $(REPLAY_BLOCK_ARGS) --bench

execute-sp1-ci:
cargo r -r --features "sp1" -- block --zkvm sp1 $(REPLAY_BLOCK_ARGS) --bench
# Checks

execute-risc0-ci:
cargo r -r --no-default-features --features "risc0" -- block --zkvm risc0 $(REPLAY_BLOCK_ARGS) --bench
# GPU variants are not checked here to avoid requiring CUDA.
check:
cargo check --release
cargo check --release -F sp1
cargo check --release -F sp1,profiling
cargo check --release -F risc0
cargo check --release -F zisk
cargo check --release -F openvm
cargo check --release -F l2
cargo check --release -F l2,sp1
cargo check --release -F l2,sp1,profiling
cargo check --release -F l2,risc0
cargo check --release -F l2,zisk
cargo check --release -F l2,openvm

update_ethrex:
update-ethrex:
cargo update \
-p ethrex-config \
-p ethrex-storage \
Expand All @@ -42,6 +67,5 @@ update_ethrex:
-p ethrex-l2 \
-p ethrex-storage-rollup \
-p ethrex-l2-rpc \
-p ethrex\
-prover \
-p ethrex-prover \
-p guest_program
1 change: 1 addition & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ pub struct EthrexReplayOptions {
pub enum ZKVM {
Jolt,
Nexus,
#[clap(name = "openvm")]
OpenVM,
Pico,
Risc0,
Expand Down