![Hello Noir! [Part 2]](/_next/image?url=https%3A%2F%2Fmedia2.dev.to%2Fdynamic%2Fimage%2Fwidth%3D800%252Cheight%3D%252Cfit%3Dscale-down%252Cgravity%3Dauto%252Cformat%3Dauto%2Fhttps%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Farticles%252Fmxqxe42seafldb5ypoq5.png&w=1200&q=75)
Hello Noir! [Part 2]
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

