Bump Noir toolchain to v1.0.0-beta.20 #484
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 496 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.371
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #484"
general
weight: 0.35
recmo
Moves the workspace from Noir v1.0.0-beta.11 to v1.0.0-beta.20. Most of the changes are for
cargo.toml/cargo.lock.The interesting part is what the nine compiler releases did to our circuits, measured below.Constraint counts
Measured with
provekit-cli preparefrom each toolchain:| circuit | beta.11 | beta.20 | change | padded size |
|---|---|---|---|---|
| t_add_dsc_720 | 362,446 | 413,191 | +14.0% | 2^19, same |
| t_add_id_data_720 | 156,408 | 174,071 | +11.3% | 2^18, same |
| t_add_integrity_commit | 114,469 | 108,002 | -5.6% | 2^17, same |
| t_attest | 22,845 | 22,275 | -2.5% | 2^15, same |
| complete_age_check | 711,664 | 771,988 | +8.5% | 2^20, same |
The growth has two sources, measured by changing one thing at a time on t_add_dsc_720:
Downgrading bignum is not an option: nothing below v0.10.0 compiles on beta.20, and noir_rsa pins v0.10.0.
Circuits without wide arithmetic go the other way: t_add_integrity_commit lost 44% of its opcodes and t_attest shrank slightly. SHA256 and Poseidon2 cost exactly the same on both sides.
Prover time
hyperfine, release builds of both trees, same machine. Two independent sessions, each one warmup run plus three timed runs; the table pools all six:
| circuit | beta.11 | beta.20 |
|---|---|---|
| t_attest | 204.9 ms | 198.7 ms |
| t_add_integrity_commit | 420.4 ms | 409.0 ms |
| t_add_id_data_720 | 613.4 ms | 600.1 ms |
| t_add_dsc_720 | 1.152 s | 1.139 s |
| complete_age_check | 1.983 s | 1.975 s |
Flat, leaning 1-3% faster on beta.20 (complete_age_check is within noise). Two effects cancel: prover cost tracks the padded power-of-two sizes, which didn't move for any circuit, and witness generation got quicker because beta.20 makes fewer brillig calls. That speedup comes from sha256 v0.3.0 and the compiler, not bignum; the biggest drop is in a circuit with no bignum at all. On t_add_dsc_720, witgen goes from 113 ms to 88 ms with the commit phases unchanged. Proof sizes move under 1% and all proofs verify.
Notes for review
num_bits <= 32. The dsc circuit carries one 8-bit AND (on both toolchains); widths up to 32 are sound in the 4-byte decomposition, anything wider would truncate silently, so it panics instead.t_add_integrity_commit'sdg1_padded_lengthisu32now, following sha256 v0.3.0. The monolithic passport keepsu64with a cast; happy to align them if you have a preference.b4236c19byte for byte apart from the vendored stdlib, and preparing the same circuit from the git pin and from the registry build gives identical.pkp/.pkvfiles.Validation
Workspace tests, clippy and fmt are clean. The five shipped circuits prepare, prove and verify on beta.20, with the beta.11 runs above as the control. 56 of 58 example packages compile; the two failures predate this PR.
cargo bench -p provekit-benchruns, prove_poseidon_1000 median 470 ms (a second run replicated within 1%).---
AI Disclosure: The mechanical port and the measurement runs were done with Claude Code. I reviewed the diff, chose the library pin set and the binop-cap behavior, and checked the recomputed Barrett parameters against the moduli.