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

Verification vectors are over-allocated #126

Closed
AaronFeickert opened this issue Mar 22, 2024 · 0 comments · Fixed by #127
Closed

Verification vectors are over-allocated #126

AaronFeickert opened this issue Mar 22, 2024 · 0 comments · Fixed by #127

Comments

@AaronFeickert
Copy link
Contributor

AaronFeickert commented Mar 22, 2024

The dynamic scalar and point vectors used in batch verification are allocated in part based on the aggregation factor associated to each statement's parameters. This aggregation factor does not specify the number of commitments associated to the statement, but rather the maximum number of supported commitments, as specified by the number of associated generators.

As a result, it's possible for a statement to specify a larger aggregation factor than is actually used; this allows for more flexibility and efficiency when producing generators. The result is that the verification vectors may be over-allocated.

The fix is to use the number of commitments associated to a statement instead of the specified aggregation factor.

hansieodendaal pushed a commit that referenced this issue Mar 27, 2024
Batch verification vectors are allocated in part using the expected
aggregation factor of each statement in the batch. However, this was
being done using the aggregation factors corresponding to each
statement's associated generators, which may exceed the aggregation
factors actually used in the statements. The result was a possible
over-allocation of these vectors.

This PR changes the allocation to use the actual aggregation factors.

Closes #126.
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 a pull request may close this issue.

1 participant