diff --git a/.cargo/config.toml b/.cargo/config.toml index 262a07a08..eaf57064e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -8,3 +8,9 @@ rustflags = ["-C", "target-feature=+simd128,+relaxed-simd"] [target.wasm32-wasip1] runner = "wasmtime run --dir . " rustflags = ["-C", "target-feature=+simd128,+relaxed-simd"] + +# LLVM miscompilation workaround for Linux aarch64. +# Bug requires: opt-level=3 + codegen-units=1 + 256-bit field arithmetic + generics +# See: https://github.com/worldfnd/provekit/issues/304 +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "opt-level=2"] diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml.disabled similarity index 98% rename from .github/workflows/benchmark.yml rename to .github/workflows/benchmark.yml.disabled index 58011c108..7b6ab2ed5 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml.disabled @@ -26,7 +26,7 @@ jobs: - name: Setup Rust toolchain, cache and cargo-codspeed binary uses: moonrepo/setup-rust@v1 with: - channel: nightly-2025-04-05 + channel: nightly-2025-10-20 cache-base: main cache-target: release bins: cargo-codspeed @@ -94,7 +94,7 @@ jobs: - name: Setup rust toolchain, cache and cargo-codspeed binary uses: moonrepo/setup-rust@v1 with: - channel: nightly-2025-04-05 + channel: nightly-2025-10-20 cache: false # We don't actually use any build files, no need to restore cache bins: cargo-codspeed diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5676f69dc..de228d40b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,12 @@ jobs: build_and_test: name: Build and test runs-on: ubuntu-24.04-arm + env: + # Overrides .cargo/config.toml [target.aarch64-unknown-linux-gnu].rustflags + # entirely (Cargo treats RUSTFLAGS env and config rustflags as mutually + # exclusive). Safe: this job does debug builds only (opt-level=0). + # Do NOT add --release without addressing this interaction. See #304. + RUSTFLAGS: "-C debug-assertions=yes" steps: - uses: actions/checkout@v4 - name: Setup rust toolchain, cache and bins diff --git a/.github/workflows/circuit_keys.yml b/.github/workflows/circuit_keys.yml index dee1ffc10..5e0d1bc11 100644 --- a/.github/workflows/circuit_keys.yml +++ b/.github/workflows/circuit_keys.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Rust toolchain, cache and bins uses: moonrepo/setup-rust@v1 with: - channel: nightly-2025-04-05 + channel: nightly-2025-10-20 cache-base: main components: rustfmt, clippy diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index dda73638a..2ba668196 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -27,12 +27,14 @@ jobs: - name: Setup Rust toolchain, cache and bins uses: moonrepo/setup-rust@v1 with: - channel: nightly-2025-04-05 + channel: nightly-2025-10-20 cache-base: main components: rustfmt, clippy + - name: Clean stale artifacts + run: cargo clean - name: Build all Rust targets - run: cargo build --all-targets --all-features --verbose + run: cargo build --all-targets --all-features --release --verbose - uses: noir-lang/noirup@v0.1.2 with: @@ -52,6 +54,12 @@ jobs: echo "Compiled $circuit" done + - name: Clean stale benchmark artifacts + working-directory: noir-examples/noir-passport/merkle_age_check + run: | + rm -f ./benchmark-inputs/*.pkp ./benchmark-inputs/*.pkv ./benchmark-inputs/*.np + echo "Cleaned stale benchmark artifacts" + - name: Prepare circuits working-directory: noir-examples/noir-passport/merkle_age_check run: | @@ -93,37 +101,39 @@ jobs: ./benchmark-inputs/t_attest-prover.pkp \ ./benchmark-inputs/t_attest-proof.np - - name: Run Gnark verifier - working-directory: recursive-verifier - run: | - go build -o gnark-verifier cmd/cli/main.go - - # Set up cleanup trap - cleanup() { - if [ ! -z "$MONITOR_PID" ]; then - kill $MONITOR_PID 2>/dev/null || true - fi - } - trap cleanup EXIT - - # Start monitoring in background - ( - while true; do - echo "=== $(date) ===" - echo "Memory:" - free -h - echo "Disk:" - df -h - echo "Processes:" - ps aux --sort=-%mem | head -5 - echo "==================" - sleep 10 # Check every 10 seconds - done - ) & - MONITOR_PID=$! - - # Run the main process - ./gnark-verifier --config "../noir-examples/noir-passport/merkle_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport/merkle_age_check/r1cs.json" - - # Stop monitoring - kill $MONITOR_PID \ No newline at end of file + + # Disabled gnark, check https://github.com/worldfnd/provekit/issues/302 + # - name: Run Gnark verifier + # working-directory: recursive-verifier + # run: | + # go build -o gnark-verifier cmd/cli/main.go + + # # Set up cleanup trap + # cleanup() { + # if [ ! -z "$MONITOR_PID" ]; then + # kill $MONITOR_PID 2>/dev/null || true + # fi + # } + # trap cleanup EXIT + + # # Start monitoring in background + # ( + # while true; do + # echo "=== $(date) ===" + # echo "Memory:" + # free -h + # echo "Disk:" + # df -h + # echo "Processes:" + # ps aux --sort=-%mem | head -5 + # echo "==================" + # sleep 10 # Check every 10 seconds + # done + # ) & + # MONITOR_PID=$! + + # # Run the main process + # ./gnark-verifier --config "../noir-examples/noir-passport/merkle_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport/merkle_age_check/r1cs.json" + + # # Stop monitoring + # kill $MONITOR_PID \ No newline at end of file diff --git a/provekit/common/src/whir_r1cs.rs b/provekit/common/src/whir_r1cs.rs index 02febb6dd..24241d964 100644 --- a/provekit/common/src/whir_r1cs.rs +++ b/provekit/common/src/whir_r1cs.rs @@ -50,6 +50,6 @@ pub struct WhirR1CSProof { /// Transcript interaction pattern for debug-mode validation. /// Populated by the prover; absent from serialized proofs on disk. #[cfg(debug_assertions)] - #[serde(default, skip_serializing)] + #[serde(skip)] pub pattern: Vec, }