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

feat!: Call backend via precompiled binaries #239

Merged
merged 91 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
10a90b6
wip
kevaundray Aug 17, 2023
1b8c9b0
modify comment
kevaundray Aug 18, 2023
01eede4
small cleanup of logic and more comments
kevaundray Aug 18, 2023
7caecec
chore: remove useless format
TomAFrench Aug 18, 2023
87a4091
chore: remove useless references
TomAFrench Aug 18, 2023
b137f07
chore: fix tests
TomAFrench Aug 18, 2023
b172a4d
change .json to .bytecode
kevaundray Aug 20, 2023
afcd80a
change path_to_json to `path_to_bytecode`
kevaundray Aug 20, 2023
652a091
modify interface implementation to accept the bytecode instead of the…
kevaundray Aug 20, 2023
08a2d24
cargo clippy
kevaundray Aug 20, 2023
a7ffab5
update cargo.toml
kevaundray Aug 20, 2023
c4741e9
return a u32 for gatesCommand
kevaundray Aug 20, 2023
e463e94
modify getCircuitSize
kevaundray Aug 20, 2023
97c5e77
make ContractCommand accessible
kevaundray Aug 20, 2023
a9a0ebf
make read_bytes and serialize_circuit pub(super)
kevaundray Aug 20, 2023
2c0c2f1
modify smart_contract trait impl
kevaundray Aug 20, 2023
a4fde90
small cleanup: add comments
kevaundray Aug 20, 2023
41981da
chore: prevent duplicate CRS
TomAFrench Aug 21, 2023
797cc46
chore: merge in master
TomAFrench Aug 21, 2023
2285e6a
Merge branch 'master' into kw/dyn-backends
TomAFrench Aug 21, 2023
72aca3f
chore: remove remainder of old `SmartContract` implementation
TomAFrench Aug 21, 2023
489b98f
fix: restore `contract.sol`
TomAFrench Aug 21, 2023
66b5ebc
chore: deal with clippy warnings
TomAFrench Aug 21, 2023
bc3681f
chore: download bb binary in `build.rs` script
TomAFrench Aug 21, 2023
e88c48c
chore: handle `is_recursive` better
TomAFrench Aug 21, 2023
033cd54
Update build.rs
kevaundray Aug 21, 2023
8f0014d
chore: remove preprocessing related code
TomAFrench Aug 22, 2023
65ef893
chore: stop tests from overwriting `contract.sol`
TomAFrench Aug 22, 2023
55a64e8
chore: remove unwanted printing to console
TomAFrench Aug 22, 2023
1ad7b73
chore: separate out different bb commands into files
TomAFrench Aug 22, 2023
23f14e7
chore: fix tests
TomAFrench Aug 22, 2023
9a32d70
chore: remove reliance on `NARGO_BINARIES_PATH` env var
TomAFrench Aug 22, 2023
f9b3404
chore: throw error if binary doesn't exist
TomAFrench Aug 22, 2023
c405e37
feat: download bb binaries at runtime
TomAFrench Aug 22, 2023
aea173d
chore: remove double-slash in url
TomAFrench Aug 22, 2023
27dd07d
chore: re-add test for `eth_contract_from_vk`
TomAFrench Aug 22, 2023
e77102e
chore: read verification library contract from stdout
TomAFrench Aug 22, 2023
238c8b8
chore: read proofs from stdout
TomAFrench Aug 22, 2023
5cac852
chore: push decision to read from stdout where possible down into `bb`
TomAFrench Aug 22, 2023
72ac103
chore: inline some functions
TomAFrench Aug 22, 2023
00c33ec
fix: re-add `Assignments` for wasm feature
TomAFrench Aug 23, 2023
d055b95
chore: remove dead-code
TomAFrench Aug 23, 2023
1e6be34
chore: make `barretenberg_structures` available to native
TomAFrench Aug 23, 2023
6050cdc
chore: fix compilation
TomAFrench Aug 23, 2023
054a789
fix: correctly ensure destination directory exists
TomAFrench Aug 23, 2023
e2fe3b3
chore: push temp nix debugging code
TomAFrench Aug 23, 2023
1b76110
chore: add extra inputs
TomAFrench Aug 23, 2023
f66c686
patch bb binary
kevaundray Aug 23, 2023
568692f
make patchelf only for linux
kevaundray Aug 23, 2023
48a53b4
add conditional statements for mac, so CI can show if there are any p…
kevaundray Aug 24, 2023
08c6c4e
chore: fix indentation
TomAFrench Aug 24, 2023
597ea71
chore: restore normal tests
TomAFrench Aug 24, 2023
a73a7e9
fix: include test inputs in sandbox
TomAFrench Aug 24, 2023
3caaeaa
fix: add necessary built inputs to wasm builds
TomAFrench Aug 24, 2023
c2f4204
chore: formatting changes
TomAFrench Aug 24, 2023
1d51b74
fix: revert to writing proofs to files
TomAFrench Aug 24, 2023
d76bc83
chore: use temp directories for test artifacts
TomAFrench Aug 25, 2023
d6cb1fe
chore: add test timeout
TomAFrench Aug 25, 2023
b56e6e3
chore: write contract to file
TomAFrench Aug 25, 2023
0e4b768
chore: be explicit about when to drop `temp_directory`
TomAFrench Aug 25, 2023
8d6d16f
chore: remove debugging code from `no_command_provided_works` test
TomAFrench Aug 25, 2023
0db655d
chore: maintain `temp_directory` when creating path
TomAFrench Aug 25, 2023
3c50783
chore: attach stderr to `CliShimError`
TomAFrench Aug 25, 2023
ab4af74
chore: be explicit about dropping the temp directory in `test_smart_c…
TomAFrench Aug 25, 2023
42d7bd7
chore: stop returning stdout output from `write_vk`
TomAFrench Aug 25, 2023
8131585
try large mac
kevaundray Aug 25, 2023
1f12c8a
Update .github/workflows/test.yml
kevaundray Aug 25, 2023
5e62425
sandbox issue?
kevaundray Aug 27, 2023
3bf6b82
use nix develop
kevaundray Aug 27, 2023
ddffd4d
chore: use WASM backend for blackbox functions exclusively and remove…
kevaundray Aug 28, 2023
2882490
Merge remote-tracking branch 'origin/master' into kw/dyn-backends
kevaundray Aug 28, 2023
1ec41f5
zipped path has been fixed
kevaundray Aug 28, 2023
fae8a73
now using version 0.4.4
kevaundray Aug 28, 2023
97a6518
unused import
kevaundray Aug 28, 2023
fcb80b8
add code to support arm64
kevaundray Aug 28, 2023
434c217
set env variables once all checks have passed
kevaundray Aug 28, 2023
4434996
Update src/bb/mod.rs
kevaundray Aug 28, 2023
74f6f37
update to 0.4.5
kevaundray Aug 29, 2023
c13223d
fix gates command
kevaundray Aug 29, 2023
f1e92d7
tmate debug
kevaundray Aug 29, 2023
86751bd
chore: remove unnecessary `match`
TomAFrench Aug 29, 2023
ab7808d
chore: remove unnecessary `return`
TomAFrench Aug 29, 2023
f55261e
Empty-Commit
kevaundray Aug 29, 2023
1771008
Empty-Commit
kevaundray Aug 29, 2023
1d5b4b9
remove tmate
kevaundray Aug 29, 2023
f47400a
0.4.6
kevaundray Aug 29, 2023
6d829f8
chore: use proper ci runner
TomAFrench Aug 29, 2023
3338cdf
chore: remove stale comment
TomAFrench Aug 29, 2023
a8fa9d6
chore!: Remove `BlackBoxFunctionSolver` implementation (#250)
TomAFrench Aug 30, 2023
8334a6c
Revert "chore: remove stale comment"
TomAFrench Aug 30, 2023
feeacfa
chore: switch to running cargo directly again
TomAFrench Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 36 additions & 64 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,44 @@
name: Test
name: Rust 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 }}
timeout-minutes: 40
env:
CACHED_PATH: /tmp/nix-cache

test_ubuntu:
name: Test on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: dtolnay/[email protected]
with:
target: x86_64-unknown-linux-gnu

- name: Run tests
env:
RUST_TEST_THREADS: 1
run: |
cargo test

test_mac:
name: Test on macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-linux
- os: macos-latest
target: x86_64-darwin
target: [x86_64-apple-darwin, aarch64-apple-darwin]

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

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

- uses: cachix/cachix-action@v12
with:
name: barretenberg

- name: Restore nix store cache
uses: actions/cache/restore@v3
id: cache
with:
path: ${{ env.CACHED_PATH }}
key: ${{ runner.os }}-flake-${{ hashFiles('*.lock') }}

# Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26
- name: Copy cache into nix store
if: steps.cache.outputs.cache-hit == 'true'
# We don't check the signature because we're the one that created the cache
run: |
for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do
path=$(head -n 1 "$narinfo" | awk '{print $2}')
nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path"
done

- name: Run `nix flake check`
run: |
nix flake check -L

- name: Export cache from nix store
if: ${{ always() && steps.cache.outputs.cache-hit != 'true' }}
run: |
nix copy --to "file:///tmp/nix-cache?compression=zstd&parallel-compression=true" .#native-cargo-artifacts
nix copy --to "file:///tmp/nix-cache?compression=zstd&parallel-compression=true" .#wasm-cargo-artifacts

- uses: actions/cache/save@v3
# Write a cache entry even if the tests fail but don't create any for the merge queue.
if: ${{ always() && steps.cache.outputs.cache-hit != 'true' }}
with:
path: ${{ env.CACHED_PATH }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: dtolnay/[email protected]
with:
target: ${{ matrix.target }}

- name: Run tests
env:
RUST_TEST_THREADS: 1
run: |
cargo test
Loading