Skip to content

build: verifier-safe defaults; parallel, BlindFold and OS entropy behind features - #2395

Draft
quangvdao wants to merge 4 commits into
mainfrom
quang/zdeps-verifier-safe-defaults
Draft

quangvdao wants to merge 4 commits into
mainfrom
quang/zdeps-verifier-safe-defaults

Conversation

@quangvdao

Copy link
Copy Markdown
Collaborator

Makes the default jolt-verifier dependency graph free of BN254, Rayon and OS entropy, so a guest verifier pulls in only what it uses. Prover crates now ask for those features explicitly. This is item Z-deps/j of the Whiteout move (LayerZero-Labs/akita#120). No formulas, transcript messages, proof types or serialization change.

Draft: built on today's main, before the field switch (#2379). It will be rebased once that lands.

Changes

  • Workspace defaults: jolt-field, jolt-poly and jolt-openings no longer inherit default features. jolt-field's own default turns on BN254, so it needs default-features = false even though jolt-algebra already had it.
  • jolt-transcript: OS-seeded prover construction (spongefish's getrandom, the wasm getrandom backend) moves behind a new prover-entropy feature. The generic prover transcript operations stay ungated; only the OS-seeded constructor and its ProverInit impl are gated.
  • jolt-zk: BlindFold's dependencies are optional under blindfold; Rayon moves from prover to parallel, with sequential iterators that preserve collection order. prover implies blindfold. BlindFold needs no concrete curve, so the generic verifier enables blindfold (its proof wire type names BlindFoldProof even in clear mode) without BN254.
  • Consumers ask for what they use: jolt-prover, jolt-sdk (not its guest verifier), Dory, HyperKZG, jolt-akita (normal dependency: the patched akita-transcript constructs a prover state unconditionally), the recursion wrappers, tracer, jolt-eval, z3-verifier, zklean-extractor, the fuzz crates and the sumcheck external-consumer test. Test-only needs go through dev-dependencies.

rand and rand_chacha remain in the verifier graph through ark-serialize → ark-std, without getrandom. Removing that dependency is out of scope.

Validation

  • Workspace clippy (host, and host,zk) with -D warnings; cargo check -p jolt-verifier --all-targets, also with default features off; a bare wasm library check with no entropy backend; the release wasm prover build from CI
  • Every workspace crate that depends on jolt-transcript checked in isolation with --lib (69 checks), so no crate relies on another crate turning a feature on
  • The six meaningful jolt-zk feature combinations compile; 94 transcript tests (frozen vectors included), 73 BlindFold tests with sequential and with parallel iterators, the clear and ZK muldiv verifier fixtures, the sumcheck external-consumer roundtrip, locked builds of the four affected fuzz manifests

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📏 PR diff

Note

Actual code changed: 187 lines

🟢 +141 added    🔴 −46 removed

Tests, docs, fixtures, and helper scripts excluded.

Category 🟢 Added 🔴 Removed
⌨️ Actual code +141 −46
🧪 Tests +1 0
📚 Docs +4 −3
📦 Fixtures +3 −268
🔧 Helper scripts 0 0
Total diff +149 −317

Every changed line is classified once.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark comparison (crates)

Same-runner A/B: base_run = e21affa (merge target) vs pr_run = 575dde4 (PR head merged onto it). Bold = faster run; Δ colored when the difference exceeds the ±10% noise threshold.

2 of 96 benchmarks differ by more than ±10%:

Benchmark base_run (merge target) pr_run (this PR) Δ
g1_serialize_bincode 93.3±3.31ns 118.7±0.69ns ${\color{red}\mathbf{+27.3\%}}$
append_bytes/Blake2b/32B 76.3±12.42ns 84.3±18.21ns ${\color{red}\mathbf{+10.5\%}}$
All 96 benchmarks
Benchmark base_run (merge target) pr_run (this PR) Δ
EqPolynomial::evals/17 1.7±0.03ms 1.8±0.07ms +0.9%
EqPolynomial::evals/19 6.6±0.07ms 6.6±0.10ms +0.5%
EqPolynomial::evals/20 17.0±0.37ms 17.2±0.42ms +1.4%
EqPolynomial::evals/22 67.7±1.41ms 68.1±1.92ms +0.6%
EqPolynomial::evaluations/14 459.6±8.45µs 451.3±6.92µs -1.8%
EqPolynomial::evaluations/18 5.8±0.07ms 6.1±0.21ms +5.2%
EqPolynomial::evaluations/20 35.9±0.91ms 37.4±0.66ms +4.3%
F128/accumulator/deferred 1.4±0.04µs 1.4±0.02µs -0.4%
F128/accumulator/naive 2.9±0.03µs 2.9±0.02µs -0.1%
F128/mul 2.3±0.01ns 2.3±0.03ns +0.3%
F128/mul_slice 2.3±0.01µs 2.3±0.02µs +0.0%
F128/square 3.1±0.01ns 3.1±0.04ns +0.2%
F192/accumulator/deferred 3.0±0.06µs 3.0±0.02µs -0.5%
F192/accumulator/naive 4.4±0.06µs 4.4±0.07µs +0.1%
F192/mul 3.9±0.04ns 3.9±0.02ns -0.1%
F192/mul_slice 4.0±0.02µs 4.0±0.01µs -0.4%
F192/square 3.0±0.05ns 2.9±0.01ns -0.7%
F64/accumulator/deferred 760.9±10.89ns 760.5±4.55ns -0.1%
F64/accumulator/naive 1.0±0.00µs 1.0±0.01µs +0.2%
F64/mul 1.0±0.01ns 1.0±0.01ns +0.0%
F64/mul_slice 1.0±0.01µs 1.0±0.00µs -0.2%
F64/square 1.0±0.01ns 1.0±0.00ns -0.1%
Polynomial::bind/14 127.4±4.97µs 126.9±6.21µs -0.4%
Polynomial::bind/18 1.8±0.02ms 1.9±0.10ms +2.4%
Polynomial::bind/20 7.2±0.09ms 7.2±0.07ms -0.4%
Polynomial::bind_low_to_high_in_place/Fr/14 190.4±4.76µs 189.6±6.82µs -0.5%
Polynomial::bind_low_to_high_in_place/Fr/20 7.8±0.24ms 7.8±0.22ms +0.1%
Polynomial::bind_low_to_high_in_place/Fr/24 123.9±1.66ms 123.8±2.78ms -0.1%
Polynomial::bind_low_to_high_in_place/Prime128OffsetA7F7/14 67.8±0.57µs 68.4±0.25µs +0.8%
Polynomial::bind_low_to_high_in_place/Prime128OffsetA7F7/20 2.0±0.06ms 2.0±0.03ms +0.8%
Polynomial::bind_low_to_high_in_place/Prime128OffsetA7F7/24 27.0±1.23ms 27.1±0.68ms +0.3%
Polynomial::evaluate/20 47.7±1.02ms 48.5±0.89ms +1.8%
UnivariatePoly::from_evals/16 45.6±0.52µs 45.6±0.32µs +0.2%
UnivariatePoly::from_evals/3 5.6±0.08µs 5.6±0.05µs +0.4%
UnivariatePoly::from_evals/4 8.4±0.14µs 8.4±0.07µs +0.3%
UnivariatePoly::from_evals/8 20.5±0.24µs 20.6±0.16µs +0.3%
append_bytes/Blake2b/256B 351.5±11.42ns 351.5±11.87ns +0.0%
append_bytes/Blake2b/32B 76.3±12.42ns 84.3±18.21ns ${\color{red}\mathbf{+10.5\%}}$
append_bytes/Keccak/256B 716.0±9.91ns 722.8±17.59ns +1.0%
append_bytes/Keccak/32B 66.5±6.60ns 68.2±8.30ns +2.6%
append_bytes/Poseidon/256B 185.8±2.37µs 184.3±2.96µs -0.8%
append_bytes/Poseidon/32B 58.4±0.85µs 57.5±0.71µs -1.5%
challenge/Blake2b 824.1±16.47ns 813.8±5.98ns -1.3%
challenge/Keccak 505.5±5.08ns 503.0±3.55ns -0.5%
field arithmetic/add/fp128_6a23801f 4.8±0.08µs 4.7±0.02µs -0.3%
field arithmetic/add/fp128_a7f7 4.7±0.03µs 4.7±0.06µs +0.0%
field arithmetic/add/fp32_c99 2.7±0.04µs 2.7±0.02µs +0.0%
field arithmetic/add/fp64_c59 2.7±0.02µs 2.7±0.02µs +0.0%
field arithmetic/mul/fp128_6a23801f 14.1±0.22µs 14.1±0.19µs -0.2%
field arithmetic/mul/fp128_a7f7 12.8±0.31µs 12.7±0.05µs -0.3%
field arithmetic/mul/fp32_c99 4.6±0.12µs 4.5±0.18µs -2.9%
field arithmetic/mul/fp64_c59 5.9±0.11µs 5.8±0.08µs -0.5%
field arithmetic/square/fp128_6a23801f 14.3±0.17µs 14.3±0.20µs +0.1%
field arithmetic/square/fp128_a7f7 14.9±0.17µs 14.9±0.08µs -0.1%
field arithmetic/square/fp32_c99 4.1±0.03µs 4.1±0.02µs +0.0%
field arithmetic/square/fp64_c59 5.2±0.04µs 5.2±0.09µs +0.3%
field arithmetic/sub/fp128_6a23801f 3.6±0.01µs 3.6±0.15µs +0.6%
field arithmetic/sub/fp128_a7f7 3.6±0.03µs 3.6±0.06µs +0.0%
field arithmetic/sub/fp32_c99 1.6±0.01µs 1.6±0.01µs +0.1%
field arithmetic/sub/fp64_c59 1.9±0.01µs 1.9±0.01µs -0.2%
field reduction/reduce_product/fp128_a7f7 20.1±0.28µs 20.1±0.30µs +0.0%
fp64_prime63_offset259/ext2_packed_mul 21.6±0.19ns 21.6±0.09ns -0.1%
fp64_prime63_offset259/ext2_scalar_mul 5.0±0.04ns 5.0±0.07ns +0.1%
fp64_prime63_offset259/packed_mul 8.0±0.08ns 8.0±0.05ns -0.1%
fp64_prime63_offset259/scalar_mul 1.6±0.01ns 1.6±0.01ns +0.0%
fp64_prime64_offset59/ext2_dependent_mul_1024 9.7±0.04µs 9.7±0.03µs +0.0%
fp64_prime64_offset59/ext2_neg_one_scalar_mul 5.8±0.03ns 5.8±0.02ns -0.1%
fp64_prime64_offset59/ext2_packed_mul 27.1±0.09ns 27.1±0.19ns +0.1%
fp64_prime64_offset59/ext2_scalar_mul 6.2±0.07ns 6.2±0.07ns +0.1%
fp64_prime64_offset59/ext2_scalar_square 4.8±0.05ns 4.8±0.06ns +0.1%
g1_add 341.8±4.87ns 347.7±8.52ns +1.7%
g1_deserialize_bincode 7.5±0.05µs 7.4±0.05µs -0.3%
g1_double 173.9±9.58ns 167.0±1.79ns -4.0%
g1_msm/1024 11.1±0.06ms 11.1±0.05ms +0.4%
g1_msm/16 479.6±3.36µs 475.4±4.72µs -0.9%
g1_msm/256 3.7±0.02ms 3.7±0.02ms +0.3%
g1_msm/4 210.7±1.33µs 210.4±2.64µs -0.1%
g1_msm/64 1.4±0.02ms 1.4±0.02ms +0.3%
g1_scalar_mul 53.7±1.08µs 54.3±3.62µs +1.1%
g1_serialize_bincode 93.3±3.31ns 118.7±0.69ns ${\color{red}\mathbf{+27.3\%}}$
g2_msm/16 1.8±0.02ms 1.8±0.02ms +0.9%
g2_msm/256 14.2±0.07ms 14.3±0.08ms +0.8%
g2_msm/4 705.4±11.93µs 708.0±9.41µs +0.4%
g2_msm/64 5.1±0.02ms 5.1±0.03ms +1.0%
g2_scalar_mul 278.8±2.93µs 280.9±4.99µs +0.8%
gt_scalar_mul 560.7±7.29µs 558.0±6.23µs -0.5%
multi_pairing/16 5.5±0.03ms 5.5±0.02ms -0.1%
multi_pairing/2 1.2±0.03ms 1.2±0.01ms +0.1%
multi_pairing/4 1.8±0.01ms 1.8±0.01ms -0.7%
multi_pairing/8 3.1±0.02ms 3.1±0.04ms -0.3%
pairing 930.6±12.24µs 934.4±8.62µs +0.4%
pedersen_commit/1024 11.1±0.06ms 11.3±0.05ms +1.3%
pedersen_commit/16 544.8±7.21µs 543.1±2.89µs -0.3%
pedersen_commit/256 3.8±0.02ms 3.8±0.02ms +1.0%
pedersen_commit/4 264.5±2.21µs 265.0±2.85µs +0.2%
pedersen_commit/64 1.4±0.01ms 1.5±0.01ms +0.7%

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant