A bit late to the party, but I've been catching up with how @darkforest_eth works under the hood.

If you are new to the world of zero-knowledge proofs as I am, I recommend their intro post. It helped me a lot in understanding all the moving pieces! https://blog.zkga.me/intro-to-zksnarks
All zkSNARK magic is powered by circom and snarkjs from @identhree. First, circom will compile your circuit into stuff that snarkjs can manage.

"Stuff" here is a r1cs constraint system and wasm code, but you don't really need to worry about it.
Then, snarkjs will use the compiled circuit to let you generate the proof for a secret input, as well as verify the proof against the circuit.

In other words, you can implement the prover and the verifier using this same library.
And as cherry-on-top, snarkjs will also autogenerate a Solidity verifier contract for your circuit, as well as build the eth CALL for a given proof to be verified.
You can follow @smpalladino.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.