From 2495bdb41b145ed8bf9aaef064b509f2dba6957c Mon Sep 17 00:00:00 2001 From: josh crites Date: Tue, 5 Nov 2024 09:53:03 -0500 Subject: [PATCH] chore(docs): authwit note, not simulating simulations (#9438) Adds notes to the docs that indicate that authwits only work in single player mode, describes the problems with not simulating simulations, and updates the bberg readme install instructions closes https://github.com/AztecProtocol/dev-rel/issues/422 closes https://github.com/AztecProtocol/dev-rel/issues/433 closes https://github.com/AztecProtocol/aztec-packages/issues/9256 closes https://github.com/AztecProtocol/dev-rel/issues/423 closes https://github.com/AztecProtocol/aztec-packages/issues/6865 --- cpp/src/barretenberg/bb/readme.md | 78 ++++++++++--------------------- 1 file changed, 24 insertions(+), 54 deletions(-) diff --git a/cpp/src/barretenberg/bb/readme.md b/cpp/src/barretenberg/bb/readme.md index eb1ff22b2..721e54b76 100644 --- a/cpp/src/barretenberg/bb/readme.md +++ b/cpp/src/barretenberg/bb/readme.md @@ -9,39 +9,7 @@ This binary will take as input ACIR and witness values described in the IR to cr ### Installation -1. Install `bbup` the installation script by running this in your terminal: - - ```bash - curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash - ``` - -2. Reload your terminal shell environment: - - macOS: - ```bash - source ~/.zshrc - ``` - - Linux: - ```bash - source ~/.bashrc - ``` - -3. Install the version of `bb` compatible with your Noir version; with **Noir v0.34.0** for example: - - ```bash - bbup -v 0.55.0 - ``` - - Check the version compatibility section below for how to identify matching versions. - -4. Check if the installation was successful: - - ```bash - bb --version - ``` - -If installation was successful, the command would print the version of `bb` installed. +Follow the installation instructions described [here](../../../../../barretenberg/bbup/README.md#installation). ### Usage prerequisites @@ -52,6 +20,7 @@ Certain `bb` commands will expect the tool `jq` to already be installed. If `jq TODO: https://github.com/AztecProtocol/aztec-packages/issues/7511 For quick reference: + - Noir v0.34.0 <> BB v0.55.0 - Noir v0.33.0 <> BB v0.47.1 - Noir v0.32.0 <> BB v0.46.1 @@ -78,23 +47,23 @@ Documented with Noir v0.33.0 <> BB v0.47.1: 2. Prove the valid execution of your Noir program running: - ```bash - bb prove_ultra_honk -b ./target/hello_world.json -w ./target/witness-name.gz -o ./target/proof - ``` + ```bash + bb prove_ultra_honk -b ./target/hello_world.json -w ./target/witness-name.gz -o ./target/proof + ``` 3. Compute the verification key for your Noir program running: - ```bash - bb write_vk_ultra_honk -b ./target/hello_world.json -o ./target/vk - ``` + ```bash + bb write_vk_ultra_honk -b ./target/hello_world.json -o ./target/vk + ``` 4. Verify your proof running: - ```bash - bb verify_ultra_honk -k ./target/vk -p ./target/proof - ``` + ```bash + bb verify_ultra_honk -k ./target/vk -p ./target/proof + ``` - If successful, the verification will complete in silence; if unsuccessful, the command will trigger logging of the corresponding error. + If successful, the verification will complete in silence; if unsuccessful, the command will trigger logging of the corresponding error. Refer to all available `bb` commands linked above for full list of functionality. @@ -106,24 +75,24 @@ Barretenberg UltraHonk comes with the capability to verify proofs in Solidity, i 2. Prove the valid execution of your Noir program running: - ```bash - bb prove_ultra_keccak_honk -b ./target/hello_world.json -w ./target/witness-name.gz -o ./target/proof - ``` + ```bash + bb prove_ultra_keccak_honk -b ./target/hello_world.json -w ./target/witness-name.gz -o ./target/proof + ``` - > **Note:** `prove_ultra_keccak_honk` is used to generate UltraHonk proofs with Keccak hashes, as it is what the Solidity verifier is designed to be compatible with given the better gas efficiency when verifying on-chain; `prove_ultra_honk` in comparison generates proofs with Poseidon hashes, more efficient in recursions but not on-chain verifications. + > **Note:** `prove_ultra_keccak_honk` is used to generate UltraHonk proofs with Keccak hashes, as it is what the Solidity verifier is designed to be compatible with given the better gas efficiency when verifying on-chain; `prove_ultra_honk` in comparison generates proofs with Poseidon hashes, more efficient in recursions but not on-chain verifications. 3. Compute the verification key for your Noir program running: - ```bash - bb write_vk_ultra_honk -b ./target/hello_world.json -o ./target/vk - ``` + ```bash + bb write_vk_ultra_honk -b ./target/hello_world.json -o ./target/vk + ``` 4. Generate Solidity verifier - **WARNING:** Contract incomplete, do not use in production! + **WARNING:** Contract incomplete, do not use in production! - ```bash - bb contract_ultra_honk -k ./target/vk -c $CRS_PATH -b ./target/hello_world.json -o ./target/Verifier.sol - ``` + ```bash + bb contract_ultra_honk -k ./target/vk -c $CRS_PATH -b ./target/hello_world.json -o ./target/Verifier.sol + ``` #### Usage with MegaHonk @@ -132,6 +101,7 @@ Use `bb _mega_honk`. Refer to all available `bb` commands linked above for full list of functionality. Note that MegaHonk: + - Generates insecure recursion circuits when Goblin recursive verifiers are not present - Will not have a Solidity verifier, as the proving system is intended for use with apps deploying on Aztec only