# Barretenberg 0.82.0 Migration Notes This is a list of changes made to the `bb` CLI and the `@aztec/bb.js` package between `v0.76.0` and `v0.82.2`. This is useful if you are upgrading your Noir version to `v1.0.0.beta2+`, as it works well with `bb v0.82.2+`. # Summary of `bb` CLI Changes - UltraHonk is now the default proving scheme. UltraPlonk is being deprecated. - Subcommands specific to a proving scheme, like `prove_ultra_honk`, have been removed. Instead, a `--scheme` argument is used (defaulting to `ultra_honk`), keeping the subcommands uniform (`prove`, `verify`, `write_vk`, etc.). - `bb contract` has been renamed to `bb write_solidity_verifier`. - Added `bb --help` to list available commands and options. - The `-o` output flag now specifies the directory to write the output file (proof, vk) instead of the path to the file, in `prove` and `write_vk` command. - The proof output from `bb prove` has public inputs at the beginning of the proof (except for the first 4 bytes which contain the proof size). This is relevant when [splitting the proof](https://noir-lang.org/docs/dev/how_to/how-to-solidity-verifier) for the Solidity verifier. - The `--scheme` flag can be set using the `BB_SCHEME` environment variable to avoid specifying `--scheme ultra_honk` repeatedly. <br /> ## UltraHonk ### Generate Proof **Before**: `bb prove_ultra_honk -b ./circuit.json -w ./witness.gz -o ./proof` **Now**: `bb prove --scheme ultra_honk -b ./circuit.json -w ./witness.gz -o ./` ### Write Verification Key **Before**: `bb write_vk_ultra_honk -b ./circuit.json -o ./vk` **Now**: `bb write_vk --scheme ultra_honk -b ./circuit.json -o ./` ### Verify Proof **Before**: `bb verify_ultra_honk -k ./vk -p ./proof` **Now**: `bb verify --scheme ultra_honk -k ./vk -p ./proof` ### Solidity Verifier **Before**: `bb contract_ultra_honk -k ./vk -o ./Verifier.sol` **Now**: `bb write_solidity_verifier --scheme ultra_honk -k ./vk -o ./Verifier.sol` As before, only proofs generated with the `keccak` hash can be verified in Solidity. You can use the `--oracle_hash keccak` flag with the `prove`, `verify`, and `write_vk` commands to use the `keccak` hashing scheme instead of `Poseidon`. ### Gates `bb gates --scheme ultra_honk -b ./circuit.json` Note: `bb gates` now prints `gates_per_opcode` only when using the `--include_gates_per_opcode` flag (producing cleaner output by default). <br /> ## UltraPlonk UltraPlonk is usable as-is with the `OLD_API` flag: ``` bb OLD_API prove -b ./circuit.json -w ./witness.gz -o ./proof bb OLD_API write_vk -b ./target/hello_world.json -o ./target/vk bb OLD_API verify -k ./target/vk -p ./target/proof bb OLD_API contract -k ./vk -b ./circuit.json -o ./Verifier.sol ``` - The UltraPlonk scheme is not available with new APIs under the `--scheme` flag. You must use `OLD_API` for UltraPlonk. <br /> # `@aztec/bb.js` Changes - The `proof` returned from `UltraHonkBackend.generatedProof()` no longer has the proof size in the first 4 bytes. - You can directly use this proof with a Solidity verifier without doing `proof.slice(4)`. # Upcoming changes There is ongoing work on the CLI to save `proof` and `public-inputs` as separate files when running the `bb prove` command. This will be part of an upcoming version.