ZK-Garage / plonk

A pure Rust PLONK implementation using arkworks as a backend.
https://discord.gg/XWJdhVf37F
Mozilla Public License 2.0
295 stars 76 forks source link

Add blinder polynomials #58

Closed davidnevadoc closed 2 years ago

davidnevadoc commented 2 years ago

Closes #47

bhgomes commented 2 years ago

We should try to make these kinds of polynomial changes computable automatically. There are lots of magic numbers spread around like in this case the total degree, in this case, 7 and 8. It will be hard to keep track of correctness over time as we keep adding new things, like lookups.

ghost commented 2 years ago

Just a side note, as Daniel Lubarov describes, when using the inner-product argument polynomial commitment scheme, this blinding should be done in a slightly different way for efficiency reasons. So while in theory it is independent of the commitment scheme it'll be tricky to abstract in the code.

bhgomes commented 2 years ago

Maybe it should be part of a trait design for polynomial commitment scheme then, in analogy with how commitment schemes have blinders which they use in the implementation in their own way.

mathcrypto commented 2 years ago

I agree with @bhgomes, otherwise, it's confusing if we constantly change the polynomial degree. I also believe increasing the CRS degree should be justified (adding a side note of why this was needed)

davidnevadoc commented 2 years ago

Maybe open an issue about this so the temporary fix is replaced in the future

It is fixed in the next commit. Instead of getting the domain size form the z_poly degree it is passed directly to the function.

mathcrypto commented 2 years ago

Great then :)

davidnevadoc commented 2 years ago

There is an open discussion at team-infra about this topic.

Due to the negative impact in compiled circuit size and proving time derived from the modifications made in PR it will not be merged unless we have concluded that there is no better alternative.