Skip to content
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

snark.rs: factor out batch evaluation Sumcheck #106

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

adr1anh
Copy link
Contributor

@adr1anh adr1anh commented Nov 8, 2023

This PR factor's out the 3rd Sumcheck instance in snark.rsso that it can be used in the upcoming batched compressed SNARK work.

@adr1anh adr1anh marked this pull request as ready for review November 9, 2023 14:12
@adr1anh adr1anh added this pull request to the merge queue Nov 9, 2023
Merged via the queue into lurk-lab:dev with commit e83e322 Nov 9, 2023
6 checks passed
@adr1anh adr1anh deleted the batched_sumcheck_evals branch November 9, 2023 14:50
huitseeker added a commit that referenced this pull request Nov 15, 2023
…onding clippy lint

- Updated function parameters in `ppsnark.rs` and `snark.rs` from `Vec<G::Scalar>` to `&[G::Scalar]` (introduced in #106),
- Modified the `prove` function in `ppsnark.rs` to also convert `T_row`, `W_row`, `T_col`, and `W_col` from `Vec` to slices (`&[G::Scalar]`).
- Enhanced the `xclippy` alias in `.cargo/config` by adding `-Wclippy::checked_conversions`, `-Wclippy::needless_pass_by_value`, and `-Wclippy::unnecessary_mut_passed` and reorganizing its elements.
github-merge-queue bot pushed a commit that referenced this pull request Nov 15, 2023
* refactor: Remove nedless pass-by-value instances, turn on the corresponding clippy lint

- Updated function parameters in `ppsnark.rs` and `snark.rs` from `Vec<G::Scalar>` to `&[G::Scalar]` (introduced in #106),
- Modified the `prove` function in `ppsnark.rs` to also convert `T_row`, `W_row`, `T_col`, and `W_col` from `Vec` to slices (`&[G::Scalar]`).
- Enhanced the `xclippy` alias in `.cargo/config` by adding `-Wclippy::checked_conversions`, `-Wclippy::needless_pass_by_value`, and `-Wclippy::unnecessary_mut_passed` and reorganizing its elements.

* `PolyEval{Instance, Witness}::pad`
Accept `Vec` rather that `&[T]` to avoid copies

Co-authored-by: Francois Garillot <francois@garillot.net>

---------

Co-authored-by: Adrian Hamelink <adrian@hamelink.com>
github-actions bot pushed a commit that referenced this pull request Nov 29, 2023
…ims (Arecibo backport) (#273)

* `snark.rs`: factor out batch evaluation Sumcheck (#106)

* Factor batch eval

* Comments

* refactor: Remove nedless pass-by-value instances, turn on clippy (#122)

* refactor: Remove nedless pass-by-value instances, turn on the corresponding clippy lint

- Updated function parameters in `ppsnark.rs` and `snark.rs` from `Vec<G::Scalar>` to `&[G::Scalar]` (introduced in #106),
- Modified the `prove` function in `ppsnark.rs` to also convert `T_row`, `W_row`, `T_col`, and `W_col` from `Vec` to slices (`&[G::Scalar]`).
- Enhanced the `xclippy` alias in `.cargo/config` by adding `-Wclippy::checked_conversions`, `-Wclippy::needless_pass_by_value`, and `-Wclippy::unnecessary_mut_passed` and reorganizing its elements.

* `PolyEval{Instance, Witness}::pad`
Accept `Vec` rather that `&[T]` to avoid copies

Co-authored-by: Francois Garillot <francois@garillot.net>

---------

Co-authored-by: Adrian Hamelink <adrian@hamelink.com>

---------

Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
Co-authored-by: Adrian Hamelink <adrian@hamelink.com>
huitseeker added a commit that referenced this pull request Dec 17, 2023
This backports the following Arecibo PRs:
- #2
- #3
- #10
- #16
- #23
- #30
- #28
- #41
- #45
- #50
- #56
- #51
- #72
- #92
- #95
- #97
- #101
- #110
- #106
- #112
- #114
- #119
- #120
- #127
- #123
- #131
- #174
- #175
- #182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Dec 17, 2023
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Dec 18, 2023
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 3, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 4, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 16, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to huitseeker/Nova that referenced this pull request Jan 17, 2024
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-lab/arecibo#106
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/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>
huitseeker added a commit to huitseeker/Nova that referenced this pull request Jan 17, 2024
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-lab/arecibo#106
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/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>
huitseeker added a commit to huitseeker/Nova that referenced this pull request Jan 17, 2024
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-lab/arecibo#106
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/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>
huitseeker added a commit to huitseeker/Nova that referenced this pull request Jan 17, 2024
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-lab/arecibo#106
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/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>
srinathsetty pushed a commit to microsoft/Nova that referenced this pull request Jan 19, 2024
…ns (#293)

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](https://hackmd.io/@adr1anh/Sy08YaVBa)), additional sum-check tooling, removal of two calls to evaluation argument.

Main reference Arecibo PRs:
- lurk-lab/arecibo#106
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/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>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 25, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 25, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jan 31, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Feb 21, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Mar 7, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request May 2, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request May 3, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
huitseeker added a commit to lurk-lab/Nova that referenced this pull request Jun 8, 2024
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing:
- a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme,
- a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques.

References:
- the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction,
  and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa).
- the Readme at `src/supernova/Readme.md`

This backports the following Arecibo PRs:
- lurk-lab/arecibo#2
- lurk-lab/arecibo#3
- lurk-lab/arecibo#10
- lurk-lab/arecibo#16
- lurk-lab/arecibo#23
- lurk-lab/arecibo#30
- lurk-lab/arecibo#28
- lurk-lab/arecibo#41
- lurk-lab/arecibo#45
- lurk-lab/arecibo#50
- lurk-lab/arecibo#56
- lurk-lab/arecibo#51
- lurk-lab/arecibo#72
- lurk-lab/arecibo#92
- lurk-lab/arecibo#95
- lurk-lab/arecibo#97
- lurk-lab/arecibo#101
- lurk-lab/arecibo#110
- lurk-lab/arecibo#106
- lurk-lab/arecibo#112
- lurk-lab/arecibo#114
- lurk-lab/arecibo#119
- lurk-lab/arecibo#120
- lurk-lab/arecibo#127
- lurk-lab/arecibo#123
- lurk-lab/arecibo#131
- lurk-lab/arecibo#174
- lurk-lab/arecibo#175
- lurk-lab/arecibo#182

Co-authored-by: WYATT <wyattbenno@gmail.com>
Co-authored-by: Hanting Zhang <hantingz@usc.edu>
Co-authored-by: Ming <hero78119@gmail.com>
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
Co-authored-by: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com>
Co-authored-by: Matej Penciak <96667244+mpenciak@users.noreply.github.com>
Co-authored-by: Adrian Hamelink <adrian.hamelink@gmail.com>
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.

None yet

2 participants