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.3 - BB v0.82.2
- 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
More here https://github.com/AztecProtocol/barretenberg/blob/master/bbup/bb-versions.json
Setting up the Project
Your folder structure should look like this
Build and Test your Circuit
Your circuit should be present in ./target/hello_world.json
directory.
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
Build and Verify your Proof
Prove
Verify
On-chain Verification
You should now have a Verifier.sol
in your ./target/
directory ready for deployment on any chain.
- Tutorial on On-chain Verification