perf: avoid commiting to table and queries in log-derivative argument #1309
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
In the log-derivative argument check
F \in T
the prover provides the histogram of the occurrencesM
of the elementsF
inT
. We then check\sum_i m_i/(X - t_i) == \sum_j 1/(X - f_j)
.Previously we always committed to
F, T, M
to obtain the random challenger
which we used for checking the equality. But as the left-hand side is always known and the equality doesn't hold for invalidM
except for negligible probability, then we can avoid committing toF
andT
.However, when the table entries and queries are vectors, then we need to challenge the random coefficients for the random linear combination, so we still commit to the queries then.
Doesn't affect Groth16 as there we compute the commitment as a Pedersen vector commitment. But for PLONK as we need to align the committed values to the commitment column and it saves the number of constraints significantly. Depending on the circuit it may be 10-15%.
How has this been benchmarked?
See the updated stats
Checklist:
golangci-lint
does not output errors locally