mirror of
https://github.com/logos-blockchain/lez-fuzzing.git
synced 2026-07-22 09:39:30 +00:00
fix: undo prove feature
- install external prover
This commit is contained in:
parent
e19b1b73bd
commit
42f683ef29
36
.github/actions/install-r0vm/action.yml
vendored
Normal file
36
.github/actions/install-r0vm/action.yml
vendored
Normal 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
|
||||
4
.github/actions/setup-afl/action.yml
vendored
4
.github/actions/setup-afl/action.yml
vendored
@ -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
|
||||
|
||||
6
.github/actions/setup-libfuzzer/action.yml
vendored
6
.github/actions/setup-libfuzzer/action.yml
vendored
@ -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
|
||||
|
||||
5
.github/workflows/mutants.yml
vendored
5
.github/workflows/mutants.yml
vendored
@ -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
774
fuzz/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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"] }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user