Tutorials
Noir
Requires Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install Noir and BB
BB is Aztec's Barretenberg Proving backend.
Close the terminal, open another one, and run.
Noir Lang & BB Compatibility
- Noir v1.0.0-beta.0 - BB v0.63.1
- Noir v0.36.0 - BB v0.59.0
- Noir v0.34.0 - BB v0.55.0
- Noir v0.33.0 - BB v0.47.1
- Noir v0.32.0 - BB v0.46.1
- Noir v0.31.0 - BB v0.41.0
Setting up the Project
Your folder structure should look like this
main.nr
main.rs
Cargo.toml
Nargo.toml
Build and Test your Circuit
This should create a Prover.toml
file like such,
You can edit this file to pass inputs to your circuits.
You should play around with this file and try out different inputs. Example,
Now run your circuit,
Your witness should be available in ./target/mywitness.gz
Your circuit should be present in ./target/hello_world.json
directory.
Build and Verify your Proof
Prove
Verify
On-chain Verification
You should now have a contract.sol
in your ./target/
directory.
- Tutorial on On-chain Verification