Skip to content

Commit

Permalink
chore(docs): authwit note, not simulating simulations (#9438)
Browse files Browse the repository at this point in the history
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 AztecProtocol/dev-rel#422
closes AztecProtocol/dev-rel#433
closes AztecProtocol/aztec-packages#9256
closes AztecProtocol/dev-rel#423
closes AztecProtocol/aztec-packages#6865
  • Loading branch information
critesjosh authored and AztecBot committed Nov 6, 2024
1 parent 249181d commit 2495bdb
Showing 1 changed file with 24 additions and 54 deletions.
78 changes: 24 additions & 54 deletions cpp/src/barretenberg/bb/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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.

Expand All @@ -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

Expand All @@ -132,6 +101,7 @@ Use `bb <command>_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

Expand Down

0 comments on commit 2495bdb

Please sign in to comment.