Back to articles
Hello Noir! [Part 2]

Hello Noir! [Part 2]

via Dev.to0xluk3

In Part 1 we wrote a circuit, compiled it with nargo, and got two artifacts: a circuit definition and a witness. Now we will use them to actually perform the cryptographic proof check. 1. Where we left off At the end of Part 1, we had two files in target/ : hello_world.json - the compiled circuit (ACIR bytecode) hello_world.gz - the witness (our specific input values that satisfy the constraints) All nargo told us was "yes, these inputs work." That's not a proof anyone else can verify - it's just a local check. To produce an actual cryptographic proof, we need Barretenberg ( bb ). 2. Generating a proof with Barretenberg With our Prover.toml set to x = "2" and y = "1" (recall: x is private, y is public), we run: bb prove -b ./target/hello_world.json -w ./target/hello_world.gz \ --write_vk --verifier_target evm -o ./target Scheme is: ultra_honk, num threads: 8 (mem: 8.10 MiB) CircuitProve: Proving key computed in 29 ms (mem: 24.21 MiB) Public inputs saved to "./target/public_inputs" (mem

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles