Skip to content

Conversation

@srinathsetty
Copy link
Collaborator

update blitzar

Copy link
Contributor

Copilot AI left a 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 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_reduce and batch_eval_verify from snark.rs to mod.rs for better code organization
  • Fixed sumcheck code where constant polynomials returned non-zero quadratic coefficients
  • Fixed potential panic in batch_diff_size when 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
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.

1 participant