fix: undo prove feature

- install external prover
This commit is contained in:
Roman 2026-07-06 15:24:30 +02:00
parent e19b1b73bd
commit 42f683ef29
No known key found for this signature in database
GPG Key ID: 583BDF43C238B83E
6 changed files with 80 additions and 756 deletions

36
.github/actions/install-r0vm/action.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Install r0vm
description: >
Install the risc0 `r0vm` executor binary (via rzup) at the version matching the
`risc0-zkvm` crate. The fuzz targets are built WITHOUT the risc0 `prove` feature
(which would add ~45 min of prover-kernel compilation), so `Program::execute` runs
the guest through risc0's `ExternalProver`, which spawns this `r0vm` binary. Without
it, every public-transaction execution fails with ENOENT and is spuriously rejected —
which surfaces as a `ModelAcceptanceAgreement` crash in the lockstep target.
inputs:
version:
description: >
r0vm version to install. MUST match the `risc0-zkvm` crate version — risc0 looks
up r0vm by exact version via rzup, and checks major/minor server compatibility.
required: false
default: "3.0.5"
runs:
using: composite
steps:
- name: Install rzup and r0vm ${{ inputs.version }}
shell: bash
env:
# Authenticate rzup's GitHub release lookups to avoid unauthenticated rate limits.
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
curl -L https://risczero.com/install | bash
RZUP="$HOME/.risc0/bin/rzup"
# Install only r0vm (not the guest rust/cpp toolchains) at the pinned version.
"$RZUP" install r0vm "${{ inputs.version }}"
# risc0-zkvm resolves r0vm through the rzup home (~/.risc0); rzup also symlinks
# the binary into ~/.cargo/bin. Export both onto PATH for good measure.
echo "$HOME/.risc0/bin" >> "$GITHUB_PATH"
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
"$HOME/.cargo/bin/r0vm" --version || "$RZUP" show

View File

@ -33,3 +33,7 @@ runs:
- name: Install cargo-afl
shell: bash
run: cargo install cargo-afl --locked
# The fuzz targets execute guest programs via risc0's ExternalProver, which needs r0vm.
- name: Install r0vm
uses: ./.github/actions/install-r0vm

View File

@ -1,7 +1,7 @@
name: Set up libFuzzer toolchain
description: >
Install the Rust nightly toolchain (with llvm-tools-preview, required by
cargo-fuzz and llvm-cov) and cargo-fuzz itself. The repository and
cargo-fuzz and llvm-cov), cargo-fuzz, and the r0vm executor. The repository and
logos-execution-zone must already be checked out before this runs.
runs:
@ -15,3 +15,7 @@ runs:
- name: Install cargo-fuzz
shell: bash
run: cargo install cargo-fuzz
# The fuzz targets execute guest programs via risc0's ExternalProver, which needs r0vm.
- name: Install r0vm
uses: ./.github/actions/install-r0vm

View File

@ -136,6 +136,11 @@ jobs:
cargo install cargo-fuzz --locked
cargo install cargo-mutants --locked
# The corpus oracle runs the fuzz targets, which execute guest programs via
# risc0's ExternalProver — that needs the r0vm binary.
- name: Install r0vm
uses: ./.github/actions/install-r0vm
- name: Make corpus-regression wrapper executable
run: chmod +x scripts/mutants-corpus-test.sh

774
fuzz/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,14 @@ fuzzer-libfuzzer = []
fuzzer-afl = []
[dependencies]
nssa = { workspace = true, features = ["prove"] }
# NOTE: `prove` is deliberately NOT enabled here. Enabling it drags risc0's STARK
# prover backend (C++/CUDA kernels + heavy circuit codegen) into the fuzz-target
# build, blowing "cargo fuzz build" from ~6 min to ~50 min — all to compile a prover
# that `Program::execute` never calls (it executes, it does not prove). Instead the
# fuzz targets use risc0's `ExternalProver`, which runs the guest via an external
# `r0vm` binary installed in CI (see .github/actions/install-r0vm). It is still
# enabled under [dev-dependencies] so `cargo test` runs the guest in-process.
nssa = { workspace = true }
nssa_core = { workspace = true }
common = { workspace = true }
borsh = { workspace = true }
@ -28,3 +35,5 @@ system_accounts = { workspace = true }
[dev-dependencies]
proptest = "1.4"
# In-process guest execution for the test suite (no external r0vm needed under `cargo test`).
nssa = { workspace = true, features = ["prove"] }