Skip to content

Commit

Permalink
git subrepo pull --force circuits/cpp/barretenberg
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "circuits/cpp/barretenberg"
  merged:   "c5c2934ac"
upstream:
  origin:   "https://github.com/AztecProtocol/barretenberg"
  branch:   "master"
  commit:   "c5c2934ac"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
  • Loading branch information
ludamad committed Aug 8, 2023
1 parent 3afd853 commit 0fefc1c
Show file tree
Hide file tree
Showing 27 changed files with 543 additions and 1,086 deletions.
12 changes: 0 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
[submodule "legacy-barretenberg-build-system"]
path = circuits/cpp/barretenberg/build-system
url = https://github.com/AztecProtocol/build-system
[submodule "l1-contracts/lib/openzeppelin-contracts"]
path = l1-contracts/lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "l1-contracts/lib/forge-std"]
path = l1-contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "circuits/cpp/barretenberg/sol/lib/forge-std"]
path = circuits/cpp/barretenberg/sol/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "circuits/cpp/barretenberg/sol/lib/solidity-stringutils"]
path = circuits/cpp/barretenberg/sol/lib/solidity-stringutils
url = https://github.com/Arachnid/solidity-stringutils
[submodule "circuits/cpp/barretenberg/sol/lib/openzeppelin-contracts"]
path = circuits/cpp/barretenberg/sol/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
168 changes: 77 additions & 91 deletions circuits/cpp/barretenberg/.github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,86 +28,67 @@ jobs:
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install bleeding edge cmake
run: |
sudo apt -y remove --purge cmake
sudo snap install cmake --classic
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install clang ninja-build yarn
- name: Install yarn
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt -y update && sudo apt -y install yarn
- name: Compile Barretenberg
run: |
- name: Checkout Code
uses: actions/checkout@v2

- name: Install bleeding edge cmake
run: |
sudo apt -y remove --purge cmake
sudo snap install cmake --classic
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install clang ninja-build yarn
- name: Install yarn
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt -y update && sudo apt -y install yarn
- name: Compile Barretenberg
run: |
cd cpp
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
- name: Install WASI-SDK
run: |
cd cpp
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
- name: Install WASI-SDK
run: |
cd cpp
./scripts/install-wasi-sdk.sh
- name: Compile Typescript
run: |
cd ts
yarn install && yarn && yarn build
- name: Checkout destination repository
uses: actions/checkout@v3
with:
repository: AztecProtocol/dev-bb.js
path: ./dev-bb.js
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

- name: Push to destination repository
run: |
cd ./dev-bb.js
cp -R ../ts/dest/* .
git config --global user.name AztecBot
git config --global user.email [email protected]
git checkout -b dev || git checkout dev
git add .
git commit -m "Tracking changes"
git push origin dev
- name: Tar and GZip barretenberg.wasm
run: tar -cvzf barretenberg.wasm.tar.gz cpp/build-wasm/bin/barretenberg.wasm

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"

- name: Deploy Typescript to NPM
run: |
cd ts
yarn deploy
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Tar and GZip bb Binary (Ubuntu)
run: tar -cvzf bb-ubuntu.tar.gz cpp/build/bin/bb

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
- name: Compile Typescript
run: |
cd ts
yarn install && yarn && yarn build
- name: Tar and GZip barretenberg.wasm
run: tar -cvzf barretenberg.wasm.tar.gz cpp/build-wasm/bin/barretenberg.wasm

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Deploy Typescript to NPM
run: |
cd ts
yarn deploy
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Tar and GZip bb Binary (Ubuntu)
run: tar -cvzf bb-ubuntu.tar.gz cpp/build/bin/bb

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: release-linux-wasm
path: |
barretenberg.wasm.tar.gz
bb-ubuntu.tar.gz
build-mac:
name: Build on Mac
runs-on: macos-13
Expand All @@ -116,31 +97,36 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
# We need clang 14.0.3 or higher, as lower versions do not seem
# to be spec conformant. In particular std::span does not seem
# to follow the specifications.
# We need clang 14.0.3 or higher, as lower versions do not seem
# to be spec conformant. In particular std::span does not seem
# to follow the specifications.
- name: Select Xcode version
run: |
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
- name: Create Mac Build Environment
run: |
brew install cmake ninja
- name: Compile Barretenberg
working-directory: cpp
run: |
cd cpp
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
- name: Package barretenberg artifact
working-directory: cpp/build/bin
run: |
mkdir dist
cp ./bb ./dist/bb
7z a -ttar -so -an ./dist/* | 7z a -si ./barretenberg-x86_64-apple-darwin.tar.gz
- name: Tar bb binary (Mac)
run: tar -cvzf bb-mac.tar.gz cpp/build/bin/bb

- name: Upload artifacts
uses: actions/upload-artifact@v2
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: release-mac
path: bb-mac.tar.gz
name: barretenberg-x86_64-apple-darwin
path: ./cpp/build/bin/barretenberg-x86_64-apple-darwin.tar.gz
retention-days: 3

release:
name: Publish
Expand All @@ -151,12 +137,12 @@ jobs:
uses: actions/download-artifact@v2
with:
name: release-linux-wasm

- name: Download files from Mac Runner
uses: actions/download-artifact@v2
with:
name: release-mac

name: barretenberg-x86_64-apple-darwin
- name: Publish to GitHub
uses: softprops/action-gh-release@v1
with:
Expand All @@ -165,4 +151,4 @@ jobs:
files: |
barretenberg.wasm.tar.gz
bb-ubuntu.tar.gz
bb-mac.tar.gz
barretenberg-x86_64-apple-darwin.tar.gz
4 changes: 2 additions & 2 deletions circuits/cpp/barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = d4ade2a5f06a3abf3c9c2635946d7121cc2f64b4
parent = 5cf9c203e126b7613bf80960063d86cb9ee97954
commit = c5c2934ac39a8be401df4452428d367f6d224ec9
parent = 3afd853074be02ebf0a8d1f6187e49505513017e
method = merge
cmdver = 0.4.6
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{".":"0.3.4","ts":"0.3.4"}
{".":"0.3.6","ts":"0.3.6"}
28 changes: 28 additions & 0 deletions circuits/cpp/barretenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## [0.3.6](https://github.com/AztecProtocol/barretenberg/compare/barretenberg-v0.3.5...barretenberg-v0.3.6) (2023-08-08)


### Features

* Update release-please.yml ([#651](https://github.com/AztecProtocol/barretenberg/issues/651)) ([2795df6](https://github.com/AztecProtocol/barretenberg/commit/2795df6b705175a32fe2a6f18b3c572e297e277e))

## [0.3.5](https://github.com/AztecProtocol/barretenberg/compare/barretenberg-v0.3.4...barretenberg-v0.3.5) (2023-08-07)


### Features

* Celer benchmark ([#1369](https://github.com/AztecProtocol/barretenberg/issues/1369)) ([d4ade2a](https://github.com/AztecProtocol/barretenberg/commit/d4ade2a5f06a3abf3c9c2635946d7121cc2f64b4))
* Goblin Honk Composer/Prover/Verifier ([#1220](https://github.com/AztecProtocol/barretenberg/issues/1220)) ([970bb07](https://github.com/AztecProtocol/barretenberg/commit/970bb073763cc59552cd05dccf7f8fc63f58cef9))
* Goblin translator prototype ([#1249](https://github.com/AztecProtocol/barretenberg/issues/1249)) ([7738d74](https://github.com/AztecProtocol/barretenberg/commit/7738d74791acc0fa8b1b1d8bb2a77783ca900123))
* Internal keyword + lending contract and tests ([#978](https://github.com/AztecProtocol/barretenberg/issues/978)) ([e58ca4b](https://github.com/AztecProtocol/barretenberg/commit/e58ca4b332272fc57b2a5358bb5003bac79a8f5a))
* Minimal barretenberg .circleci ([#1352](https://github.com/AztecProtocol/barretenberg/issues/1352)) ([708e2e2](https://github.com/AztecProtocol/barretenberg/commit/708e2e2786de5dce5bfc770c54734e5862a436e5))


### Bug Fixes

* Bootstrap.sh git hook for monorepo ([#1256](https://github.com/AztecProtocol/barretenberg/issues/1256)) ([b22b8d5](https://github.com/AztecProtocol/barretenberg/commit/b22b8d5f42ddfae140068c3ce8b3053d4c8d1874))
* Build-system spot request cancellation ([#1339](https://github.com/AztecProtocol/barretenberg/issues/1339)) ([fc1d96a](https://github.com/AztecProtocol/barretenberg/commit/fc1d96a744a8d5a6cae06c408546c3638408551d))
* Fixing external benchmarks ([#1250](https://github.com/AztecProtocol/barretenberg/issues/1250)) ([0ea6a39](https://github.com/AztecProtocol/barretenberg/commit/0ea6a39950e8cd5ff7765031457c162d03ebae06))
* Fixing fuzzing build after composer splitting ([#1317](https://github.com/AztecProtocol/barretenberg/issues/1317)) ([946c23c](https://github.com/AztecProtocol/barretenberg/commit/946c23c52d45ddce973e453c40c048734e7f6937))
* Reinstate barretenberg-benchmark-aggregator ([#1330](https://github.com/AztecProtocol/barretenberg/issues/1330)) ([407a915](https://github.com/AztecProtocol/barretenberg/commit/407a915a94c7d83dec9e14a11ad0e3461fd2906d))
* Retry git submodule fetch ([#1371](https://github.com/AztecProtocol/barretenberg/issues/1371)) ([037dda3](https://github.com/AztecProtocol/barretenberg/commit/037dda3d254d56a20292d2bed5a9582d36c08427))

## [0.3.4](https://github.com/AztecProtocol/barretenberg/compare/barretenberg-v0.3.3...barretenberg-v0.3.4) (2023-07-25)


Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.4 x-release-please-version
v0.3.6 x-release-please-version
26 changes: 21 additions & 5 deletions circuits/cpp/barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,45 @@ if [ ! -d acir_tests ]; then
git clone -b $BRANCH --filter=blob:none --no-checkout https://github.com/noir-lang/noir.git
cd noir
git sparse-checkout init --cone
git sparse-checkout set crates/nargo_cli/tests/execution_success
git sparse-checkout set crates/nargo_cli/tests/test_data
git checkout
cd ..
mv noir/crates/nargo_cli/tests/execution_success acir_tests
mv noir/crates/nargo_cli/tests/test_data acir_tests
rm -rf noir
fi
fi

cd acir_tests

# Parse exclude and fail directories from cargo.toml
exclude_dirs=$(grep "^exclude" config.toml | sed 's/exclude = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n')
fail_dirs=$(grep "^fail" config.toml | sed 's/fail = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n')

# Convert them to array
exclude_array=($exclude_dirs)
fail_array=($fail_dirs)
skip_array=(diamond_deps_0 workspace workspace_default_member)

function test() {
echo -n "Testing $1... "

dir_name=$(basename "$1")
if [[ " ${exclude_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (excluded)"
return
fi

if [[ " ${fail_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (would fail)"
return
fi

if [[ " ${skip_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (hardcoded to skip)"
return
fi

if [[ ! -f ./$1/target/$dir_name.json || ! -f ./$1/target/witness.tr ]]; then
if [[ ! -f ./$1/target/main.json || ! -f ./$1/target/witness.tr ]]; then
echo -e "\033[33mSKIPPED\033[0m (uncompiled)"
return
fi
Expand All @@ -49,9 +65,9 @@ function test() {

set +e
if [ -n "$VERBOSE" ]; then
$BB prove_and_verify -v -c $CRS_PATH -j ./target/$dir_name.json
$BB prove_and_verify -v -c $CRS_PATH
else
$BB prove_and_verify -c $CRS_PATH -j ./target/$dir_name.json > /dev/null 2>&1
$BB prove_and_verify -c $CRS_PATH > /dev/null 2>&1
fi
result=$?
set -e
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/barretenberg-wasm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ in
stdenv.mkDerivation
{
pname = "barretenberg.wasm";
version = "0.3.4"; # x-release-please-version
version = "0.3.6"; # x-release-please-version

src = ./cpp;

Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/barretenberg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
buildEnv.mkDerivation
{
pname = "libbarretenberg";
version = "0.3.4"; # x-release-please-version
version = "0.3.6"; # x-release-please-version

src = ./cpp;

Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24)
project(
Barretenberg
DESCRIPTION "BN254 elliptic curve library, and PLONK SNARK prover"
VERSION 0.3.4 # x-release-please-version
VERSION 0.3.6 # x-release-please-version
LANGUAGES CXX C
)

Expand Down
1 change: 0 additions & 1 deletion circuits/cpp/barretenberg/cpp/bin-test/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[package]
name = ""
authors = [""]
compiler_version = "0.6.0"

Expand Down
Loading

0 comments on commit 0fefc1c

Please sign in to comment.