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 ...
![Hello Noir! [Part 2]](https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2i117zx3xttj7nxs0qcy.png)
Source: DEV Community
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: 2