Consensys / gnark

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. The library is open source and developed under the Apache 2.0 license
https://hackmd.io/@gnark
Apache License 2.0
1.4k stars 358 forks source link

feat: snarks js binding for gnark #917

Open smsunarto opened 10 months ago

smsunarto commented 10 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Gnark currently doesn't have a clean way to client side proving since snarksjs is reliant on a different r1cs encoding than the one gnark has.

Describe the solution you'd like A snarkjs-gnark binding would allow snarksjs to do proving and witness generation for gnark circuits.

Arkworks have something similar https://github.com/arkworks-rs/circom-compat

Describe alternatives you've considered The hacky alternative is to compile gnark with tinygo, but other issues seems to have flagged performance and reliability issues.

ivokub commented 9 months ago

Yup, we have been thinking about having some internal IR which we can nicely transpile from/to other languages (circom, noir). Currently not a big priority though, for Linea we're using gnark end to end.

Imo I have seen some efforts now and then (I think there is Noir-to-gnark transpiler somewhere), but dunno how well maintained they are.