halo2
halo2 copied to clipboard
Commitment scheme abstraction
Having pse/halo2curves
which reimplements pse/pairing
with upstream traits and also reexports zcash/pasta_curves
it is now possible to keep original commitment scheme rather than replacing it.
Also since we won't have to deal with mimicking traits in pse/pasta_curves
at pse/pairing
there must be less diffs in this fork and won't require any maintenance effort regarding those traits.
This PR introduces an abstraction technique for commitment schemes. It keeps the original IPA and adds two KZG variants and allows circuit developer to specify a commitment scheme for a specific circuit without conditional compilation.
Regarding the changes at constraint system side most of them are for boundary definitions of functions which mostly specifies the commitment scheme. I don't think this abstraction change would make its way to the upstream. However it can be a discussion base for a working group if idea is found useful somehow.
For further rebasing and maintenance concerns:
mod poly
:
30 files changed, 3365 insertions(+), 1411 deletions(-)
This is admittedly a huge diff. However current replacement approach change for mod poly
is also not small.
Integration for halo2_proofs
except mod poly
:
35 files changed, 623 insertions(+), 578 deletions(-)
There are some formatting/folding related differences that should reduce sense of this diff. There is also a ~100 liner block diff w/o an actual change. I think it is for an unrecognized line shift.
Integration for halo2_gadgets:
37 files changed, 117 insertions(+), 88 deletions(-)
Which looks ok.