Skip to content

Commit

Permalink
Merge branch 'master' into gd/noir_issue_4330
Browse files Browse the repository at this point in the history
* master: (37 commits)
  refactor: nuking `KeyStore` and `KeyPair` interfaces (#6553)
  feat: Sync from noir (#6555)
  refactor: purge secret and open keywords (#6501)
  feat: run benchmarks for ACIR proving (#6155)
  feat: generic key validation request (#6474)
  chore: fix migration notes (#6551)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  feat: Adding autogenerated variants for the reset circuit (#6508)
  chore: Copy subset of constants to cpp (#6544)
  feat(docs): Key rotation / owner -> nullifier key docs (#6538)
  chore(docs): restructure improvs (#6502)
  chore: anvil kill wrapper now supports mac (#6520)
  feat: sum transaction fees and pay on l1 (#6522)
  refactor: private call validation (#6510)
  chore: add c++ tests for generator derivation (#6528)
  feat: View functions with static context enforcing (#6338)
  feat: Update the encrypted note log format (#6411)
  ...
  • Loading branch information
TomAFrench committed May 21, 2024
2 parents e3be58c + 23e0518 commit 518994d
Show file tree
Hide file tree
Showing 599 changed files with 9,308 additions and 5,474 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ workflows:
# # Used to generate a dynamic 'system' workflow
# # This is rewritten to 'system' on the real workflow (otherwise this is ignored by circleci)
# equal: [NEVER, << pipeline.parameters.workflow >>]
when:
and:
- equal: [ master, << pipeline.git.branch >> ]
jobs:
# Noir
- noir-x86_64: *defaults
Expand Down
57 changes: 35 additions & 22 deletions .github/workflows/ci-arm.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,62 @@
name: CI (ARM)
on:
push:
branches: [master]
branches:
- master
- '*/*arm-build'
workflow_dispatch:
inputs: {}
concurrency:
# force parallelism in master, cancelling in branches (only relevant to workflow_dispatch)
group: ci-${{ github.ref_name == 'master' && github.run_id || github.ref_name }}
cancel-in-progress: true
env:
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_PASSWORD }}"
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
USERNAME: master
GITHUB_TOKEN: ${{ github.token }}
GH_SELF_HOSTED_RUNNER_TOKEN: ${{ secrets.GH_SELF_HOSTED_RUNNER_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
GIT_COMMIT: ${{ github.sha }}
# kludge until we move away from runners
WAIT_FOR_RUNNERS: false
jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
username: master
runner_type: builder-arm
secrets: inherit

build:
needs: setup
runs-on: master-arm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { ref: "${{ github.event.pull_request.head.sha }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: build-master-arm
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
run: earthly-ci ./yarn-project+export-e2e-test-images
uses: ./.github/ensure-builder
with:
runner_type: builder-arm
run: |
set -eux
git submodule update --init --recursive --recommend-shallow
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin
scripts/earthly-ci ./yarn-project+export-e2e-test-images
# all the end-to-end integration tests for aztec
e2e:
needs: build
runs-on: master-arm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { ref: "${{ github.event.pull_request.head.sha }}" }
- uses: ./.github/ci-setup-action
- name: "Test"
timeout-minutes: 25
uses: ./.github/ensure-builder
with:
concurrency_key: e2e-master-arm-e2e-tests
- name: Test
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 15
run: earthly-ci -P --no-output +uniswap-trade-on-l1-from-l2
runner_type: builder-arm
run: |
sudo shutdown -P 25 # hack until core part of the scripts
set -eux
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin
scripts/earthly-ci -P --no-output ./yarn-project/end-to-end/+uniswap-trade-on-l1-from-l2
notify:
needs: [e2e]
Expand Down
70 changes: 51 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,39 @@ jobs:
--no-output \
+${{ matrix.test }}
acir-bench:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
- name: Setup and Test
uses: ./.github/ensure-tester-with-images
timeout-minutes: 40
with:
runner_type: 16core-tester-x86
builder_type: builder-x86
# these are copied to the tester and expected by the earthly command below
# if they fail to copy, it will try to build them on the tester and fail
builder_images_to_copy: aztecprotocol/barretenberg-acir-benches:${{ env.GIT_COMMIT }}
# command to produce the images in case they don't exist
builder_command: cd noir && ../scripts/earthly-ci +export-bench-acir-bb
run: |
set -eux
cd ./noir/
export FORCE_COLOR=1
export EARTHLY_BUILD_ARGS="${{ env.EARTHLY_BUILD_ARGS }}"
../scripts/earthly-ci -P \
--secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
--secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
--no-output \
+bench-publish-acir-bb
bench-summary:
needs: bench-e2e
needs:
- acir-bench
- bench-e2e
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- uses: actions/checkout@v4
Expand All @@ -181,24 +212,6 @@ jobs:
working-directory: ./yarn-project/scripts
run: earthly-ci -P --secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} --secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} --secret AZTEC_BOT_COMMENTER_GITHUB_TOKEN=${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} +bench-comment

noir-format:
needs: setup
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: noir-format-x86
- name: "Format Noir"
working-directory: ./noir/
timeout-minutes: 40
run: earthly-ci --no-output ./+format
- name: "Format noir-projects"
working-directory: ./noir-projects/
timeout-minutes: 40
run: earthly-ci --no-output ./+format

# barretenberg (prover) native and AVM (public VM) tests
# only ran on x86 for resource reasons (memory intensive)
bb-native-tests:
Expand Down Expand Up @@ -232,6 +245,24 @@ jobs:
timeout-minutes: 40
run: earthly-ci --no-output ./+test

noir-format:
needs: setup
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: noir-format-x86
- name: "Format Noir"
working-directory: ./noir/
timeout-minutes: 40
run: earthly-ci --no-output ./+format
- name: "Format noir-projects"
working-directory: ./noir-projects/
timeout-minutes: 40
run: earthly-ci --no-output ./+format

noir-test:
needs: setup
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
Expand Down Expand Up @@ -468,6 +499,7 @@ jobs:
- setup
- e2e
- bb-native-tests
- acir-bench
- bb-bench
- yarn-project-formatting
- yarn-project-test
Expand Down
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b541e793e20fa3c991e0328ec2ff7926bdcdfd45
fb039f74df23aea39bc0593a5d538d82b4efadf0
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@
"**/l1-contracts/lib/**": true,
"**/barretenberg/cpp/build*/**": true
},
"cmake.sourceDirectory": "/mnt/user-data/adam/aztec-packages/barretenberg/acir_tests/headless-test/node_modules/bare-fs"
"cmake.sourceDirectory": "${workspaceFolder}/barretenberg/cpp"
}
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ base-log-uploader:
unzip awscliv2.zip && \
./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update && \
rm -rf aws awscliv2.zip
COPY +scripts/scripts /usr/src/scripts
COPY +scripts/scripts /usr/src/scripts
4 changes: 2 additions & 2 deletions 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 = af5ae45393b9dba4c77626c5f9591d53897ae6f2
parent = 1fa59637a0829208d382d1dded36df33f4d61582
commit = 8f6e476fcebf06b18771d1802035e8b1dcbd102f
parent = 8e8d2ddd5eefed4f5ca7248b882dfc3d8287d1bb
method = merge
cmdver = 0.4.6
12 changes: 10 additions & 2 deletions barretenberg/acir_tests/bench_acir_tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env bash

cd "$(dirname "$0")"

TEST_NAMES=("$@")
THREADS=(1 4 16 32 64)
BENCHMARKS=$(mktemp)
BENCHMARKS=$LOG_FILE

if [[ -z "${LOG_FILE}" ]]; then
BENCHMARKS=$(mktemp)
fi

if [ "${#TEST_NAMES[@]}" -eq 0 ]; then
TEST_NAMES=(sha256 ecdsa_secp256k1 ecdsa_secp256r1 schnorr double_verify_proof)
Expand Down Expand Up @@ -64,4 +70,6 @@ function genthreadheaders(t, len, res) {
}
'

rm $BENCHMARKS
if [[ -z "${LOG_FILE}" ]]; then
rm $BENCHMARKS
fi
7 changes: 7 additions & 0 deletions barretenberg/acir_tests/reset_acir_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd ~/aztec-packages/noir/noir-repo
cargo clean
noirup -p .
cd test_programs && ./rebuild.sh

cd ~/aztec-packages/barretenberg/acir_tests
rm -rf acir_tests
22 changes: 11 additions & 11 deletions barretenberg/cpp/pil/avm/constants.pil
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ namespace constants(256);
pol PORTAL_SELECTOR = 2;

// NOTE: constant expression evaluation does not seem to be supported yet in pil
// pol START_GLOBAL_VARIABLES = CALL_CONTEXT_LENGTH + HEADER_LENGTH = 6 + 22 = 28
// pol START_GLOBAL_VARIABLES = CALL_CONTEXT_LENGTH + HEADER_LENGTH = 6 + 23 = 29

// Global Variables
pol CHAIN_ID_SELECTOR = 28;
pol VERSION_SELECTOR = 29;
pol BLOCK_NUMBER_SELECTOR = 30;
pol TIMESTAMP_SELECTOR = 31;
pol COINBASE_SELECTOR = 32;
pol CHAIN_ID_SELECTOR = 29;
pol VERSION_SELECTOR = 30;
pol BLOCK_NUMBER_SELECTOR = 31;
pol TIMESTAMP_SELECTOR = 32;
pol COINBASE_SELECTOR = 33;

pol END_GLOBAL_VARIABLES = 28 + 8; // We only use the first 5 of 8 global variables for now
pol END_GLOBAL_VARIABLES = 29 + 8; // We only use the first 5 of 8 global variables for now

pol START_SIDE_EFFECT_COUNTER = 36;
pol START_SIDE_EFFECT_COUNTER = 37;

// Gas
pol FEE_PER_DA_GAS_SELECTOR = 37;
pol FEE_PER_L2_GAS_SELECTOR = 38;
pol FEE_PER_DA_GAS_SELECTOR = 38;
pol FEE_PER_L2_GAS_SELECTOR = 39;

pol TRANSACTION_FEE_SELECTOR = 39;
pol TRANSACTION_FEE_SELECTOR = 40;

Loading

0 comments on commit 518994d

Please sign in to comment.