Optimize dense q1 row dot products - #208
Draft
1sgtpepper wants to merge 1 commit into
Draft
Conversation
4 tasks
1sgtpepper
marked this pull request as ready for review
June 9, 2026 04:00
1sgtpepper
requested review from
ElijahVlasov,
albert-garreta,
frozenspider and
osdnk
as code owners
June 9, 2026 04:00
1sgtpepper
marked this pull request as draft
July 1, 2026 07:54
1sgtpepper
added a commit
to 1sgtpepper/zinc-plus
that referenced
this pull request
Jul 8, 2026
… error types, add b-equivalence tests Public API: - Restore FromWithConfig<&Zt::CombR> bound on prove/prove_f/prove_single, protocol prover macros, and bench functions. MontgomeryIntegerInnerProduct is now additive rather than a replacement. Error types: - Revert InnerProductError to exhaustive two-variant enum (remove #[non_exhaustive] and FieldConfigMismatch). - Add MontgomeryError (pub, in montgomery_inner_product) with LengthMismatch and FieldConfigMismatch variants. - Add From<MontgomeryError> for ZipError converting at the phase_prove boundary. Prover: - Replace batch_size==1 special case with unified b-accumulation loop. - Use MontgomeryError→ZipError conversion via ? operator. Tests: - Add montgomery_b_matches_field_lift_for_single_poly — direct old-vs-new b equivalence with wide signed CombR. - Add montgomery_b_matches_field_lift_for_multi_poly_batch — same for batch_size=3 with pre-sampled alphas.
1sgtpepper
added a commit
to 1sgtpepper/zinc-plus
that referenced
this pull request
Jul 8, 2026
… error types, add b-equivalence tests Public API: - Restore FromWithConfig<&Zt::CombR> bound on prove/prove_f/prove_single, protocol prover macros, and bench functions. MontgomeryIntegerInnerProduct is now additive rather than a replacement. Error types: - Revert InnerProductError to exhaustive two-variant enum (remove #[non_exhaustive] and FieldConfigMismatch). - Add MontgomeryError (pub, in montgomery_inner_product) with LengthMismatch and FieldConfigMismatch variants. - Add From<MontgomeryError> for ZipError converting at the phase_prove boundary. Prover: - Replace batch_size==1 special case with unified b-accumulation loop. - Use MontgomeryError→ZipError conversion via ? operator. Tests: - Add montgomery_b_matches_field_lift_for_single_poly — direct old-vs-new b equivalence with wide signed CombR. - Add montgomery_b_matches_field_lift_for_multi_poly_batch — same for batch_size=3 with pre-sampled alphas.
1sgtpepper
added a commit
to 1sgtpepper/zinc-plus
that referenced
this pull request
Jul 8, 2026
… error types, add b-equivalence tests Public API: - Restore FromWithConfig<&Zt::CombR> bound on prove/prove_f/prove_single, protocol prover macros, and bench functions. MontgomeryIntegerInnerProduct is now additive rather than a replacement. Error types: - Revert InnerProductError to exhaustive two-variant enum (remove #[non_exhaustive] and FieldConfigMismatch). - Add MontgomeryError (pub, in montgomery_inner_product) with LengthMismatch and FieldConfigMismatch variants. - Add From<MontgomeryError> for ZipError converting at the phase_prove boundary. Prover: - Replace batch_size==1 special case with unified b-accumulation loop. - Use MontgomeryError→ZipError conversion via ? operator. Tests: - Add montgomery_b_matches_field_lift_for_single_poly — direct old-vs-new b equivalence with wide signed CombR. - Add montgomery_b_matches_field_lift_for_multi_poly_batch — same for batch_size=3 with pre-sampled alphas.
1sgtpepper
force-pushed
the
feature/dense-q1-row-dot-products
branch
from
July 11, 2026 05:11
ac7d221 to
6ec2cef
Compare
1sgtpepper
force-pushed
the
feature/dense-q1-row-dot-products
branch
3 times, most recently
from
August 10, 2026 16:21
02a4ca5 to
212861a
Compare
1sgtpepper
force-pushed
the
feature/dense-q1-row-dot-products
branch
from
August 10, 2026 16:23
212861a to
7e4f71c
Compare
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.
What changed
Part of #134.
The normal
ZipPlus::prove_fpath now prepares denseq_1once for repeated row dot products. Fixed-width runtime Montgomery fields shift eachq_1element once and multiply it by the canonical signed coefficient residue, avoiding a Montgomery projection for every coefficient while preserving the existing field result and transcript layout. Fixed and boxed field configurations keep the prior projection semantics.The production Zinc+ prover reaches this path through its existing PCS openings. The Zip+ prover benchmarks now use non-Boolean evaluation points so their
q_1tensors are dense.Validation
7e4f71c: nightly formatting, Clippy across all targets and features, and typo checks7e4f71c:cargo llvm-cov --workspace --lcov --output-path lcov.info --ignore-filename-regex '^examples/'