refactor: Improve Spartan SNARK polynomial computations and evaluations #293
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 argumentcomputer/arecibo#106CompressedSNARK
argumentcomputer/arecibo#131supernova::CompressedSNARK
argumentcomputer/arecibo#174More details (click to expand)
squares
function and change in the generation oft_pow
in Spartan.MaskedEqPolynomial
with methods for its creation and evaluation.UniPoly
struct by addition ofPartialEq
, andEq
traits.snark.rs
for proving and verifying batch evaluation claims, leveraginggamma
andrho
for random linear combinations, and optimizing various variable computations.multilinear.rs
with refactoring, optimization, error handling, and supplementing unit tests.spartan/mod.rs
with import updates, function overhauls, struct visibility changes, and asynchronous operations for efficient calculations.sumcheck.rs
for batch verification, handling of vectors of claims, handling of cubic bounds with additive terms, visibility adjustments, and typo fixes.eq.rs
including a debug derive forEqPolynomial
, enhanced visibility ofr
vector, provision ofevals_from_points
for enhanced evaluation, and addition ofFromIterator
implementation.