Draft: Refactor of Polynomial Protocol - Fixes #167
Marked as "Draft" because the (new) plan is to merge this branch after Meta-Plonk.
Contribution:
-
Simplify the code of PP, having a better abstraction that does involve g_map nor the proof sub-indices (all that is a matter of main_protocol). -
Get rid of v_map, improvements on how evaluation points are passed. -
Have an API that allows for optimization tricks at the identity level. Namely, identities are now functions (this allowed us to get rid of Multi-variate polynomials too) and all the complexity about proof indices is now handled in the gates, which will allow us (in a near future) to, e.g. optimize things like computing ql * (sum_i alpha^i * a_i)
instead of\sum_i ql * alpha^i * a_i
.
Regression tests by running dune exec tx-rollup/test/main.exe test Bench
, average over 3 executions:
master:
prepare: Time: 2.01 s Allocations 3.85 GB MaxHeap: 39.45 MB
setup : Time: 2.91 s Allocations 137.02 MB MaxHeap: ?
prove : Time: 4.37 s Allocations 123.51 MB MaxHeap: ?
verify: Time: 2.34 ms Allocations 562.28 KB MaxHeap: ?
this branch:
prepare: Time: 2.02 s Allocations 3.85 GB MaxHeap: 39.45 MB
setup : Time: 2.33 s Allocations 59.85 MB MaxHeap: ?
prove : Time: 3.61 s Allocations 15.99 MB MaxHeap: ?
verify: Time: 2.25 ms Allocations 247.46 KB MaxHeap: ?
Edited by Miguel Ambrona