Open
Conversation
update blitzar
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Spartan SNARK implementation by moving generic batch evaluation functions from snark.rs to the parent mod.rs module, making them more widely accessible. Additionally, it fixes a critical bug in the sumcheck protocol for constant polynomials and updates the blitzar dependency.
Changes:
- Moved
batch_eval_reduceandbatch_eval_verifyfromsnark.rstomod.rsfor better code organization - Fixed sumcheck code where constant polynomials returned non-zero quadratic coefficients
- Fixed potential panic in
batch_diff_sizewhen handling different-sized polynomials - Updated blitzar dependency from 4.4.2 to 5.0.0 and added CI workflow for GPU feature validation
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Version bump to 0.52.0 and blitzar update to 5.0.0 |
| .github/workflows/rust.yml | Added check-gpu-feature job to verify blitzar feature compilation |
| src/spartan/sumcheck.rs | Fixed quadratic coefficient for constant polynomials in batch sumcheck |
| src/spartan/snark.rs | Removed batch evaluation functions (moved to mod.rs), uses new public constructors, added test for batching |
| src/spartan/mod.rs | Added batch evaluation functions from snark.rs, made helper methods public, fixed batch_diff_size panic, changed transcript label from "g" to "c" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add prove_quad_batch_prod_split_eq to sumcheck that uses EqSumCheckInstance - Add evaluation_points_quad_prod and final_evaluation methods to EqSumCheckInstance - Update batch_eval_reduce to use split eq instead of materializing full eq polynomials - Memory savings: O(2^n) -> O(2^(n/2)) per claim for eq polynomial storage
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.
update blitzar