Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save weikengchen/ed8689e6d7e197bda6ab762bcae56990 to your computer and use it in GitHub Desktop.

Select an option

Save weikengchen/ed8689e6d7e197bda6ab762bcae56990 to your computer and use it in GitHub Desktop.
My AI's question
Hi — we are migrating a JWT/SHA256 redaction proof to upstream Plonky3 WHIR-ZK and would appreciate advice on the intended architecture.
Current design:
- We pin upstream Plonky3 main directly, no fork.
- We use `p3_whir::pcs::zk::HidingWhirPcs` through the multilinear PCS interface.
- We split the n=8 proof into:
1. A native WHIR-ZK current-row slice.
2. A residual ordinary LogUp batch-STARK slice.
- The native slice has 4 current-row AIRs:
- MergedShaRowsCurrentRowCore chain A: h=512, main=418, prep=13
- MergedShaRowsCurrentRowCore chain B: h=64, main=418, prep=13
- Sha256ChainCurrentRowCore: h=64, main=64, prep=6
- JwtRedactCore: h=512, main=2, prep=6
- These AIRs have no next-row reads and no periodic columns, max degree 3, but they do use preprocessed columns.
- Today our local wrapper proves them as an ordered sequence of independent native WHIR proofs. Each AIR does its own `commit_trace`, AIR sumcheck, and `HidingWhirPcs.open`.
- We use a stacked row+column multilinear point model. The PCS variable count is the max over instances of `log2(height) + log2(next_power_of_two(width))`; for the wide SHA row AIR this reaches 18 variables.
- Current native WHIR settings are still test-tier: security_level=32, starting_log_inv_rate=2, folding_factor=4, ell_zk=4, mask_log_inv_rate=1.
Measured on our n=8 fixture:
- Plain FRI full proof: ~76.9ms prove, 645KB proof.
- HidingFriPcs ZK full proof: ~627.7ms prove, 1.84MB proof.
- Native WHIR-ZK current-row slice only: ~4989ms prove, 714KB proof.
- The native WHIR proof bytes are almost entirely opening material: 711834 / 714180 bytes. The tiny JwtRedactCore proof is still ~174KB, so fixed WHIR-ZK opening/base-case cost dominates.
Questions:
1. Is the intended upstream architecture to prove multiple AIRs through one `p3-multi-stark` AIR zerocheck/composition layer and one PCS-bound opening, rather than one `HidingWhirPcs` proof per AIR?
2. Is PR #1879 intended to grow into that PCS-bound multi-AIR path? What follow-up is expected for binding opened values to `HidingWhirPcs`?
3. What is the intended support plan for AIRs with preprocessed columns in the multilinear AIR zerocheck?
4. Are we abusing `HidingWhirPcs.open` by opening every trace column as separate multilinear claims at one row point? Is there a better row/column batching shape?
5. For proving time specifically, should we expect #1804 to materially help this workload, or is the main issue repeated independent WHIR proofs?
6. For proof size/verifier time, #1805 seems directly relevant. But should we expect any prover-time improvement from it?
7. Are there recommended WHIR-ZK parameter choices for this kind of medium-width AIR: folding factor, starting rate, ell_zk, mask rate, and CapacityBound vs other assumptions?
Our goal is to stay strictly on upstream Plonky3 APIs and avoid a local protocol fork. We are trying to understand whether we should wait for/align with `p3-multi-stark` composition, reshape our AIRs, or change how we batch multilinear openings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment