-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Initial native version of bb binary. (#524)
- Loading branch information
1 parent
656d794
commit 4a1b532
Showing
45 changed files
with
614 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
build* | ||
docker* | ||
.* | ||
src/wasi-sdk* | ||
src/barretenberg/rollup/proofs/root_*/fixtures/account | ||
src/barretenberg/rollup/proofs/root_*/fixtures/join_split | ||
src/barretenberg/rollup/proofs/root_*/fixtures/**/proving_key | ||
srs_db/ignition/transcript* | ||
# We want to explicitly define what's allowed into the context. | ||
* | ||
|
||
# Important cmake files. | ||
!CMakeLists.txt | ||
!CMakePresets.json | ||
!cmake | ||
|
||
# Important srs_db files. | ||
!srs_db/download_ignition.sh | ||
!srs_db/ignition/checksums | ||
|
||
# Source code. | ||
!src/CMakeLists.txt | ||
!src/barretenberg | ||
!src/msgpack-c | ||
|
||
# Needed scripts. | ||
!scripts/install-wasi-sdk.sh | ||
|
||
# Noir project for testing bb binary. | ||
!bin-test | ||
bin-test/crs | ||
bin-test/proof | ||
bin-test/vk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
authors = [""] | ||
compiler_version = "0.6.0" | ||
|
||
[dependencies] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# bb.js Binary Test | ||
|
||
This test runs a sequence of commands that tests a Noir double recursion circuit verifies (src/main.nr). | ||
The circuit has already been compiled and its witness generated in nargo via `nargo compile && nargo execute witness`. | ||
|
||
To test: | ||
|
||
``` | ||
./bin-test.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# Script is assumed to be run from | ||
set -eu | ||
|
||
bb() { | ||
../build/bin/bb "$@" -v | ||
} | ||
|
||
bb gates | ||
bb prove -o proof | ||
bb write_vk -o vk | ||
bb verify -k vk -p proof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# This script runs all test suites that have not been broken out into their own jobs for parallelisation. | ||
# Might be better to list exclusions here rather than inclusions as risky to maintain. | ||
set -e | ||
|
||
$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null | ||
|
||
IMAGE_URI=278380418400.dkr.ecr.us-east-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert:cache-$COMMIT_HASH | ||
|
||
docker pull $IMAGE_URI | ||
|
||
TESTS=( | ||
crypto_aes128_tests | ||
crypto_blake2s_tests | ||
crypto_blake3s_tests | ||
crypto_ecdsa_tests | ||
crypto_pedersen_commitment_tests | ||
crypto_schnorr_tests | ||
crypto_sha256_tests | ||
ecc_tests | ||
numeric_tests | ||
plonk_tests | ||
polynomials_tests | ||
join_split_example_proofs_inner_proof_data_tests | ||
join_split_example_proofs_notes_tests | ||
srs_tests | ||
transcript_tests | ||
) | ||
TESTS_STR="${TESTS[@]}" | ||
|
||
docker run --rm -t $IMAGE_URI /bin/sh -c "\ | ||
set -e; \ | ||
cd /usr/src/barretenberg/cpp; \ | ||
(cd srs_db && ./download_ignition.sh 1); \ | ||
cd build; \ | ||
./bin/grumpkin_srs_gen 1048576; \ | ||
for BIN in $TESTS_STR; do ./bin/\$BIN; done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Executes the bb binary test script. | ||
set -eu | ||
|
||
$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null | ||
|
||
IMAGE_URI=278380418400.dkr.ecr.us-east-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert:cache-$COMMIT_HASH | ||
|
||
docker pull $IMAGE_URI | ||
|
||
docker run --rm -t $IMAGE_URI /bin/sh -c "\ | ||
set -e; \ | ||
cd /usr/src/barretenberg/cpp/bin-test; \ | ||
./bin-test.sh" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.