gnark
gnark copied to clipboard
Feat/plonk update
Description
Updating plonk to the latest version https://eprint.iacr.org/archive/2019/953/1660839633.pdf
[wait for linea to redeploy the contract before merging to avoid incompatibility between prover/verifier]
- The folded quotient is appended to the linearisation polynomial
- the opening of the linearisation polynomial corresponds to the constant term of the algebraic relation
- one less opening to do (since the quotient is now opened throughout the opening of the linearisation polynomial)
- no more modular inverse to compute in the algebraic check to verify a plonk proof
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How has this been tested?
Test suite for plonk unchanged
benchmark
- for native chain bls12-377 -> bw6-761 we go from 319k to 312k constraints
- for non native (bw6 -> bn254) the number of constraints is unchanged -> something might be off
Checklist:
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I did not modify files generated from templates
- [x]
golangci-lint
does not output errors locally - [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules