Skip to content

[5/6] Avoid zero-padding prover instance commitments - #15

Merged
ValarDragon merged 1 commit into
mainfrom
agent/halo2-sparse-instance-prover
Aug 13, 2026
Merged

ValarDragon merged 1 commit into
mainfrom
agent/halo2-sparse-instance-prover

Conversation

@ValarDragon

@ValarDragon ValarDragon commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Main-line stack position: 5 of 6
Base: main
Original base: zcash/halo2 main@cafc26e269e4b1b123af8f2a0aa36bff6474448e
Migrates: zcash/halo2#930

Summary

Commit directly to each supplied public-instance prefix plus the blinding
generator. The omitted trailing Lagrange coefficients are structural zeros,
so processing them in the commitment MSM is unnecessary.

The prover still constructs the identical zero-padded polynomial for
interpolation, coset evaluation, and opening. Only the commitment work changes.
The prefix-commitment helper is shared with the preceding verifier layer from
the private plonk parent module.

Measured impact

The original single-thread genuine one-action Orchard benchmark saved roughly
8 ms, or about 0.5%, on the then-current optimization stack.

Validation

The original patch passed formatting, default/no-default library tests, and
Clippy with warnings denied. A focused test proves equivalence with the old
zero-padded commitment for empty input and input containing an internal zero.

The Rust 1.88 main-line stack also passed:

  • cargo +1.88 test -p halo2_proofs --release --lib
  • cargo +1.88 test -p halo2_proofs --release --no-default-features --lib
  • all-target/all-feature Clippy with -D warnings and only existing
    baseline lint categories allowed
  • cargo +1.88 test -p orchard --release

API surface

No public or pub(crate) API, function signature, visibility, feature, or
dependency changes. The shared commitment helper remains private.

@ValarDragon ValarDragon changed the title [5/6] Avoid zero-padding prover instance commitments [5/5] Avoid zero-padding prover instance commitments Aug 12, 2026
@ValarDragon ValarDragon changed the title [5/5] Avoid zero-padding prover instance commitments [5/6] Avoid zero-padding prover instance commitments Aug 12, 2026
@ValarDragon
ValarDragon force-pushed the agent/halo2-sparse-instance-prover branch from 12f8d38 to 48baa87 Compare August 12, 2026 16:58
@ValarDragon
ValarDragon marked this pull request as ready for review August 12, 2026 23:41
Base automatically changed from agent/halo2-verifier-instance-msm to main August 13, 2026 14:45
@ValarDragon
ValarDragon force-pushed the agent/halo2-sparse-instance-prover branch from 48baa87 to bf9b0c9 Compare August 13, 2026 14:46
@ValarDragon
ValarDragon force-pushed the agent/halo2-sparse-instance-prover branch from bf9b0c9 to 0ec2905 Compare August 13, 2026 14:49
@ValarDragon
ValarDragon merged commit 9f7310c into main Aug 13, 2026
2 checks passed
@ValarDragon
ValarDragon deleted the agent/halo2-sparse-instance-prover branch August 28, 2026 18:50
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