Skip to content

Add quadratic and cubic sumcheck #1003

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jotabulacios
Copy link
Contributor

TITLE

Description

This PR improves the previous version of the sumcheck protocol allowing to support quadratic and cubic cases

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization

Checklist

  • Linked to Github Issue
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2025

Codecov Report

Attention: Patch coverage is 88.44697% with 61 lines in your changes missing coverage. Please review.

Project coverage is 72.25%. Comparing base (3a04406) to head (0991d0b).

Files with missing lines Patch % Lines
crates/provers/sumcheck/src/lib.rs 93.09% 23 Missing ⚠️
crates/provers/sumcheck/src/verifier.rs 79.16% 20 Missing ⚠️
crates/provers/sumcheck/src/prover.rs 81.44% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1003      +/-   ##
==========================================
+ Coverage   72.22%   72.25%   +0.02%     
==========================================
  Files         160      160              
  Lines       35340    35620     +280     
==========================================
+ Hits        25525    25737     +212     
- Misses       9815     9883      +68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jotabulacios jotabulacios marked this pull request as ready for review May 7, 2025 19:45
@jotabulacios jotabulacios requested a review from a team as a code owner May 7, 2025 19:45
if factors.is_empty() {
return Err("Cannot sum product of zero factors.".to_string());
}
let num_total_vars = factors[0].num_vars();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can combine the previous check with this one, to void getting the element by index with []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Solved in ccbb7f9

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good solution 🏅


// Initialize Fiat-Shamir transcript
let mut transcript = DefaultTranscript::<F>::default();
transcript.append_bytes(b"initial_sum");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transcript should also contain the number of factors and number of variables

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.

4 participants