Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes from Common Prefix audit of the Plonk verifier contract (#1962)
* fix: bug on lagrange coeff computation (#1639) * Fix the edge case when zeta is one of the evaluation domain elements, and our lagrange coefficient (and also pi_poly_eval) is computed incorrectly. Tests are also added for these rare edge cases. * Update script to run gas benchmarks (#1769) * Update script to run gas benchmarks. Store gas benchmarks for this commit. * Update lint.yml as CI is complaining. * Use addmod in function _computeLinPolyConstantTerm. (#1770) * Point to branch 'commonprefix-patch of solidity-bn254 repository * use forge snapshot for gas benchmark instead * chore: update hotshot to 0.1.60, most jf dep to 0.4.5 (#1788) * refactor!: use big endian and simplify transcript logic (#1801) * fix transcript and tests * fix computeChallenges in verifier * update gas benchmark * further improve and add comment to inline assembly * Fix comment in `_linearizationScalarsAndBases` (#1812) * Fix comment in _linearizationScalarsAndBases. * Update contracts/src/libraries/PlonkVerifier.sol Co-authored-by: Alex Xiong <[email protected]> --------- Co-authored-by: Alex Xiong <[email protected]> * refactor: add G2 point from SRS to verifying key and transcript (#1819) * add G2 from SRS to VK and append to Transcript * update with jf * Remove redundant code (#1821) * Remove unused function _batchVerifyOpeningProofs. * Remove redundant variable sumEval. * attempt: free disk space to avoid ci failure --------- Co-authored-by: Alex Xiong <[email protected]> * Gas optimization for evaluatePiPoly (#1822) * Gas optimization for evaluatePiPoly * add credit --------- Co-authored-by: Alex Xiong <[email protected]> * improve challenge generation (#1829) * use state-approach for squeeze domain-separation * memory align word size * update with merged jf * feat: Efficient computeChallenges in pure assembly (#1831) * rewrite computeChallenges in pure assembly * add more comments * refactor!: change publicInputs from dynamic to fixed array (#1835) * change publicInputs from dynamic to fixed array * Remove redundant fields in struct EvalDomain. (#1840) * Remove redundant field EvalDomain.groupGenInv * Remove redundant field EvalDomain.size. * address comments --------- Co-authored-by: Alex Xiong <[email protected]> * Remove redundant transcript files. (#1836) * Use of constants COSET_K1,...,COSET_K4. * Put Transcript.sol and Transcript.t.sol files in some legacy folder. * Precompute domain elements (#1860) * Remove unused domain sizes. * Hardcode domain elements. * removed domain.groupGen and localDomainElements. --------- Co-authored-by: Alex Xiong <[email protected]> * feat!: fully assemblify preparePcsInfo() and verifyOpeningProof (#1844) * perf: reuse free mem for each chal (#1943) * perf: avoid carrying around commScalars and commBases (#1940) * avoid carrying around commScalars and commBases * address jakov comment on L01 * Fix justfile * Small fixes. Generate bindings. * More fixes --------- Co-authored-by: Alex Xiong <[email protected]>
- Loading branch information