Optimising proving by avoiding recomputing final Pi
polynomial in MLKZG
#242
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.
Fixes #228
The obvious solution could be just reducing the number of iteration in following loop to
ell-1
with subsequent pushingeval
topolys
. But, as @adr1anh noted in some of discussions we don't need to compute the commitment to this constant polynomial at prover side, since verifier has all necessary information to do that on its side, so in this PR, theEvaluationArgument
created by prover containscomms
without commitment toeval
. It is recomputed at verifier's side and added tocom
vector before executingkzg_verify_batch
.Important detail
The following check:
from initial implementation is no longer needed, because we don't compute final
Pi
but addeval
topolys
instead, so it is removed. The wrongeval
is now detected during proof verification and unit-test added to enforce this.Question to reviewers
We don't actually use the
C
parameter while proving. In original implementation it was used only insidekzg_open_batch
just to validate the input size and nowhere else at sensible computations. Is that expected?