Skip to content

Commit

Permalink
chore(bb readme): Add installation instructions and TODOs (#7601)
Browse files Browse the repository at this point in the history
# Summary

Updating bb's README:
- Add `bb` installation instructions
- Steps toward
#7511 and
#7600
  • Loading branch information
Savio-Sou authored Jul 25, 2024
1 parent 176fd08 commit 1a97698
Showing 1 changed file with 55 additions and 5 deletions.
60 changes: 55 additions & 5 deletions barretenberg/cpp/src/barretenberg/bb/readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,66 @@
# BB

## Why is this needed?
### Why is this needed?

Barretenberg is a library that allows one to create and verify proofs. One way to specify the circuit that one will use to create and verify
proofs over is to use the Barretenberg standard library. Another way, which pertains to this module is to supply the circuit description using
an IR called [ACIR](https://github.com/noir-lang/acvm). This binary will take as input ACIR and witness values described in the IR to create proofs.
an IR called [ACIR](https://github.com/noir-lang/acvm).

This binary will take as input ACIR and witness values described in the IR to create proofs.

## FilePath vs Stdout
### 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:

```bash
bbup -v 0.46.1
```

4. Check if the installation was successful:

```bash
bb --version
```

If installation was successful, the command would print the version of `bb` installed.

### Usage

TODO: https://github.com/AztecProtocol/aztec-packages/issues/7600

Full list of available commands:
https://github.com/AztecProtocol/aztec-packages/blob/840486e5ce6b41d6c873239de108b3731dd81101/barretenberg/cpp/src/barretenberg/bb/main.cpp#L1290-L1414

#### FilePath vs Stdout

For commands which allow you to send the output to a file using `-o {filePath}`, there is also the option to send the output to stdout by using `-o -`.

## Maximum Circuit Size
### Version compatibility with Noir

TODO: https://github.com/AztecProtocol/aztec-packages/issues/7511

For quick reference:
- Noir v0.32.0 <> BB v0.46.1
- Noir v0.31.0 <> BB v0.41.0

### Maximum circuit size

Currently the binary downloads an SRS that can be used to prove the maximum circuit size. This maximum circuit size parameter is a constant in the code and has been set to $2^{23}$ as of writing. This maximum circuit size differs from the maximum circuit size that one can prove in the browser, due to WASM limits.
Currently the binary downloads an SRS that can be used to prove the maximum circuit size. This maximum circuit size parameter is a constant in the code and has been set to $2^{23}$ as of writing. This maximum circuit size differs from the maximum circuit size that one can prove in the browser, due to WASM limits.

0 comments on commit 1a97698

Please sign in to comment.