Crates.io | acvm-backend-barretenberg |
lib.rs | acvm-backend-barretenberg |
version | 0.12.0 |
source | src |
created_at | 2023-05-11 19:33:48.207882 |
updated_at | 2023-08-30 14:12:43.451427 |
description | An ACVM backend which allows proving/verifying ACIR circuits against Aztec Lab's Barretenberg library. |
homepage | |
repository | |
max_upload_size | |
id | 862422 |
size | 217,578 |
An ACVM backend which allows proving/verifying ACIR circuits against Aztec Lab's Barretenberg library.
The verifier contracts generated by this library are developed in https://github.com/AztecProtocol/aztec-verifier-contracts. As such, we cannot accept any modifications to the contracts directly and any changes to the contracts must first be made and accepted in the upstream repository.
Due to the large number of native dependencies, this project uses Nix and direnv to streamline the development experience.
For the best experience, please follow these instructions to setup your environment:
~/.config/nix/nix.conf
with the contents:experimental-features = nix-command
extra-experimental-features = flakes
nix profile install nixpkgs#direnv
Now that your environment is set up, you can get to work on the project.
git clone git@github.com:noir-lang/aztec_backend
cd aztec_backend
.envrc
file, then you need to run:direnv allow
code .
Assuming you are using direnv
to populate your environment, building and testing the project can be done
with the typical cargo build
, cargo test
, and cargo clippy
commands. You'll notice that the cargo
version matches the version we specify in flake.nix, which is 1.66.0 at the time of this writing.
If you want to build the entire project in an isolated sandbox, you can use Nix commands:
nix build .
(or nix build . -L
for verbose output) to build the project in a Nix sandboxnix flake check
(or nix flake check -L
for verbose output) to run clippy and tests in a Nix sandboxIf you are working on this project and want a different version of Barretenberg (instead of the version this project is pinned against), you'll want to replace the lockfile version with your version. This can be done by running:
nix flake lock --override-input barretenberg /absolute/path/to/your/barretenberg
You can also point at a fork and/or branch on GitHub using:
nix flake lock --override-input barretenberg github:username/barretenberg/branch_name
Note: You don't want to commit the updated lockfile, as it will fail in CI!
If you have hesitations with using direnv
, you can launch a subshell with nix develop
and then launch your editor
from within the subshell. However, if VSCode was already launched in the project directory, the environment won't be updated.
Advanced: If you aren't using direnv
nor launching your editor within the subshell, you can try to install Barretenberg and other global dependencies the package needs. This is an advanced workflow and likely won't receive support!