Skip to content
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

refactor: Improve Spartan SNARK polynomial computations and evaluations #293

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

huitseeker
Copy link
Contributor

@huitseeker huitseeker commented Jan 17, 2024

Summary

This gathers the changes to the pre-processing SNARK excerpted from the Supernova implementation in PR #283. The main changes extracted here are the introduction of the masked eq polynomial (and its use fixing this issue), additional sum-check tooling, removal of two calls to evaluation argument.

Main reference Arecibo PRs:

More details (click to expand)
  • Enhancement of polynomial related code in Spartan protocol including new polynomial types, modified existing types, better evaluation methods, and improved polynomial operations.
  • Introduction of squares function and change in the generation of t_pow in Spartan.
  • Addition of a new polynomial type through MaskedEqPolynomial with methods for its creation and evaluation.
  • Enhancements in UniPoly struct by addition of PartialEq, and Eq traits.
  • Improvements in snark.rs for proving and verifying batch evaluation claims, leveraging gamma and rho for random linear combinations, and optimizing various variable computations.
  • Updates in multilinear.rs with refactoring, optimization, error handling, and supplementing unit tests.
  • Refactor in spartan/mod.rs with import updates, function overhauls, struct visibility changes, and asynchronous operations for efficient calculations.
  • Additions and amendments in sumcheck.rs for batch verification, handling of vectors of claims, handling of cubic bounds with additive terms, visibility adjustments, and typo fixes.
  • Modifications in eq.rs including a debug derive for EqPolynomial, enhanced visibility of r vector, provision of evals_from_points for enhanced evaluation, and addition of FromIterator implementation.

This gathers the changes to the pre-processing SNARK excerpted from the Supernova implementation in PR microsoft#283.
The main changes extracted here are the introduction of the masked eq polynomial (and its use fixing [this issue](https://hackmd.io/@adr1anh/Sy08YaVBa)), additional sum-check tooling, removal of two calls to evaluation argument.

Main reference Arecibo PRs:
- argumentcomputer/arecibo#106
- argumentcomputer/arecibo#131
- argumentcomputer/arecibo#174
- argumentcomputer/arecibo#182

- Enhancement of polynomial related code in Spartan protocol including new polynomial types, modified existing types, better evaluation methods, and improved polynomial operations.
- Introduction of `squares` function and change in the generation of `t_pow` in Spartan.
- Addition of a new polynomial type through `MaskedEqPolynomial` with methods for its creation and evaluation.
- Enhancements in `UniPoly` struct by addition of `PartialEq`, and `Eq` traits.
- Improvements in `snark.rs` for proving and verifying batch evaluation claims, leveraging `gamma` and `rho` for random linear combinations, and optimizing various variable computations.
- Updates in `multilinear.rs` with refactoring, optimization, error handling, and supplementing unit tests.
- Refactor in `spartan/mod.rs` with import updates, function overhauls, struct visibility changes, and asynchronous operations for efficient calculations.
- Additions and amendments in `sumcheck.rs` for batch verification, handling of vectors of claims, handling of cubic bounds with additive terms, visibility adjustments, and typo fixes.
- Modifications in `eq.rs` including a debug derive for `EqPolynomial`, enhanced visibility of `r` vector, provision of `evals_from_points` for enhanced evaluation, and addition of `FromIterator` implementation.

Co-authored-by: porcuquine <[email protected]>
Co-authored-by: Matej Penciak <[email protected]>
Co-authored-by: Adrian Hamelink <[email protected]>
@srinathsetty srinathsetty merged commit 499ba16 into microsoft:main Jan 19, 2024
6 checks passed
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.

3 participants