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
72 changes: 57 additions & 15 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,48 +57,90 @@ jobs:
- 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
rm -f ./benchmark-inputs/*.pkp ./benchmark-inputs/*.pkv ./benchmark-inputs/*.np ./benchmark-inputs/*.sp
echo "Cleaned stale benchmark artifacts"

- name: Prepare circuits
- name: Start server (prepare + serve)
working-directory: noir-examples/noir-passport/merkle_age_check
run: |
CIRCUIT_ARGS=""
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
echo "Preparing $circuit"
cargo run --release --bin provekit-cli prepare ./target/$circuit.json \
--pkp ./benchmark-inputs/$circuit-prover.pkp \
--pkv ./benchmark-inputs/$circuit-verifier.pkv
echo "Prepared $circuit"
CIRCUIT_ARGS="$CIRCUIT_ARGS --circuit $circuit:./target/$circuit.json"
done
rm -f /tmp/spark.sock
../../../target/release/provekit-cli serve \
--socket /tmp/spark.sock \
--output-dir ./benchmark-inputs \
$CIRCUIT_ARGS > /tmp/spark-server.log 2>&1 &
SERVER_PID=$!
echo "SERVER_PID=$SERVER_PID" >> "$GITHUB_ENV"
# Wait for READY
for i in $(seq 1 600); do
if [ -S /tmp/spark.sock ]; then
echo "Server ready after ${i}s"
break
fi
if ! kill -0 $SERVER_PID 2>/dev/null; then
echo "Server process died during preparation"
exit 1
fi
sleep 1
done
if [ ! -S /tmp/spark.sock ]; then
echo "Timed out waiting for server"
exit 1
fi

- name: Generate proofs for all circuits
- name: Prove and request spark proofs for all circuits
working-directory: noir-examples/noir-passport/merkle_age_check
run: |
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
echo "Proving $circuit"
cargo run --release --bin provekit-cli prove \
./benchmark-inputs/$circuit-prover.pkp \
../../../target/release/provekit-cli prove \
./benchmark-inputs/$circuit.pkp \
./benchmark-inputs/tbs_720/$circuit.toml \
-o ./benchmark-inputs/$circuit-proof.np
-o ./benchmark-inputs/$circuit-proof.np \
--socket /tmp/spark.sock \
--circuit $circuit \
--spark-out ./benchmark-inputs/$circuit-spark-proof.sp
echo "Proved $circuit"
done

- name: Stop SPARK server
if: always()
run: |
kill $SERVER_PID 2>/dev/null || true
echo "=== SPARK server log ==="
cat /tmp/spark-server.log 2>/dev/null || true

- name: Verify proofs for all circuits
working-directory: noir-examples/noir-passport/merkle_age_check
run: |
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
echo "Verifying $circuit"
cargo run --release --bin provekit-cli verify \
./benchmark-inputs/$circuit-verifier.pkv \
../../../target/release/provekit-cli verify \
./benchmark-inputs/$circuit.pkv \
./benchmark-inputs/$circuit-proof.np
echo "Verified $circuit"
done

- name: Verify SPARK proofs for all circuits
working-directory: noir-examples/noir-passport/merkle_age_check
run: |
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
echo "SPARK verifying $circuit"
../../../target/release/provekit-cli verify \
./benchmark-inputs/$circuit.pkv \
./benchmark-inputs/$circuit-proof.np \
--spark-proof ./benchmark-inputs/$circuit-spark-proof.sp
echo "SPARK verified $circuit"
done

- name: Generate Gnark inputs
working-directory: noir-examples/noir-passport/merkle_age_check
run: |
cargo run --release --bin provekit-cli generate-gnark-inputs \
./benchmark-inputs/t_attest-verifier.pkv \
../../../target/release/provekit-cli generate-gnark-inputs \
./benchmark-inputs/t_attest.pkv \
./benchmark-inputs/t_attest-proof.np


Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
*.pkp
*.pkv
*.np
*.sp
params_for_recursive_verifier
params
artifacts/
spartan_vm_debug/
mavros_debug/
mavros/

# Don't ignore benchmarking artifacts
!tooling/provekit-bench/benches/*
Expand Down
Loading
Loading