Skip to content

Commit

Permalink
feat!: Switch to aztec_backend that uses upstream BB & UltraPlonk (#1114
Browse files Browse the repository at this point in the history
)

* feat(build): Nix flake to build with

* use debug ultra branch for backend, and temporary simple XOR/AND test added to nargo test_data

* ignore result

* Update deps

* Avoid reading build data if we already have it

* Update values for UP

* Align flake with aztec_backend

* update lockfile

* skip simple_shield until it is updated

* Update nix version with our workflow

* Build with Nix in CI

* Update backend deps

* Simplify the nix file

* chore(nargo)!: Update the codegen command to use vk, which requires circuit_name arg

* chore!: Update Prover.toml for merkle_insert and simple_shield with UP (#1123)

* re-enable simple_shield

* use CARGO_MANIFEST_DIR to locate data for integration testing

* clippy

* patch for bb-sys

* patch for bb

* Add build workaround to wasm crate

* clippy

* Remove buggy clippy lint

* cleanup flake

* Rough guidelines for working on Noir with nix

* chore: Cleanup UltraPlonk Debugging (#1130)

cleanup debugging code from UP

* update 8_integration main func

* update to newer bb

* update aztec_backend

* update acvm to 0.9.0

* Reference temp commit on aztec_backend

* fix some issues with the acvm 0.9 upgrade

* temp lock to cody bb branch

* chore: fix up merge issues

* update for contract changes

* update to appropriate refs

* working on direnv

* Update nix and direnv stuff

* Update building documentation

* Stop ignoring vscode dir and recommend extensions and settings

* cspell

* aztec_backend refs

* nix lockfile

* Simplify and rename workflow

* docs cleanup

* code review

* Update crates/nargo_cli/tests/prove_and_verify.rs

* Update crates/nargo_cli/tests/prove_and_verify.rs

Co-authored-by: kevaundray <kevtheappdev@gmail.com>

* Update cspell.json

* Update README.md

* Update cspell.json

* update bb-sys for linux env fixes

* add issue numbers to TODOs

* Update transcript comment

---------

Co-authored-by: Koby <koby@aztecprotocol.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Co-authored-by: Tom French <tom@tomfren.ch>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
  • Loading branch information
6 people authored Apr 21, 2023
1 parent e4c7bb2 commit f14fe0b
Show file tree
Hide file tree
Showing 31 changed files with 712 additions and 272 deletions.
21 changes: 20 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
use nix
# Based on https://github.com/direnv/direnv-vscode/blob/158e8302c2594cc0eaa5f8b4f0cafedd4e1c0315/.envrc

# You can define your system-specific logic (like Git settings or GH tokens) in .envrc.local
# If that logic is usable by other people and might improve development environment, consider
# contributing it to this file!

source_env_if_exists .envrc.local

if [[ -z "${SKIP_NIX:-}" ]] && has nix; then

if nix flake metadata &>/dev/null && has use_flake; then
# use flakes if possible
use flake

else
# Otherwise fall back to pure nix
use nix
fi

fi
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
pull-request-title-pattern: "chore(noir): Release ${version}"
extra-files: |
Cargo.toml
flake.nix
update-lockfile:
name: Update lockfile
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/rust.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on: [push, pull_request]

# This will cancel previous runs when a branch or PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-linux
- os: macos-latest
target: x86_64-darwin

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Run `nix flake check`
run: |
nix flake check
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
.DS_Store
examples/**/target/
examples/9
.vscode
node_modules
pkg/

# Nix stuff
result
.envrc.local
.direnv/

# Nargo output
*.proof
*.acir
*.acir.sha256
*.tr
*.pk
*.vk
**/Verifier.toml
**/Verifier.toml
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"mkhl.direnv",
"jnoortheen.nix-ide",
"rust-lang.rust-analyzer",
"redhat.vscode-yaml"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"direnv.restart.automatic": true,
"redhat.telemetry.enabled": false,
"yaml.recommendations.show": false,
"nix.serverPath": "nil",
"nix.enableLanguageServer": true,
"nix.serverSettings": {
"nil": {
"formatting": {
"command": [
"nixpkgs-fmt"
]
}
}
},
}
Loading

0 comments on commit f14fe0b

Please sign in to comment.