From c64e6a07443b9ac5b677c014567bba4dc7a0819a Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 28 Nov 2025 15:48:25 -0300 Subject: [PATCH 1/7] Fix update --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1d9138e4..99d36c2c 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ execute-sp1-ci: execute-risc0-ci: cargo r -r --no-default-features --features "risc0" -- block --zkvm risc0 $(REPLAY_BLOCK_ARGS) --bench -update_ethrex: +update-ethrex: cargo update \ -p ethrex-config \ -p ethrex-storage \ @@ -42,6 +42,5 @@ update_ethrex: -p ethrex-l2 \ -p ethrex-storage-rollup \ -p ethrex-l2-rpc \ - -p ethrex\ - -prover \ + -p ethrex-prover \ -p guest_program From a170cd7424c746bdcc4d60335d209134421ca3bb Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 28 Nov 2025 15:49:15 -0300 Subject: [PATCH 2/7] Add make check --- Makefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 99d36c2c..e20f38b0 100644 --- a/Makefile +++ b/Makefile @@ -21,11 +21,22 @@ prove-sp1-gpu-ci: 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: cargo update \ From 6a8116c4297580952d7ef3d8221a661bbd1c0187 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 28 Nov 2025 15:50:10 -0300 Subject: [PATCH 3/7] Refactor build job and add zisk & openvm executions --- .github/workflows/pr-main.yaml | 28 +++++++++++++++------------- Makefile | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-main.yaml b/.github/workflows/pr-main.yaml index 2a293796..5b19b0d2 100644 --- a/.github/workflows/pr-main.yaml +++ b/.github/workflows/pr-main.yaml @@ -17,7 +17,8 @@ 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", "sp1", "risc0", "zisk"] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -97,7 +98,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 @@ -116,20 +117,21 @@ 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 ZisK + if: matrix.backend == 'zisk' + uses: ./.github/actions/install-zisk - - name: Build SP1 - if: matrix.backend == 'sp1' - run: | - cargo b -r --features "${{ matrix.backend }}" + - name: Install OpenVM + if: matrix.backend == 'openvm' + uses: ./.github/actions/install-openvm - - name: Build No backend - if: matrix.backend == 'exec' + - name: Build run: | - cargo b -r + if [ "${{ matrix.backend }}" = "exec" ]; then + cargo b -r + else + cargo b -r --features "${{ matrix.backend }}" + fi - name: Run env: diff --git a/Makefile b/Makefile index e20f38b0..b63e11e3 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,24 @@ 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 From 68bd7a65d72f7bdddb22bf5ad6cc037f13e72e02 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 28 Nov 2025 16:51:26 -0300 Subject: [PATCH 4/7] Add openvm install action --- .github/actions/install-openvm/action.yml | 12 ++++++++++++ .github/workflows/pr-main.yaml | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/actions/install-openvm/action.yml diff --git a/.github/actions/install-openvm/action.yml b/.github/actions/install-openvm/action.yml new file mode 100644 index 00000000..1c5e9e25 --- /dev/null +++ b/.github/actions/install-openvm/action.yml @@ -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 diff --git a/.github/workflows/pr-main.yaml b/.github/workflows/pr-main.yaml index 5b19b0d2..c2565312 100644 --- a/.github/workflows/pr-main.yaml +++ b/.github/workflows/pr-main.yaml @@ -18,7 +18,18 @@ jobs: fail-fast: false matrix: features: - ["", "l2", "l2,sp1", "l2,risc0", "l2,zisk", "sp1", "risc0", "zisk"] + [ + "", + "l2", + "l2,sp1", + "l2,risc0", + "l2,zisk", + "l2,openvm", + "sp1", + "risc0", + "zisk", + "openvm", + ] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -49,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 From 32b84653438d4493b2d2a00a833968f6ec14f324 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 28 Nov 2025 17:21:27 -0300 Subject: [PATCH 5/7] Skip executing ZisK block --- .github/workflows/pr-main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-main.yaml b/.github/workflows/pr-main.yaml index c2565312..d5f3ac7b 100644 --- a/.github/workflows/pr-main.yaml +++ b/.github/workflows/pr-main.yaml @@ -149,6 +149,8 @@ jobs: fi - name: Run + # Skip reason: https://github.com/lambdaclass/ethrex-replay/issues/53 + if: ${{ matrix.backend != 'zisk' }} env: BLOCK_NUMBER: 1265656 NETWORK: hoodi From 8aabf67fc39e294650221b963d1db52abcca094f Mon Sep 17 00:00:00 2001 From: ilitteri Date: Mon, 1 Dec 2025 12:03:56 -0300 Subject: [PATCH 6/7] Fix openvm param --- src/cli.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli.rs b/src/cli.rs index 60334129..5a3f0286 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -227,6 +227,7 @@ pub struct EthrexReplayOptions { pub enum ZKVM { Jolt, Nexus, + #[clap(name = "openvm")] OpenVM, Pico, Risc0, From 293d810bd58f659840fa848a4950042f197d3ea7 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Mon, 1 Dec 2025 14:05:59 -0300 Subject: [PATCH 7/7] Fix skip zisk --- .github/workflows/pr-main.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-main.yaml b/.github/workflows/pr-main.yaml index d5f3ac7b..59ddeee5 100644 --- a/.github/workflows/pr-main.yaml +++ b/.github/workflows/pr-main.yaml @@ -132,15 +132,13 @@ jobs: if: matrix.backend == 'sp1' uses: ./.github/actions/install-sp1 - - name: Install ZisK - if: matrix.backend == 'zisk' - uses: ./.github/actions/install-zisk - - name: Install OpenVM if: matrix.backend == 'openvm' uses: ./.github/actions/install-openvm - name: Build + # Skip reason: https://github.com/lambdaclass/ethrex-replay/issues/53 + if: ${{ matrix.backend != 'zisk' }} run: | if [ "${{ matrix.backend }}" = "exec" ]; then cargo b -r