refactor: Improve Spartan SNARK polynomial computations and evaluations#293
Merged
srinathsetty merged 1 commit intomicrosoft:mainfrom Jan 19, 2024
Merged
refactor: Improve Spartan SNARK polynomial computations and evaluations#293srinathsetty merged 1 commit intomicrosoft:mainfrom
srinathsetty merged 1 commit intomicrosoft:mainfrom
Conversation
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: - lurk-lang/arecibo#106 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/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 <porcuquine@users.noreply.github.com> Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com> Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
a2fee3a to
0861544
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.
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:
snark.rs: factor out batch evaluation Sumcheck lurk-lang/arecibo#106CompressedSNARKlurk-lang/arecibo#131supernova::CompressedSNARKlurk-lang/arecibo#174More details (click to expand)
squaresfunction and change in the generation oft_powin Spartan.MaskedEqPolynomialwith methods for its creation and evaluation.UniPolystruct by addition ofPartialEq, andEqtraits.snark.rsfor proving and verifying batch evaluation claims, leveraginggammaandrhofor random linear combinations, and optimizing various variable computations.multilinear.rswith refactoring, optimization, error handling, and supplementing unit tests.spartan/mod.rswith import updates, function overhauls, struct visibility changes, and asynchronous operations for efficient calculations.sumcheck.rsfor batch verification, handling of vectors of claims, handling of cubic bounds with additive terms, visibility adjustments, and typo fixes.eq.rsincluding a debug derive forEqPolynomial, enhanced visibility ofrvector, provision ofevals_from_pointsfor enhanced evaluation, and addition ofFromIteratorimplementation.