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.
This PR aims to optimize proof compression by tweaking
lookup_bits
(size of lookup tables) forAggregationCircuit
, which was previously overlooked.Step proof
For step proof it allowed us to decrease the first stage circuit degree to
k=20
while preserving the same degree in the aggregation stage as well as verifier cost. Unfortunately, I wasn't able to find configuration that decreases verified cost (gas)k=21/23
lookup_bits=8
(baseline)k=21/23
lookup_bits=22
k=21/22
lookup_bits=21
Attempt to reduce aggregation degree (fail)
k=20/23
lookup_bits=22
k=20/23
lookup_bits=19
The first two and last two tests show an interesting fact: the correlation between lookup bits and prover time isn't linear, even though lookup bits and advice cells are linearly anti-correlated. The larger lookup table can improve prover and verifier efficiency to some point (e.g.
lookup_bits=19
), but after that the prover time will increase (e.g.lookup_bits=23
).Committee update proof
Here, the same curve correlation between lookup_bits and prover time is observed, so just increasing
lookup_bits=24
fork=25
slows the prover from505s
to550s
. However, by increasing first stage circuit degree to20
and lookup_bits in the aggregation circuit to23
, it ended up being possible to usek=24
in the aggregation stage while preserving the same verifier cost.k=20/24
lookup_bits=23
Compared to the previous configuration
k=18/25
lookup_bits=8
where total prover time was43s + 490s = 533s
(see #41), this yields a 19% improvement.