Skip to content

feat(mpcs): share jagged inner Basefold opening#61

Merged
kunxian-xia merged 1 commit into
mainfrom
feat/jagged_single_commit
May 20, 2026
Merged

feat(mpcs): share jagged inner Basefold opening#61
kunxian-xia merged 1 commit into
mainfrom
feat/jagged_single_commit

Conversation

@hero78119
Copy link
Copy Markdown
Collaborator

@hero78119 hero78119 commented May 19, 2026

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:

  • Split one Jagged round into jagged_batch_open_round, which reduces the Jagged claims and returns inner opening claims instead of immediately opening the inner PCS.
  • Make JaggedProof carry rounds plus one required inner_proof; no optional/shared-proof compatibility path.
  • In Jagged::batch_open, collect all round-local inner opening claims and call InnerPcs::batch_open once.
  • In Jagged::batch_verify, replay each Jagged round, collect the corresponding inner verify openings, and call InnerPcs::batch_verify once.
  • Add PCS proof-size breakdown hooks for Basefold/Jagged so downstream Ceno can report where proof bytes go.

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 fmt -p mpcs
cargo check -p mpcs
cargo check -p mpcs --all-targets

cargo check -p mpcs --all-targets passes. Existing unrelated warning remains in crates/mpcs/benches/interpolate.rs for an unused collect return value.

Downstream validation:

  • ceno-gpu: cargo check -p cuda_hal --features bb31 with local gkr-backend patch.
  • ceno: cargo check -p ceno_zkvm --features gpu with local gkr-backend and ceno-gpu patches.
  • ceno-reth-benchmark: block 23587691, shard 0, 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 JaggedBatchOpenProof to 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.md strictly.

  • Perform review only; do not commit/push/propose code changes.
  • Prefer inline comments on changed lines for each actionable finding.
  • If inline comments are unavailable, use [severity] path:line (symbol) format.
  • Prioritize soundness, performance, and architecture risks over style.
  • Output order: findings by severity, then open questions, then brief summary.
  • If PR description is empty or missing key context, report PR metadata: description as a finding.

Base automatically changed from feat/witgen_gpu to main May 19, 2026 05:08
@hero78119 hero78119 force-pushed the feat/jagged_single_commit branch from 9a62798 to 9a05064 Compare May 19, 2026 07:55
@hero78119 hero78119 force-pushed the feat/jagged_single_commit branch from 9a05064 to 7920417 Compare May 19, 2026 07:58
@hero78119 hero78119 changed the title feat: batch jagged openings into one inner proof feat(mpcs): share jagged inner Basefold opening May 19, 2026
@kunxian-xia kunxian-xia merged commit 8b847f4 into main May 20, 2026
2 checks passed
@kunxian-xia kunxian-xia deleted the feat/jagged_single_commit branch May 20, 2026 01:43
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.

2 participants