feat(mpcs): share jagged inner Basefold opening#61
Merged
Conversation
9a62798 to
9a05064
Compare
9a05064 to
7920417
Compare
kunxian-xia
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Jagged PCS previously produced one inner Basefold proof per Jagged batch round. In Ceno, witness and fixed commitments are opened as separate Jagged rounds but should share the same inner Basefold opening proof/query set so proof size does not pay duplicate inner PCS overhead.
Approach
Keep Jagged opening semantics unchanged at the outer layer: each Jagged round still has its own sumcheck, column evaluations, and assist proof, and each commitment keeps its own Merkle root. Refactor only the inner opening boundary:
jagged_batch_open_round, which reduces the Jagged claims and returns inner opening claims instead of immediately opening the inner PCS.JaggedProofcarryroundsplus one requiredinner_proof; no optional/shared-proof compatibility path.Jagged::batch_open, collect all round-local inner opening claims and callInnerPcs::batch_openonce.Jagged::batch_verify, replay each Jagged round, collect the corresponding inner verify openings, and callInnerPcs::batch_verifyonce.Design rationale: this matches the existing multi-opening PCS shape: separate high-level openings, separate commitments, one batched inner PCS proof. The transcript order is explicit and mirrored: all Jagged reductions first, then one inner Basefold opening.
Testing
cargo check -p mpcs --all-targetspasses. Existing unrelated warning remains incrates/mpcs/benches/interpolate.rsfor an unusedcollectreturn value.Downstream validation:
ceno-gpu:cargo check -p cuda_hal --features bb31with local gkr-backend patch.ceno:cargo check -p ceno_zkvm --features gpuwith local gkr-backend and ceno-gpu patches.ceno-reth-benchmark: block23587691, shard0, GPU, verifier passed.Risk / Rollout
Main risk is transcript/order mismatch because the inner Basefold proof moved from per-round execution to one shared execution after all Jagged reductions. The verifier follows the same order and focused checks plus downstream e2e passed.
Rollback is localized: restore
JaggedBatchOpenProofto carry per-round inner proof and call the inner PCS inside each Jagged round.Copilot Reviewer Directive (keep this section)
When Copilot reviews this PR, apply
.github/copilot-instructions.mdstrictly.[severity] path:line (symbol)format.PR metadata: descriptionas a finding.