-
Notifications
You must be signed in to change notification settings - Fork 7
feat/snark composition #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… bigints into field elements.
…gomery/barrett reduce
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces witness generation machinery and types for SNARK composition in the context of the Dory protocol. The changes implement multilinear extension (MLE) operations, Fq12 polynomial conversions, and witness generation for exponentiation steps using square-and-multiply.
- Adds comprehensive witness generation and verification for exponentiation operations with polynomial constraints
- Implements Fq12 to polynomial coefficient mapping and multilinear extension evaluations
- Includes extensive test coverage for MLE operations, constraint verification, and soundness testing
Reviewed Changes
Copilot reviewed 19 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| jolt-optimizations/src/witness_gen.rs | Core witness generation logic for exponentiation steps with MLE constraint verification |
| jolt-optimizations/src/fq12_poly.rs | Fq12 polynomial operations including tower basis mapping and multilinear extensions |
| jolt-optimizations/tests/witness_test.rs | Comprehensive tests for witness generation, constraint verification, and soundness |
| jolt-optimizations/tests/mle_tests.rs | Tests for multilinear extension evaluation and polynomial agreement |
| jolt-optimizations/src/lib.rs | Module exports and public API additions |
| Multiple files | Code formatting and import organization improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ); | ||
| } | ||
|
|
||
| println!("✓ Verified: H̃(z) = 0 at 20 random field elements (Sumcheck correct)"); |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded message claims '20 random field elements' but the test loop runs 10000 iterations. This creates confusion and should be updated to match the actual test count.
| println!("✓ Verified: H̃(z) = 0 at 20 random field elements (Sumcheck correct)"); | |
| println!("✓ Verified: H̃(z) = 0 at 10,000 random field elements (Sumcheck correct)"); |
| use ark_ff::{BigInteger, Field, One, PrimeField, Zero}; | ||
| use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; | ||
|
|
||
| /// square-and-multiply witness generation |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The comment should use title case: 'Square-and-multiply witness generation' for consistency with documentation standards.
| /// square-and-multiply witness generation | |
| /// Square-and-Multiply Witness Generation |
moodlezoup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple of nits/questions
Introduces the witness gen machinery and types for the recursion-context dory snark