diff --git a/README.md b/README.md index 0d8defc..fbba790 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,57 @@ +# bb-boost + +**This work is experimental. We don't encourage anyone to use it: use the original barretenberg (bb) from +[aztec-packages](https://github.com/AztecProtocol/aztec-packages) for now.** + +bb-boost is aztec-packages [`v6.1.0`](https://github.com/AztecProtocol/aztec-packages/tree/v6.1.0) with performance +optimizations to barretenberg (bb, Aztec's prover) merged on top. Every optimization is **proof-preserving**: with +a fixed proving seed, bb-boost's proofs and verification keys are byte-identical to `v6.1.0`'s, and `v6.1.0`'s bb +verifies them. Only `barretenberg/cpp/src` differs from `v6.1.0`, apart from this README and the CI under `.github/`. + +bb-boost is the starting point for **aztec-golf**, a benchmark of proof-preserving bb optimizations. Participants +start from the latest bb-boost tag (now `v6.1.0-boost.2`) and submit patches against it; the benchmark's runner +checks their proofs against the answer key and times them against that tag. Optimizations found there may be merged +into later bb-boost releases. + +## What `v6.1.0-boost.2` includes + +The best series from earlier rounds of the benchmark, one per column, each squash-merged with its authors credited: + +- **AVM** ([#1](https://github.com/AztecProtocol/bb-boost/pull/1)): multi-threaded AVM trace generation, lookup + inverses computed in parallel chunks, the sumcheck relations batched in parallel, the reference string (CRS) + loaded in parallel and only as much of it as the proof needs, and memory released sooner and on several threads. + It also speeds up code every prover shares: multi-scalar multiplication (MSM) with AVX-512 IFMA kernels and + better work splitting, field arithmetic (faster Montgomery multiplication, batched inversion), polynomial and + sumcheck kernels, Gemini and Shplonk openings, Poseidon2, Keccak, SHA-256 (x86 SHA extensions) and a lock-free + thread pool. +- **Rollup** ([#2](https://github.com/AztecProtocol/bb-boost/pull/2)): faster circuit construction (range constraints + counted and sorted in parallel, cheaper lookups, constants built once), recursion constraints built on scratch + threads and spliced into the circuit, MSM batches split into chunks across workers, cheaper IPA openings, and + faster loading of compressed inputs and the CRS. +- **Client** ([#3](https://github.com/AztecProtocol/bb-boost/pull/3)): aimed at proving in the browser (WASM): + packed field arithmetic for WASM, MSM windows skipped when scalars are short, faster translator and ECCVM trace + construction, sorting the translator's range constraints, and release WASM built with `-O2 -fno-vectorize`. + +[#4](https://github.com/AztecProtocol/bb-boost/pull/4) runs more of bb's test suites in CI and fixes one stale test; +[#5](https://github.com/AztecProtocol/bb-boost/pull/5) adds the benchmarks below. + +## How much faster + +The [benchmark page](https://aztecprotocol.github.io/bb-boost/) times bb at `v6.1.0` and after each merged series on +GitHub-hosted runners (4 CPUs, 16 GB; native builds only, fastest of 3 runs, every proof verified by `v6.1.0`'s bb). +On its first run, against `v6.1.0`: client proving (Chonk) −53%, UltraHonk −58%, rollup −27% and AVM −33% in time. +Timings on other machines differ. + +## Releases and CI + +Tags are `v6.1.0-boost.N`. Each tag's CI builds native Linux tarballs of `bb` and `bb-avm` and attaches them to a +GitHub release. On every push to `main` and every pull request, CI builds bb (native and WASM) and runs bb's unit +tests. + +--- + +The rest of this README is aztec-packages' own, unchanged. + # Aztec Foundation repo All the packages that make up the [Aztec](https://docs.aztec.network) protocol.