@@ -1847,12 +1847,24 @@ pub fn prove_zk(
18471847 // public auxiliary vectors) toggle this flag off and back on.
18481848 prover. accumulator . zk_mode = true ;
18491849
1850- let ( poly_map, commitments) = ONNXProof :: < F , T , PCS > :: commit_witness_polynomials (
1851- pp. model ( ) ,
1852- & prover. trace ,
1853- & pp. generators ,
1854- & mut prover. transcript ,
1855- ) ;
1850+ // The ZK pipeline proves `Add`/`Sub`/`Sum` un-clamped (the saturating clamp
1851+ // lookup is not yet wired into `prove_zk`; per-node provers are the
1852+ // un-clamped `AddProver`/`SubProver`/`SumAxisProver`). Those provers never
1853+ // open the clamp one-hot decomposition (`ClampRaD`), so committing it would
1854+ // leave it without an opening-reduction sumcheck. Filter it out here so the
1855+ // committed set matches what the zk sumchecks actually open. (The non-ZK
1856+ // path commits and opens `ClampRaD` as usual.)
1857+ let poly_map: std:: collections:: BTreeMap <
1858+ common:: CommittedPoly ,
1859+ joltworks:: poly:: multilinear_polynomial:: MultilinearPolynomial < F > ,
1860+ > = ONNXProof :: < F , T , PCS > :: polynomial_map ( pp. model ( ) , & prover. trace )
1861+ . into_iter ( )
1862+ . filter ( |( poly, _) | !matches ! ( poly, common:: CommittedPoly :: ClampRaD ( ..) ) )
1863+ . collect ( ) ;
1864+ let commitments = ONNXProof :: < F , T , PCS > :: commit_to_polynomials ( & poly_map, & pp. generators ) ;
1865+ for commitment in & commitments {
1866+ prover. transcript . append_serializable ( commitment) ;
1867+ }
18561868 // The output claim is a public scalar derived from IO; both prover and
18571869 // verifier (`verify_zk` does `transcript.append_scalar(&expected_output_claim)`)
18581870 // append it in the clear. Toggle prover zk_mode off so its append fires.
0 commit comments