Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
feat!: Depend upon upstream barretenberg & switch to UltraPlonk (#84)
Browse files Browse the repository at this point in the history
* feat: Introduce barretenberg-sys crate to provide native bindings

* chore: Remove committed barretenberg.wasm

* fix!: Copy wasm into project during build instead of committing it

* feat: Build the project with Nix

* chore: Remove barretenberg_dep.sh

* Comment

* Use master branch

* Back to static

* Better error messages when build script fails

* Add links toml key

* Avoid OS being pub

* Move name and version into nix

* Share environment with devShell

* Add Security framework so tests run on apple

* Comment

* Provide NOIR_TRANSCRIPT via nix fetch

* Document nativeBuildInputs

* Rework nix to build & reuse artifact & add test check

* Rename for barretenberg-backend

* Add clippy check

* Fix clippy warnings

* Apply our clippy flags

* Update some comments

* Simplify check naming & do various cleanup

* Prefix cargo

* Try to build with nix in CI

* Switch to rust-embed to interpolate the nix env var

* try to override bintools for all of crane

* feat(nix): Switch to which clang (#88)

Co-authored-by: Koby <[email protected]>

* gcc11 libs always?

* why does ring fail to build?

* which fails in nix

* back to stdenv

* try to use pkg-config to find omp

* pkg-config cannot load omp, move the link to the bottom again

* avoid cleaning the source

* try adding the linker config to the workspace root

* try overriding the dummy src to copy the cargo dir

* put rustls back

* fix dummysrc

* put the cargo dir at the root of the dummy src

* build deps without bb-sys

* Copy the linker config to root of workspace

* Remove bb-sys from workspace and use as git dep

* Update G2_START, rename transcript & fetch monomial transcript

* Change transcript name and download URL

* trying to get it working

* changes to wasm instance load and new bb.wasm using ultra composer

* fixed up bb.wasm with logic constraints for ultra

* rename wasm composer methods

* testing ultra still, pushing remotely for others to access

* working towards solidity verifier

* Set AND and XOR to false

* make things kind of work

* WIP

* re-enable AND and XOR - needs test

* remove print statments

* re-enable tests

* cleanup

* update merkle wasm test hashes

* use latest bb-sys commit

* removed check

* update lockfile

* cleanup and notes from diff review

* Generate solidity contract natively

* update lockfile

* update lockfile

* clippy

* include solidity files in source

* clippy

* implement solidity verifier in wasm

* Use workarounds from bb nix and update import bindings

* update lockfile

* clippy

* update lockfile

* update lockfile

* dedupe contract and remove old contract stuff in common crate

* update lockfile

* diff review nits

* Use published bb-sys crate

* cleanup description

* Update barretenberg_wasm/src/lib.rs

Co-authored-by: Tom French <[email protected]>

* update lockfile

---------

Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: Koby Hall <[email protected]>
Co-authored-by: Koby <[email protected]>
Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: Tom French <[email protected]>
  • Loading branch information
6 people authored Apr 6, 2023
1 parent 28014d8 commit 8437bf7
Show file tree
Hide file tree
Showing 34 changed files with 3,638 additions and 3,858 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,32 @@ concurrency:
cancel-in-progress: true

jobs:
check_n_test:
name: cargo check & test
uses: noir-lang/.github/.github/workflows/rust-test.yml@main
nix:
name: Nix build & test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}

clippy:
name: cargo clippy
uses: noir-lang/.github/.github/workflows/rust-clippy.yml@main
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-linux
- os: macos-latest
target: x86_64-darwin

format:
name: cargo fmt
uses: noir-lang/.github/.github/workflows/rust-format.yml@main
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: Cargo clippy
run: |
nix build -L .#checks.${{ matrix.target }}.cargo-clippy
- name: Cargo test
run: |
nix build -L .#checks.${{ matrix.target }}.cargo-test
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/target
**/target
target
.DS_Store
node_modules
dest
noir-example-project
result
barretenberg_wasm/src/barretenberg.wasm
Loading

0 comments on commit 8437bf7

Please sign in to comment.