Use new Pedersen generator infra from bberg#454
Merged
Conversation
cc706dd to
666575f
Compare
62f9cbe to
3855007
Compare
Get circuits.js working by changing snapshots. The snapshots have changed because the generator index ordering as well as sizes have changed. Fix snapshot of public kernel tests. update bb. update bb. update bb. abi snapshot fixes fix: updated generator index on the noir side prettier. Fix circuits.js tests
3855007 to
7809788
Compare
6ea28c1 to
c5f733e
Compare
jeanmon
approved these changes
Jun 28, 2023
jeanmon
left a comment
Contributor
There was a problem hiding this comment.
LGTM. My comments are nice to have.
ludamad
pushed a commit
that referenced
this pull request
Jul 14, 2023
codygunton
pushed a commit
that referenced
this pull request
Jan 23, 2024
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.
Description
The Pedersen generator memory usage was reduced by a factor of 3 in this bb PR. This PR uses the latest Pedersen generators from bberg in packages to avoid running into issues when using hash indices more than 16 (this is what was allowed in the past in bberg) or hashing more than 32 elements (we now can hash ≤ 44 elements and this can easily be increased if need be, without memory consequences).
As a result, the hash indices have slightly been reordered according to how many sub-generators a hash index needs. The following conditions are to be followed:
If you need more generators, simply put in a PR to increase existing limits in bberg and use the new hash indices in packages. The existing limits in bberg are defined here:
https://github.com/AztecProtocol/barretenberg/blob/d60b16a14219fd4bd130ce4537c3e94bfa10128f/cpp/src/barretenberg/crypto/generators/generator_data.cpp#L25-L27
Why do we have the limits? Because we need to store generator tables in static memory so we need to know at compile time, the number of generators we are ever going to need.
Checklist: