Skip to content

Commit

Permalink
Merge branch 'master' into docs/jc/fix-specs-error
Browse files Browse the repository at this point in the history
  • Loading branch information
critesjosh authored Apr 22, 2024
2 parents 19374f2 + 2e55713 commit 8aa4c1f
Show file tree
Hide file tree
Showing 120 changed files with 531 additions and 4,852 deletions.
19 changes: 2 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,18 +443,6 @@ jobs:
command: build aztec
aztec_manifest_key: aztec

cli:
machine:
image: default
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build cli
aztec_manifest_key: cli

mainnet-fork:
machine:
image: default
Expand Down Expand Up @@ -621,7 +609,6 @@ jobs:
should_release || exit 0
deploy_dockerhub noir
deploy_dockerhub aztec
deploy_dockerhub cli
deploy_dockerhub aztec-faucet
deploy_dockerhub mainnet-fork
- run:
Expand Down Expand Up @@ -851,7 +838,6 @@ workflows:

# Artifacts
- aztec-package: *defaults_yarn_project
- cli: *defaults_yarn_project

# Boxes.
- boxes:
Expand All @@ -872,7 +858,6 @@ workflows:
requires:
- end-to-end
- aztec-package
- cli
<<: *defaults

# Everything that must complete before deployment.
Expand Down Expand Up @@ -900,12 +885,12 @@ workflows:
# Benchmark jobs.
- bench-publish-rollup: *e2e_test
- bench-process-history: *e2e_test
# - bench-tx-size: *e2e_test
- bench-tx-size: *e2e_test
- bench-summary:
requires:
- bench-publish-rollup
- bench-process-history
# - bench-tx-size
- bench-tx-size
<<: *defaults

# Production releases.
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
TYPE=$1
NAME=$2

apt install gh

curl -s install.aztec.network | NON_INTERACTIVE=1 BIN_PATH=/usr/local/bin bash -s
docker compose -f $HOME/.aztec/docker-compose.yml pull
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/scripts/postAttachCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
TYPE=$1
NAME=$2

apt install gh
gh codespace ports visibility 8080:public -c $CODESPACE_NAME

(nohup /usr/local/bin/aztec sandbox &)
Expand Down
3 changes: 0 additions & 3 deletions .github/ci-setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ inputs:
concurrency_key:
required: false
description: 'Concurrency key for locking jobs'
concurrency_token:
required: false
description: 'TODO unused'
runs:
# define an action, runs in OS of caller
using: composite
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_token: "${{ secrets.AZTEC_GITHUB_TOKEN }}"
# must be globally unique for build x runner
concurrency_key: build-master-arm
# prepare images locally, tagged by commit hash
Expand Down
62 changes: 25 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
pull_request: {}
workflow_dispatch:
inputs:
username:
description: 'Defaults to GitHub Actor'
required: false
runner_action:
description: "The action to take with the self-hosted runner (start, stop, restart)."
required: false
just_start_spot:
description: "Should we just run spots?"
type: boolean
required: false
concurrency:
# force parallelism in master
group: ci-${{ github.ref_name == 'master' && github.run_id || github.ref_name }}
Expand All @@ -20,31 +19,30 @@ jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
runner_label: ${{ github.actor }}-x86
runner_label: ${{ inputs.username || github.actor }}-x86
ebs_cache_size_gb: 256
runner_concurrency: 20
subaction: ${{ github.event.inputs.runner_action || 'start' }}
subaction: ${{ inputs.runner_action || 'start' }}
ec2_instance_type: m6a.32xlarge
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 40 # refreshed by jobs
secrets: inherit

build:
needs: setup
runs-on: ${{ github.actor }}-x86
if: ${{ github.event.inputs.just_start_spot != 'true' }}
runs-on: ${{ inputs.username || github.actor }}-x86
outputs:
e2e_list: ${{ steps.e2e_list.outputs.list }}
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: build-${{ github.actor }}-x86
concurrency_key: build-${{ inputs.username || github.actor }}-x86
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
run: earthly-ci ./yarn-project+export-end-to-end
run: earthly ./yarn-project+export-end-to-end
# We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end
# (Note ARM uses just 2 tests as a smoketest)
- name: Create list of end-to-end jobs
Expand All @@ -54,7 +52,7 @@ jobs:
# all the end-to-end integration tests for aztec
e2e:
needs: build
runs-on: ${{ github.actor }}-x86
runs-on: ${{ inputs.username || github.actor }}-x86
strategy:
fail-fast: false
matrix:
Expand All @@ -65,11 +63,11 @@ jobs:
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
# must be globally unique for build x runner
concurrency_key: e2e-${{ github.actor }}-x86-${{ matrix.test }}
concurrency_key: e2e-${{ inputs.username || github.actor }}-x86-${{ matrix.test }}
- name: Test
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 25
run: earthly-ci -P --no-output +${{ matrix.test }} --e2e_mode=cache
run: earthly -P --no-output +${{ matrix.test }} --e2e_mode=cache
# TODO
# - name: Upload logs
# run: BRANCH=${{ github.ref_name }} PULL_REQUEST=${{ github.event.number }} scripts/ci/upload_logs_to_s3 ./yarn-project/end-to-end/log
Expand All @@ -78,7 +76,7 @@ jobs:
# only ran on x86 for resource reasons (memory intensive)
bb-native-tests:
needs: setup
runs-on: ${{ github.actor }}-x86
runs-on: ${{ inputs.username || github.actor }}-x86
strategy:
fail-fast: false
steps:
Expand All @@ -88,76 +86,66 @@ jobs:
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
# must be globally unique for build x runner
concurrency_key: bb-native-tests-${{ github.actor }}-x86
concurrency_key: bb-native-tests-${{ inputs.username || github.actor }}-x86
- name: "Native Prover Tests"
working-directory: ./barretenberg/cpp/
timeout-minutes: 25
# limit our parallelism to half our cores
run: earthly-ci --no-output +test --hardware_concurrency=64
run: earthly --no-output +test --hardware_concurrency=64

# push benchmarking binaries to dockerhub registry
bb-bench-binaries:
needs: setup
runs-on: ${{ github.actor }}-x86
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: bb-bench-binaries-${{ github.actor }}-x86
concurrency_key: bb-bench-binaries-${{ inputs.username || github.actor }}-x86
- name: Build and Push Binaries
if: ${{ github.event.inputs.just_start_spot != 'true' }}
timeout-minutes: 15
working-directory: ./barretenberg/cpp/
run: earthly-ci --push +bench-binaries
run: earthly --push +bench-binaries

setup-bench:
uses: ./.github/workflows/setup-runner.yml
needs: bb-bench-binaries
with:
runner_label: ${{ github.actor }}-bench-x86
runner_label: ${{ inputs.username || github.actor }}-bench-x86
ebs_cache_size_gb: 64
runner_concurrency: 1
subaction: ${{ github.event.inputs.runner_action || 'start' }}
subaction: ${{ inputs.runner_action || 'start' }}
ec2_instance_type: m6a.4xlarge
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 15 # refreshed by jobs
secrets: inherit

bb-bench:
runs-on: ${{ github.actor }}-bench-x86
runs-on: ${{ inputs.username || github.actor }}-bench-x86
needs: setup-bench
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: bb-bench-${{ github.actor }}-bench-x86
concurrency_key: bb-bench-${{ inputs.username || github.actor }}-bench-x86
# Use bench_mode=cache to read the pushed build above
- name: Client IVC Bench
working-directory: ./barretenberg/cpp/
timeout-minutes: 15
run: earthly-ci --no-output +bench-client-ivc --bench_mode=cache
run: earthly --no-output +bench-client-ivc --bench_mode=cache

- name: Ultrahonk Bench
working-directory: ./barretenberg/cpp/
timeout-minutes: 15
run: earthly-ci --no-output +bench-ultra-honk --bench_mode=cache
run: earthly --no-output +bench-ultra-honk --bench_mode=cache

merge-check:
runs-on: ${{ github.actor }}-x86
runs-on: ${{ inputs.username || github.actor }}-x86
needs: [e2e, bb-native-tests, bb-bench]
if: always() # Ensures this job runs regardless of the success or failure of dependencies.
steps:
- run: |
echo "E2E Test Status: ${{ needs.e2e.result }}"
echo "Native Tests Status: ${{ needs.bb-native-tests.result }}"
echo "Bench Tests Status: ${{ needs.bb-bench.result }}"
if [[ "${{ needs.e2e.result }}" != 'success' || "${{ needs.bb-native-tests.result }}" != 'success' || "${{ needs.bb-bench.result }}" != 'success' ]]; then
echo "Pull request merging not allowed due to failures."
exit 1
fi
echo "Pull request merging now allowed."
- run: echo Pull request merging now allowed.

notify:
needs: [e2e, bb-native-tests, bb-bench]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Run Docker Prune
# helps to not overuse space
run: docker system prune -f || true
run: docker system prune -f -a || true

- name: Run Earthly Bootstrap
run: earthly bootstrap
24 changes: 16 additions & 8 deletions .github/workflows/start-spot.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
# Useful if the spot runners are in a bad state
name: Start Personal Spot
name: Start/Stop Personal Spot
on:
workflow_dispatch: {}
workflow_dispatch:
inputs:
username:
description: 'Defaults to GitHub Actor'
required: false
action:
description: 'Can also be stop or restart, defaults to start'
required: false
default: 'start'
jobs:
stop-build-x86:
start-build:
uses: ./.github/workflows/setup-runner.yml
with:
runner_label: ${{ github.actor }}-x86
runner_label: ${{ inputs.username || github.actor }}-x86
ebs_cache_size_gb: 256
runner_concurrency: 20
subaction: start
subaction: ${{ inputs.action }}
ec2_instance_type: m6a.32xlarge
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 40 # refreshed by jobs
secrets: inherit

stop-bench:
start-bench:
uses: ./.github/workflows/setup-runner.yml
with:
runner_label: ${{ github.actor }}-bench-x86
runner_label: ${{ inputs.username || github.actor }}-bench-x86
ebs_cache_size_gb: 64
runner_concurrency: 1
subaction: start
subaction: ${{ inputs.action }}
ec2_instance_type: m6a.4xlarge
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 15 # refreshed by jobs
Expand Down
3 changes: 0 additions & 3 deletions aztec-up/bin/aztec-install
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function title() {
fi
echo -e "This will install the following scripts and update your PATH if necessary:"
echo -e " ${bold}${g}aztec${r} - launches various infrastructure subsystems (node, sequencer, prover, pxe, etc)."
echo -e " ${bold}${g}aztec-cli${r} - a command line tool for interfacing and experimenting with infrastructure."
echo -e " ${bold}${g}aztec-nargo${r} - aztec's build of nargo, the noir compiler toolchain."
echo -e " ${bold}${g}aztec-sandbox${r} - a wrapper around docker-compose that launches services needed for sandbox testing."
echo -e " ${bold}${g}aztec-up${r} - a tool to upgrade the aztec toolchain to the latest, or specific versions."
Expand Down Expand Up @@ -106,7 +105,6 @@ export DOCKER_CLI_HINTS=false
if [ -z "${SKIP_PULL:-}" ]; then
info "Pulling aztec version $VERSION..."
pull_container aztec
pull_container cli
pull_container noir
fi

Expand All @@ -123,7 +121,6 @@ info "Installing scripts in $BIN_PATH..."
rm -f $BIN_PATH/aztec*
install_bin .aztec-run
install_bin aztec
install_bin aztec-cli
install_bin aztec-sandbox
install_bin aztec-up
install_bin aztec-nargo
Expand Down
2 changes: 1 addition & 1 deletion boxes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY --from=noir-projects /usr/src/noir-projects/noir-protocol-circuits/crates/t
WORKDIR /usr/src/boxes
COPY . .
ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo
ENV AZTEC_CLI=/usr/src/yarn-project/cli/aztec-cli-dest
ENV AZTEC_COMPILE=/usr/src/yarn-project/noir-compiler/aztec-compile-dest
RUN yarn
RUN npx -y [email protected] install --with-deps
ENTRYPOINT ["/bin/sh", "-c"]
2 changes: 1 addition & 1 deletion boxes/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build:
WORKDIR /usr/src/boxes
COPY . .
ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo
ENV AZTEC_CLI=/usr/src/yarn-project/cli/aztec-cli-dest
ENV AZTEC_COMPILE=/usr/src/yarn-project/noir-compiler/aztec-compile-dest
RUN yarn && yarn build
RUN npx -y [email protected] install --with-deps
ENTRYPOINT ["/bin/sh", "-c"]
2 changes: 1 addition & 1 deletion boxes/boxes/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "./dist/index.js",
"scripts": {
"compile": "cd src/contracts && ${AZTEC_NARGO:-aztec-nargo} compile",
"codegen": "${AZTEC_CLI:-aztec-cli} codegen src/contracts/target -o artifacts",
"codegen": "${AZTEC_COMPILE:-aztec-compile} codegen src/contracts/target -o artifacts",
"clean": "rm -rf ./dist .tsbuildinfo ./artifacts ./src/contracts/target",
"prep": "yarn clean && yarn compile && yarn codegen",
"dev": "yarn prep && webpack serve --mode development",
Expand Down
2 changes: 1 addition & 1 deletion boxes/boxes/vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"compile": "cd src/contracts && ${AZTEC_NARGO:-aztec-nargo} compile",
"codegen": "${AZTEC_CLI:-aztec-cli} codegen src/contracts/target -o artifacts",
"codegen": "${AZTEC_COMPILE:-aztec-compile} codegen src/contracts/target -o artifacts",
"clean": "rm -rf ./dest .tsbuildinfo ./artifacts ./src/contracts/target",
"prep": "yarn clean && yarn compile && yarn codegen && tsc -b",
"dev": "yarn prep && webpack serve --mode development",
Expand Down
2 changes: 1 addition & 1 deletion boxes/contract-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"compile": "cd src && ${AZTEC_NARGO:-aztec-nargo} compile",
"codegen": "${AZTEC_CLI:-aztec-cli} codegen target -o artifacts",
"codegen": "${AZTEC_COMPILE:-aztec-compile} codegen target -o artifacts",
"clean": "rm -rf ./dest .tsbuildinfo ./artifacts ./target",
"prep": "yarn clean && yarn compile && yarn codegen && tsc -b",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand",
Expand Down
Loading

0 comments on commit 8aa4c1f

Please sign in to comment.