Skip to content

Commit 11c8a87

Browse files
committed
Merge remote-tracking branch 'https-origin/main' into px/wasm
# Conflicts: # .gitignore # Cargo.toml # provekit/common/Cargo.toml # provekit/common/src/file/mod.rs # provekit/common/src/utils/sumcheck.rs # provekit/prover/Cargo.toml # provekit/prover/src/lib.rs
2 parents 4c4875c + e5d2312 commit 11c8a87

203 files changed

Lines changed: 8410 additions & 6043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ rustflags = ["-C", "target-feature=+simd128,+relaxed-simd"]
77

88
[target.wasm32-wasip1]
99
runner = "wasmtime run --dir . "
10-
rustflags = ["-C", "target-feature=+simd128,+relaxed-simd"]
10+
rustflags = ["-C", "target-feature=+simd128,+relaxed-simd"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Rust toolchain, cache and cargo-codspeed binary
2727
uses: moonrepo/setup-rust@v1
2828
with:
29-
channel: nightly-2025-04-05
29+
channel: nightly-2026-03-04
3030
cache-base: main
3131
cache-target: release
3232
bins: cargo-codspeed
@@ -94,7 +94,7 @@ jobs:
9494
- name: Setup rust toolchain, cache and cargo-codspeed binary
9595
uses: moonrepo/setup-rust@v1
9696
with:
97-
channel: nightly-2025-04-05
97+
channel: nightly-2026-03-04
9898
cache: false # We don't actually use any build files, no need to restore cache
9999
bins: cargo-codspeed
100100

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
1011

1112
# When a new job is pushed on a PR, cancel the old one.
1213
concurrency:
@@ -25,7 +26,7 @@ jobs:
2526
- name: Setup rust toolchain, cache and bins
2627
uses: moonrepo/setup-rust@v1
2728
with:
28-
channel: nightly-2025-10-20
29+
channel: nightly-2026-03-04
2930
cache-base: main
3031
components: rustfmt, clippy
3132
- run: cargo fmt --all --check

.github/workflows/circuit_keys.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
BUCKET_NAME: "provekit"
88
CIRCUIT_NAME: "complete_age_check"
9-
CIRCUIT_DIR: "noir-examples/noir-passport-examples/complete_age_check"
9+
CIRCUIT_DIR: "noir-examples/noir-passport-monolithic/complete_age_check"
1010
KEYS_NAME: "agecheck"
1111

1212

@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Rust toolchain, cache and bins
2424
uses: moonrepo/setup-rust@v1
2525
with:
26-
channel: nightly-2025-04-05
26+
channel: nightly-2026-03-04
2727
cache-base: main
2828
components: rustfmt, clippy
2929

@@ -95,4 +95,3 @@ jobs:
9595
run: |
9696
echo "Cleaning up local keys..."
9797
rm -f ./keys/*.bin
98-

.github/workflows/end-to-end.yml

Lines changed: 91 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ jobs:
2727
- name: Setup Rust toolchain, cache and bins
2828
uses: moonrepo/setup-rust@v1
2929
with:
30-
channel: nightly-2025-04-05
30+
channel: nightly-2026-03-04
3131
cache-base: main
3232
components: rustfmt, clippy
3333

34+
- name: Clean stale artifacts
35+
run: cargo clean
3436
- name: Build all Rust targets
35-
run: cargo build --all-targets --all-features --verbose
37+
run: cargo build --all-targets --all-features --release --verbose
3638

3739
- uses: noir-lang/[email protected]
3840
with:
@@ -43,49 +45,95 @@ jobs:
4345
with:
4446
go-version: 1.24
4547

46-
- name: Compile and execute Nargo circuit
47-
working-directory: noir-examples/noir-passport-examples/complete_age_check
48+
- name: Compile Nargo circuits
49+
working-directory: noir-examples/noir-passport/merkle_age_check
4850
run: |
49-
nargo compile --skip-brillig-constraints-check --force
51+
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
52+
echo "Compiling $circuit"
53+
nargo compile --force --print-acir --package "$circuit"
54+
echo "Compiled $circuit"
55+
done
56+
57+
- name: Clean stale benchmark artifacts
58+
working-directory: noir-examples/noir-passport/merkle_age_check
59+
run: |
60+
rm -f ./benchmark-inputs/*.pkp ./benchmark-inputs/*.pkv ./benchmark-inputs/*.np
61+
echo "Cleaned stale benchmark artifacts"
62+
63+
- name: Prepare circuits
64+
working-directory: noir-examples/noir-passport/merkle_age_check
65+
run: |
66+
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
67+
echo "Preparing $circuit"
68+
cargo run --release --bin provekit-cli prepare ./target/$circuit.json \
69+
--pkp ./benchmark-inputs/$circuit-prover.pkp \
70+
--pkv ./benchmark-inputs/$circuit-verifier.pkv
71+
echo "Prepared $circuit"
72+
done
73+
74+
- name: Generate proofs for all circuits
75+
working-directory: noir-examples/noir-passport/merkle_age_check
76+
run: |
77+
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
78+
echo "Proving $circuit"
79+
cargo run --release --bin provekit-cli prove \
80+
./benchmark-inputs/$circuit-prover.pkp \
81+
./benchmark-inputs/tbs_720/$circuit.toml \
82+
-o ./benchmark-inputs/$circuit-proof.np
83+
echo "Proved $circuit"
84+
done
85+
86+
- name: Verify proofs for all circuits
87+
working-directory: noir-examples/noir-passport/merkle_age_check
88+
run: |
89+
for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do
90+
echo "Verifying $circuit"
91+
cargo run --release --bin provekit-cli verify \
92+
./benchmark-inputs/$circuit-verifier.pkv \
93+
./benchmark-inputs/$circuit-proof.np
94+
echo "Verified $circuit"
95+
done
5096
5197
- name: Generate Gnark inputs
52-
working-directory: noir-examples/noir-passport-examples/complete_age_check
98+
working-directory: noir-examples/noir-passport/merkle_age_check
5399
run: |
54-
cargo run --release --bin provekit-cli prepare ./target/complete_age_check.json -p ./noir-provekit-prover.pkp -v ./noir-provekit-verifier.pkv
55-
cargo run --release --bin provekit-cli prove ./noir-provekit-prover.pkp ./Prover.toml -o ./noir-proof.np
56-
cargo run --release --bin provekit-cli generate-gnark-inputs ./noir-provekit-prover.pkp ./noir-proof.np
100+
cargo run --release --bin provekit-cli generate-gnark-inputs \
101+
./benchmark-inputs/t_attest-verifier.pkv \
102+
./benchmark-inputs/t_attest-proof.np
57103
58-
- name: Run Gnark verifier
59-
working-directory: recursive-verifier
60-
run: |
61-
go build -o gnark-verifier cmd/cli/main.go
62-
63-
# Set up cleanup trap
64-
cleanup() {
65-
if [ ! -z "$MONITOR_PID" ]; then
66-
kill $MONITOR_PID 2>/dev/null || true
67-
fi
68-
}
69-
trap cleanup EXIT
70-
71-
# Start monitoring in background
72-
(
73-
while true; do
74-
echo "=== $(date) ==="
75-
echo "Memory:"
76-
free -h
77-
echo "Disk:"
78-
df -h
79-
echo "Processes:"
80-
ps aux --sort=-%mem | head -5
81-
echo "=================="
82-
sleep 10 # Check every 10 seconds
83-
done
84-
) &
85-
MONITOR_PID=$!
86-
87-
# Run the main process
88-
./gnark-verifier --config "../noir-examples/noir-passport-examples/complete_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport-examples/complete_age_check/r1cs.json"
89-
90-
# Stop monitoring
91-
kill $MONITOR_PID
104+
105+
# Disabled gnark, check https://github.com/worldfnd/provekit/issues/302
106+
# - name: Run Gnark verifier
107+
# working-directory: recursive-verifier
108+
# run: |
109+
# go build -o gnark-verifier cmd/cli/main.go
110+
111+
# # Set up cleanup trap
112+
# cleanup() {
113+
# if [ ! -z "$MONITOR_PID" ]; then
114+
# kill $MONITOR_PID 2>/dev/null || true
115+
# fi
116+
# }
117+
# trap cleanup EXIT
118+
119+
# # Start monitoring in background
120+
# (
121+
# while true; do
122+
# echo "=== $(date) ==="
123+
# echo "Memory:"
124+
# free -h
125+
# echo "Disk:"
126+
# df -h
127+
# echo "Processes:"
128+
# ps aux --sort=-%mem | head -5
129+
# echo "=================="
130+
# sleep 10 # Check every 10 seconds
131+
# done
132+
# ) &
133+
# MONITOR_PID=$!
134+
135+
# # Run the main process
136+
# ./gnark-verifier --config "../noir-examples/noir-passport/merkle_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport/merkle_age_check/r1cs.json"
137+
138+
# # Stop monitoring
139+
# kill $MONITOR_PID

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
params_for_recursive_verifier
1818
params
1919
artifacts/
20+
spartan_vm_debug/
21+
mavros_debug/
2022

2123
# Don't ignore benchmarking artifacts
2224
!tooling/provekit-bench/benches/*
@@ -54,3 +56,6 @@ node_modules/
5456

5557
# wasm packages
5658
tooling/provekit-wasm/pkg/*
59+
60+
# logs for passport circuit benchmarks
61+
noir-examples/noir-passport/merkle_age_check/benchmark-inputs/logs/

Cargo.toml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ opt-level = 3
6464
codegen-units = 1
6565
lto = "fat"
6666

67+
# Fast release builds for development iteration: cargo build --profile release-fast
68+
[profile.release-fast]
69+
inherits = "release"
70+
codegen-units = 16
71+
lto = "thin"
72+
6773
# Doing light optimizations helps test performance more than it hurts build time.
6874
[profile.test]
6975
opt-level = 2
@@ -98,6 +104,7 @@ anyhow = "1.0.93"
98104
argh = "0.1.12"
99105
axum = "0.8.4"
100106
base64 = "0.22.1"
107+
bincode = "1.3"
101108
bytes = "1.10.1"
102109
chrono = "0.4.41"
103110
# On CI divan get replaced by divan = { package = "codspeed-divan-compat", version = "3.0.1" } for benchmark tracking.
@@ -119,8 +126,11 @@ ruint = { version = "1.12.3", features = ["num-traits", "rand"] }
119126
seq-macro = "0.3.6"
120127
serde = { version = "1.0", features = ["derive"] }
121128
serde_json = "1.0"
122-
sha2 = "0.10.9"
129+
sha2 = { version = "0.10.9", features = ["asm"] }
130+
sha3 = "0.11.0-rc.3"
131+
blake3 = "1.5.6"
123132
test-case = "3.3.1"
133+
tikv-jemallocator = "0.6"
124134
toml = "0.8.8"
125135
tokio = { version = "1.47.1", features = ["full"] }
126136
tokio-util = "0.7.13"
@@ -131,9 +141,10 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "ansi"] }
131141
tracing-tracy = "=0.11.4"
132142
tracy-client = "=0.18.0"
133143
tracy-client-sys = "=0.24.3"
144+
xz2 = "0.1.7"
134145
zerocopy = "0.8.25"
135146
zeroize = "1.8.1"
136-
zstd = "0.13.3"
147+
zstd = "0.13"
137148
ruzstd = "0.7" # Pure Rust zstd decoder for WASM compatibility
138149

139150
# WASM-specific dependencies
@@ -142,7 +153,6 @@ serde-wasm-bindgen = "0.6"
142153
console_error_panic_hook = "0.1"
143154
getrandom = { version = "0.2", features = ["js"] }
144155
getrandom03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
145-
xz2 = "0.1.7"
146156

147157
# Noir language dependencies
148158
acir = { git = "https://github.com/noir-lang/noir", rev = "v1.0.0-beta.11" }
@@ -159,15 +169,15 @@ noirc_driver = { git = "https://github.com/noir-lang/noir", rev = "v1.0.0-beta.1
159169
ark-bn254 = { version = "0.5.0", default-features = false, features = [
160170
"scalar_field",
161171
] }
162-
ark-crypto-primitives = { version = "0.5", features = ["merkle_tree"] }
172+
ark-crypto-primitives = { version = "0.5", features = ["merkle_tree", "parallel"] }
163173
ark-ff = { version = "0.5", features = ["asm", "std"] }
164174
ark-poly = "0.5"
165175
ark-serialize = "0.5"
166176
ark-std = { version = "0.5", features = ["std"] }
177+
mavros-vm = { git = "https://github.com/reilabs/mavros", branch = "split_main"}
178+
mavros-artifacts = { git = "https://github.com/reilabs/mavros", branch = "split_main"}
167179
spongefish = { git = "https://github.com/arkworks-rs/spongefish", features = [
168-
"arkworks-algebra",
169-
], rev = "ecb4f08373ed930175585c856517efdb1851fb47" }
170-
# spongefish-pow with parallel feature for wasm-bindgen-rayon support
171-
spongefish-pow = { git = "https://github.com/arkworks-rs/spongefish", rev = "ecb4f08373ed930175585c856517efdb1851fb47" }
172-
# WHIR proof system - using main's revision
173-
whir = { git = "https://github.com/WizardOfMenlo/whir/", features = ["tracing"], rev = "cf1599b56ff50e09142ebe6d2e2fbd86875c9986" }
180+
"ark-ff", "sha2",
181+
], rev = "fcc277f8a857fdeeadd7cca92ab08de63b1ff1a1" }
182+
spongefish-pow = { git = "https://github.com/arkworks-rs/spongefish", rev = "fcc277f8a857fdeeadd7cca92ab08de63b1ff1a1" }
183+
whir = { git = "https://github.com/WizardOfMenlo/whir/", rev = "20aecf708c34b91f652c851f0722177bf08315af", features = ["tracing"] }

0 commit comments

Comments
 (0)