-
Notifications
You must be signed in to change notification settings - Fork 116
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
Refactor pedersen generator initialisation #337
Comments
Yeah I'd prefer to have a process to generate these points into a context and then I can feed the context to whatever function requires it. This would require a bigger refactor though if all functions are expecting a global |
@iAmMichaelConnor This seems related to #338 |
Yeah, this issue's proposal should reduce the memory footprint for both applications. |
Blocked - need to identify stakeholders and get them on a call to decide best approach. |
To be closed by AztecProtocol/aztec-packages#2592 |
At the moment, the configuration for the number of generator indices (and sub indices) is done with two constexpr global variables.
barretenberg/cpp/src/barretenberg/crypto/generators/generator_data.cpp
Line 9 in c6b26c4
This has a few downsides:
16
generators and32
sub-indices, we end up with a lot of wastage.32
. So we end up 'using up' precious, scarce* generator points for no reason. *We're limited in the number of generators we can initialise, so careful instantiation would be better.Suggestion for improvement:
initialise_generators
function which must be called (by the application using bberg as a library) to generate points. Give the option of holding these points in memory, or return the points to the application (more discussion needed here, please).std::map<int, size_t> num_sub_indices;
a mapping from someenum
(whose underlying types areint
by default) of generator indices to the number of sub indices required per index.The text was updated successfully, but these errors were encountered: