Noir Verifier
Last updated
Was this helpful?
Last updated
Was this helpful?
Garaga CLI Python package version 0.18.1 (install with pip install garaga==0.18.1
Noir 1.0.0-beta.4 (install with noirup --version 1.0.0-beta.4
or npm i @noir-lang/noir_js@1.0.0-beta.4
)
Barretenberg 0.87.4-starknet.1 (install with bbup --version 0.87.4-starknet.1
or npm i @aztec/bb.js@0.87.4-starknet.1
)
To install noirup
and bbup
, follow the .
Supported Flavors Overview
ultra_keccak_honk
Keccak
No
Cheaper on EVM
ultra_keccak_zk_honk
Keccak
Yes
Cheaper on EVM
ultra_starknet_honk
Starknet Poseidon
No
Cheaper on Starknet
ultra_starknet_zk_honk
Starknet Poseidon
Yes
Cheaper on Starknet
1. Verification Key Generation (Same for All Flavors)
This creates the binary verification key file vk
in target/vk
.
2. Smart Contract Generation (Different per Flavor)
ultra_keccak_honk
garaga gen --system ultra_keccak_honk --vk target/vk
ultra_keccak_zk_honk
garaga gen --system ultra_keccak_zk_honk --vk target/vk
ultra_starknet_honk
garaga gen --system ultra_starknet_honk --vk target/vk
ultra_starknet_zk_honk
garaga gen --system ultra_starknet_zk_honk --vk target/vk
3. Proof Generation & Calldata Generation
bb prove --scheme ultra_honk --oracle_hash keccak
garaga calldata --system ultra_keccak_honk
bb prove --scheme ultra_honk --oracle_hash keccak --zk
garaga calldata --system ultra_keccak_zk_honk
bb prove --scheme ultra_honk --oracle_hash starknet
garaga calldata --system ultra_starknet_honk
bb prove --scheme ultra_honk --oracle_hash starknet --zk
garaga calldata --system ultra_starknet_zk_honk
4. BB.js Integration
{ keccak: true }
getHonkCallData()
HonkFlavor.KECCAK
ultra_keccak_honk
{ keccakZK: true }
getZKHonkCallData()
HonkFlavor.KECCAK
ultra_keccak_zk_honk
{ starknet: true }
getHonkCallData()
HonkFlavor.STARKNET
ultra_starknet_honk
{ starknetZK: true }
getZKHonkCallData()
HonkFlavor.STARKNET
ultra_starknet_zk_honk
First, create a new Noir project and compile it with nargo build
.
This will create a json file in hello/target/hello.json
Now, generate the corresponding verifying key vk
using barretenberg :
Finally, generate a smart contract from the verifying key using the garaga CLI.
This will create a smart contract folder with the following structure.
The main function of interest is located in honk_verifier.cairo
The contract interface will be
In order to interact with the endpoint, we need to generate the full_proof_with_hints
array.
To do so, we need a specific proof for your program. But first, Noir requires to specify the inputs of the program in hello/Prover.toml
Now, generate a proof with barretenberg, after running the program (notice that the --zk
flag that occurs only in the proving part, not in the verifying key generation) :
full_proof_with_hints
array)Finalizing the above CLI example, you can obtain the full_proof_with_hints
array using the garaga CLI. From within the "target" directory:
You can follow the previous tutorial using the starknet flavours of Supported barretenberg flavours :
--oracle_hash starknet
in bb commands
--system ultra_starknet_honk
or --system ultra_starknet_zk_honk
in garaga CLI
etc. in the other python, rust, npm tooling.
Generate & deploy an UltraHonk proof verifier to a local Starknet devnet.
Add on‑chain state to your privacy‑preserving app.
Connect a wallet and deploy to a public testnet.
Need Support ?
See and for reference.
The Ultra Starknet flavour replaces the Keccak hash function by , which is better suited in the context of Starknet and Cairo contracts. Using it will both optimize on-chain verification costs and verifier contract bytecode sizes.
Follow the . This starter kit combines Noir, Garaga, and Starknet with in‑browser proving to help you ship a privacy‑preserving dApp fast.