keep-starknet-strange / garaga

State-of-the-art Elliptic Curve operations and SNARKS verification for Cairo & Starknet 🐺.
https://felt.gitbook.io/garaga
MIT License
181 stars 39 forks source link

feat: Verify Noir circuits #62

Closed feltroidprime closed 1 month ago

feltroidprime commented 1 year ago

Write a verifier in python for Honk proofs based on this repo : https://github.com/Maddiaa0/honk-verifier/tree/master

how to : - use garaga's python classes : [PyFelt](https://github.com/keep-starknet-strange/garaga/blob/ 07ad86541e3782940f6495c71ccdce8dfba1f3e4/src/algebra.py#L5) for modular arithmetic operations. - use / add (if needed) Elliptic curves information and constants from definitions.py - write the verifier in a single python file under src/precompiled_circuits/honk.py. - Do not write a ModuloCircuit class (this will be done later), only the verifier inside a function. - You can copy paste and re-use the code here for EC scalar multiplication https://github.com/feltroidprime/zk-ecip-py/blob/main/src/curve.py when the solidity is using the ECMul/EcADD precompile - You can use the gnark CLI backend when the solidity is using the EcPairing precompile - add some python functions to parse and map the honk proof into a proper python dataclass inside honk.py - write a similar test than in the honk-verifier repo inside the if __name__ == "__main__": part of the honk.py file. - write clear code with type hints

Done.

Next task : Write a cairo implementation. Requires #112

feltroidprime commented 5 months ago

Looking for a contributor