-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Reduce SRS size back to normal (#9098)
Resolves AztecProtocol/barretenberg#1097. Previously, we had to bump up SRS sizes to 1.5x the dyadic circuit size because structured polynomials meant that we could commit starting from the start_index of the polynomial, but because pippenger likes a power of 2 points, that meant that we sometimes exceeded the dyadic_circuit_size during a roundup to a power of 2. This PR fixes this by using PolynomialSpans to store the scalars. Note that these scalars do not necessarily represent polynomials anymore, so maybe this object can be renamed. The PolynomialSpan allows us to store a start_index with the scalars, where the start_index here means the offset into the span of points that the scalars start at. For example, if we are committing to a polynomial which starts at index 13, and has 13 length. The points we will use will now be [10, 26) instead of [13, 29) previously. The start_index here would be 3 because the scalars start at 13, which is 3 after the points start. The range for the points is chosen to the be the earliest power of 2 window that fits the scalars, meaning we try to shift it as left as possible. This means that will never exceed the dyadic_circuit_size as a result, so we can keep the old (and good) SRS sizes.
- Loading branch information
1 parent
ce7e687
commit a306ea5
Showing
15 changed files
with
293 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.