Skip to content

Commit

Permalink
Merge branch 'master' into md/avm-main-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jan 8, 2024
2 parents 56c34ca + cf96460 commit d8aab78
Show file tree
Hide file tree
Showing 2,025 changed files with 133,582 additions and 135,079 deletions.
122 changes: 89 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
name: "Build"
command: cond_spot_run_build noir-packages 32

noir-acir-tests:
noir-compile-acir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
Expand All @@ -123,7 +123,7 @@ jobs:
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-acir-tests 32
command: cond_spot_run_build noir-compile-acir-tests 32

# Barretenberg
barretenberg-wasm-linux-clang:
Expand Down Expand Up @@ -192,6 +192,21 @@ jobs:
name: "Build"
command: cond_spot_run_build barretenberg-x86_64-linux-clang-sol 32

barretenberg-docs:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build barretenberg docs"
command: build barretenberg-docs
- run:
name: "Deploy barretenberg docs"
command: |
barretenberg/cpp/docs/deploy_doxygen.sh
barretenberg-stdlib-tests:
docker:
- image: aztecprotocol/alpine-build-image
Expand Down Expand Up @@ -324,6 +339,17 @@ jobs:
name: "Build and test"
command: build l1-contracts

boxes-files:
machine:
image: ubuntu-2204:2023.07.2
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: build boxes-files

yarn-project-base:
machine:
image: ubuntu-2204:2023.07.2
Expand Down Expand Up @@ -423,38 +449,49 @@ jobs:
name: "Build and test"
command: build aztec-faucet | add_timestamps

boxes-blank-react:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
boxes:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests blank-react
name: "Build"
command: cond_spot_run_build boxes 4

boxes-blank:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests blank
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-blank

boxes-blank-react:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-blank-react

boxes-token:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests token
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-token

end-to-end:
machine:
Expand Down Expand Up @@ -852,6 +889,17 @@ jobs:
- run:
name: "Copy docs dockerignore"
command: cp docs/.dockerignore .
- run:
name: "Require released code"
command: |
LAST_TAG="aztec-packages-v$(jq -r '.["."]' .release-please-manifest.json)"
if git ls-remote --tags origin | grep "$LAST_TAG" > /dev/null; then
echo "Using code released from $LAST_TAG"
echo "INCLUDE_RELEASED_CODE=1" >> docs/.env
git fetch origin --refetch --no-filter refs/tags/$LAST_TAG:refs/tags/$LAST_TAG
else
echo "Skipping as $LAST_TAG is not yet published"
fi
- run:
name: "Build docs"
command: build docs
Expand Down Expand Up @@ -1037,7 +1085,7 @@ workflows:
- noir-arm64
<<: *defaults
- noir-packages: *defaults
- noir-acir-tests:
- noir-compile-acir-tests:
requires:
- noir-ecr-manifest
<<: *defaults
Expand All @@ -1059,8 +1107,9 @@ workflows:
- barretenberg-acir-tests-bb:
requires:
- barretenberg-x86_64-linux-clang-assert
- noir-acir-tests
- noir-compile-acir-tests
<<: *defaults
- barretenberg-docs: *defaults
- bb-js:
requires:
- barretenberg-wasm-linux-clang
Expand All @@ -1072,7 +1121,7 @@ workflows:
- bb-js-acir-tests:
requires:
- bb-js
- noir-acir-tests
- noir-compile-acir-tests
<<: *defaults

- l1-contracts: *defaults
Expand All @@ -1081,13 +1130,16 @@ workflows:

- yellow-paper: *defaults

- boxes-files: *defaults

# Yarn Project
- yarn-project-base:
requires:
- l1-contracts
- bb-js
- noir-ecr-manifest
- noir-packages
- boxes-files
<<: *defaults
- yarn-project:
requires:
Expand All @@ -1105,18 +1157,22 @@ workflows:
- aztec-faucet: *defaults_yarn_project_prod

# Boxes.
# - boxes-blank-react:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-blank:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-token:
# requires:
# - aztec-sandbox
# <<: *defaults
- boxes:
requires:
- aztec-sandbox
<<: *defaults
- boxes-blank:
requires:
- boxes
<<: *defaults
- boxes-blank-react:
requires:
- boxes
<<: *defaults
- boxes-token:
requires:
- boxes
<<: *defaults

# End to end tests.
- e2e-join:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mirror_noir_subrepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Push to branch
run: |
SUBREPO_PATH=noir
BRANCH=aztec
BRANCH=aztec-packages
# identify ourselves, needed to commit
git config --global user.name AztecBot
git config --global user.email [email protected]
Expand All @@ -57,4 +57,4 @@ jobs:
pr_title: 'feat: aztec-packages'
pr_body: 'Development from Aztec.'
destination_branch: 'master'
source_branch: 'aztec'
source_branch: 'aztec-packages'
22 changes: 12 additions & 10 deletions .github/workflows/mirror_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,30 @@ jobs:
# list all aztec-packages tags, take the "highest" version
monorepo_tag="$(git tag --list aztec-packages-v* | sort --version-sort | tail -1)"
monorepo_protocol_circuits_path="yarn-project/noir-protocol-circuits"
nargo_file="$SUBREPO_PATH/aztec/Nargo.toml"
# take all Nargo.toml files that reference noir-protocol-circuits
nargo_files="$(find $SUBREPO_PATH -name 'Nargo.toml' | xargs grep --files-with-matches 'noir-protocol-circuits')"
# match lines like this:
# protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" }
# and replace with
# protocol_types = { git="https://github.com/aztecprotocol/aztec-packages", tag="aztec-packages-v0.16.9", directory="yarn-project/noir-protocol-circuits/src/crates/types" }
sed --regexp-extended --in-place \
"s;path\s*=\s*\".*noir-protocol-circuits(.*)\";git=\"$monorepo_url\", tag=\"$monorepo_tag\", directory=\"$monorepo_protocol_circuits_path\1\";" \
$nargo_file
for nargo_file in $nargo_files; do
sed --regexp-extended --in-place \
"s;path\s*=\s*\".*noir-protocol-circuits(.*)\";git=\"$monorepo_url\", tag=\"$monorepo_tag\", directory=\"$monorepo_protocol_circuits_path\1\";" \
$nargo_file
done
git commit --all --message "chore: replace relative paths to noir-protocol-circuits"
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=master; then
git fetch # in case a commit came after this
git rebase origin/master
# restore old Nargo.toml
# We have to go back two generations. History looks like this:
# HEAD <--- the commit generated by git_subrepo
# HEAD~1 <--- the chore commit created above
# HEAD~2 <--- the original commit we were supposed to mirror or the tip of master after rebase
git restore --source=HEAD~2 -- $nargo_file
# restore old files
for nargo_file in $nargo_files; do
git restore --source=origin/master -- $nargo_file
done
git commit --all --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
Expand Down
45 changes: 41 additions & 4 deletions .github/workflows/protocol-circuits-gate-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,46 @@ on:

jobs:
compare_protocol_circuits_gates:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.tag || env.GITHUB_REF }}

- 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 ninja-build
- name: Install Clang16
run: |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar -xvf clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
sudo cp clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/* /usr/local/bin/
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/include/* /usr/local/include/
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/* /usr/local/lib/
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/share/* /usr/local/share/
- uses: actions/cache@v3
with:
path: |
barretenberg/cpp/build
barretenberg/cpp/build-wasm
barretenberg/cpp/build-threads
key: ${{ runner.os }}-bb-build

- name: Compile Barretenberg
run: |
cd barretenberg/cpp
cmake --preset default -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=RelWithAssert -DTARGET_ARCH=westmere
cmake --build --preset default --target bb
- name: Install noirup
run: |
Expand Down Expand Up @@ -48,12 +82,15 @@ jobs:
run: |
nargo info --json > protocol_circuits_report.json
mv protocol_circuits_report.json ../../../protocol_circuits_report.json
env:
NARGO_BACKEND_PATH: ../../../barretenberg/cpp/build/bin/bb

- name: Compare gates reports
id: gates_diff
uses: TomAFrench/noir-gates-diff@e7cf131b7e7f044c01615f93f0b855f65ddc02d4
with:
report: protocol_circuits_report.json
summaryQuantile: 1 # Display any diff in gate count
summaryQuantile: 0 # Display any diff in gate count

- name: Add gates diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build-system/ @charlielye
/build_manifest.yml @charlielye
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ All the packages that make up [Aztec](https://docs.aztec.network).
- [Aztec.nr](./yarn-project/aztec-nr/): A [Noir](https://noir-lang.org) framework for smart contracts on Aztec.
- [Aztec Sandbox](./yarn-project/aztec-sandbox/): A package for setting up a local dev net, including a local Ethereum network, deployed rollup contracts and Aztec execution environment.
- [Aztec.js](./yarn-project/aztec.js/): A tool for interacting with the Aztec network. It communicates via the [Private Execution Environment (PXE)](./yarn-project/pxe/).
- [Aztec Boxes](./yarn-project/boxes/): A minimal framework for building full stack applications for Aztec (using React).
- [Example contracts](./yarn-project/noir-contracts/): Example contracts for the Aztec network, written in Noir.
- [End to end tests](./yarn-project/end-to-end/): Integration tests written in Typescript--a good reference for how to use the packages for specific tasks.
- [Aztec Boxes](./boxes/): Example starter projects.

## Issues Board

Expand Down
2 changes: 0 additions & 2 deletions aztec-up/bin/.aztec-run
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ for env in ${ENV_VARS_TO_INJECT:-}; do
fi
done

# Volumes to pass to the container.

docker run \
-ti \
--rm \
Expand Down
Loading

0 comments on commit d8aab78

Please sign in to comment.