-
Notifications
You must be signed in to change notification settings - Fork 58
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
Remove Groth16/SnarkPack+. #774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great simplification 🙏🏼.
According to the PR description, there seems to be a few issues to be written upon merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please remove
bellperson
andmemmap
as dependencies, - please remove
crate::proof::verify_sequential_css
,
Otherwise this looks pretty good!
d87c5c0
d87c5c0
to
3d3791e
Compare
3d3791e
to
a44c11b
Compare
Hmmmm, this is now failing on the computed constraint count in the LEM It's not obvious to me why this is suddenly showing up now, especially since I thought LEM circuit generation was self-contained. @arthurpaulino @gabriel-barrett Any ideas? |
AAh! The cost of For more context: we count constraints in two ways. There's the normal way, synthesizing a circuit with a blank frame and then using the API to get the number of constraints. And we count constraints with a function that also serves as a live documentation for how the number of constraints in a LEM grows. Both counts must match the hardcoded value. |
fc90ebd
to
e74150d
Compare
e74150d
to
24aeba6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goodbye, Groth16 👋
@@ -18,7 +18,6 @@ base64 = { workspace = true } | |||
base-x = "0.2.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of memmap isn't there, but I think it doesn't matter as #777 is about to re-introduce it.
let bit_decomp_cost = match F::FIELD { | ||
LanguageField::Pallas => 298, | ||
LanguageField::Vesta => 301, | ||
LanguageField::BLS12_381 => 388, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this still a thing if we remove BLS12-381. If there are leftover bits that are not here just for testing, could we list them in an issue @arthurpaulino ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully aware of all the places BLS12-381 can be found. This one is easy because LanguageField
is defined in lurk::field
, which is pretty central
- Follow-up of lurk-lab#774 - Swapped out `blstrs::Scalar` implementation in `src/field.rs` with pasta_curves::pallas::Scalar - Readjusted tests to now run on the `pasta_curve` as opposed to the `blstrs` - Updated `Cargo.toml` by removing `blstrs` from both the workspace and dev dependencies - Removed the association of `blstrs/portable` from the `portable` feature in `Cargo.toml`
) * chore:: Refactor field tests to use pasta_curves instead of blstrs - Follow-up of #774 - Swapped out `blstrs::Scalar` implementation in `src/field.rs` with pasta_curves::pallas::Scalar - Readjusted tests to now run on the `pasta_curve` as opposed to the `blstrs` - Updated `Cargo.toml` by removing `blstrs` from both the workspace and dev dependencies - Removed the association of `blstrs/portable` from the `portable` feature in `Cargo.toml` * refactor: Remove BLS12-381 support from the LanguageField enum - Removed `BLS12_381` option across the project, affecting the enumeration of `LanguageField`, use in `src/lem/circuit.rs`, and representation in `src/cli/mod.rs`. - Updated test and benchmarking data in `src/field.rs` and `end2end_lem.rs` to reflect these changes. - Reestructured `src/cli/circom.rs` directory for simplicity and updated the logic generating `r1cs` and `witness`. - Removed "bls" feature from neptune in Cargo.toml, and updated documentation in README.md to reflect these changes.
This PR removes support for Groth16/SnarkPack+. Now that we have SuperNova, we no longer needed the vestigial original backend in order to preserve and demonstrate multiple backend support. Moreover, the differences in capabilities and interfaces between the folding and proof-aggregation based backends have become a source of friction and maintenance overhead.
This removal will allow us to extend the
Prover
trait to more fully cover the range of behaviors provided by bothNova
andSuperNova
.Although it could have been removed outright, for the time being I left the BLS12-381 uses related to field genericity, so we continue to exercise it. However, this likely should be dropped in the future when that need is otherwise met. This will allow dropping the
blstrs
dependency.With some more work, we can and should also remove the
bellpepper_core::Circuit
implementation forMultiFrame
. It's no longer required for creating proofs, so is somewhat confusing. It is, however, still used in some value-providing tests.