Skip to content

Commit

Permalink
Merge branch 'master' into sync-noir
Browse files Browse the repository at this point in the history
* master: (102 commits)
  chore(ci): make syncing out to Noir manual (#5997)
  docs: update emit_event.md (#5964)
  chore: yarn build:dev don't clear terminal (#5970)
  fix: deploy L1 contracts before starting node (#5969)
  refactor: using poseidon2 when computing a nullifier (#5906)
  chore(ci): reenable spot
  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: Keshas skipping plus conditions for grand prod relations (#5766)
  feat!: delete field note (#5959)
  feat: Sync from noir (#5955)
  chore: Run flakey e2e tests on CI but allow failure (#5937)
  feat(avm): avm circuit FDIV opcode (#5958)
  feat!: remove slow updates tree (#5954)
  fix(avm): comments and assert (#5956)
  refactor: renaming `noir-compiler` as `builder` (#5951)
  feat(avm): negative tests (#5919)
  feat(avm): shift relations (#5716)
  ...
  • Loading branch information
TomAFrench committed Apr 24, 2024
2 parents 34f7e0b + 1801db8 commit a68788d
Show file tree
Hide file tree
Showing 657 changed files with 13,153 additions and 16,137 deletions.
102 changes: 0 additions & 102 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,18 +407,6 @@ jobs:
command: create_ecr_manifest yarn-project x86_64,arm64
aztec_manifest_key: yarn-project

yarn-project-test:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_build yarn-project-test 64
aztec_manifest_key: yarn-project-test

prover-client-test:
docker:
- image: aztecprotocol/alpine-build-image
Expand All @@ -443,42 +431,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
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: build mainnet-fork | add_timestamps
aztec_manifest_key: mainnet-fork

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

boxes:
docker:
- image: aztecprotocol/alpine-build-image
Expand Down Expand Up @@ -621,15 +573,6 @@ jobs:
should_release || exit 0
deploy_dockerhub noir
deploy_dockerhub aztec
deploy_dockerhub cli
deploy_dockerhub aztec-faucet
deploy_dockerhub mainnet-fork
- run:
name: "Deploy mainnet fork"
command: |
should_deploy || exit 0
deploy_terraform_services iac/mainnet-fork mainnet-fork mainnet-fork aws_efs_file_system.aztec_mainnet_fork_data_store
./iac/mainnet-fork/scripts/wait_for_fork
- run:
name: "Release canary to NPM: bb.js"
command: |
Expand Down Expand Up @@ -660,43 +603,6 @@ jobs:
command: |
should_release || exit 0
deploy_npm l1-contracts latest
- run:
name: "Deploy L1 contracts to mainnet fork"
working_directory: l1-contracts
command: |
should_deploy || exit 0
./scripts/ci_deploy_contracts.sh
- run:
name: "Deploy P2P bootstrap servers to AWS"
command: |
should_deploy 0 || exit 0
# Export variables for Terraform.
export TF_VAR_BOOTNODE_1_PRIVATE_KEY=$BOOTNODE_1_PRIVATE_KEY
export TF_VAR_BOOTNODE_2_PRIVATE_KEY=$BOOTNODE_2_PRIVATE_KEY
deploy_terraform_services yarn-project/p2p-bootstrap aztec
- run:
name: "Deploy Aztec Nodes to AWS"
command: |
should_deploy 0 || exit 0
export TF_VAR_BOOTNODE_1_PEER_ID=$BOOTNODE_1_PEER_ID
export TF_VAR_BOOTNODE_2_PEER_ID=$BOOTNODE_2_PEER_ID
export TF_VAR_SEQ_1_PUBLISHER_PRIVATE_KEY=$SEQ_1_PUBLISHER_PRIVATE_KEY
export TF_VAR_SEQ_2_PUBLISHER_PRIVATE_KEY=$SEQ_2_PUBLISHER_PRIVATE_KEY
export TF_VAR_NODE_1_PRIVATE_KEY=$NODE_1_PRIVATE_KEY
export TF_VAR_NODE_2_PRIVATE_KEY=$NODE_2_PRIVATE_KEY
# Check if l1-contracts have changed
if [ "$CONTRACTS_DEPLOYED" -eq 1 ]; then
echo "Contracts have changed, taint nodes to force redeploy.."
deploy_terraform_services yarn-project/aztec-node aztec aztec-node "aws_ecs_task_definition.aztec-node[0],aws_ecs_task_definition.aztec-node[1]" 1
else
deploy_terraform_services yarn-project/aztec-node aztec
fi
- run:
name: "Deploy Aztec Faucet to AWS"
command: |
should_deploy 0 || exit 0
export TF_VAR_FAUCET_PRIVATE_KEY=$FAUCET_PRIVATE_KEY
deploy_terraform_services yarn-project/aztec-faucet aztec
# Repeatable config for defining the workflow below.
defaults: &defaults
Expand Down Expand Up @@ -820,8 +726,6 @@ workflows:

- l1-contracts: *defaults

- mainnet-fork: *defaults

- noir-projects:
requires:
- avm-transpiler
Expand All @@ -837,10 +741,8 @@ workflows:
- noir-projects
<<: *defaults
- end-to-end: *defaults_yarn_project
- aztec-faucet: *defaults_yarn_project_pre_join
- build-docs: *defaults_yarn_project_pre_join
- prover-client-test: *defaults_yarn_project
- yarn-project-test: *defaults_yarn_project
- yarn-project-x86_64: *defaults_yarn_project_pre_join
- yarn-project-arm64: *defaults_yarn_project_pre_join
- yarn-project-ecr-manifest:
Expand All @@ -851,7 +753,6 @@ workflows:

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

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

# Everything that must complete before deployment.
Expand All @@ -888,11 +788,9 @@ workflows:
- barretenberg-acir-tests-bb-sol
- barretenberg-docs
- build-docs
- mainnet-fork
- boxes-vanilla
- boxes-react
- noir-packages-tests
- yarn-project-test
- prover-client-test
- e2e-join
<<: *defaults
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions .devcontainer/react/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "React App",
"image": "node:lts-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"onCreateCommand": "cp -R /root/workspace /root/scripts && rm -rf /root/workspace/* && sh /root/scripts/onCreateCommand.sh app react",
"postAttachCommand": "sh /root/scripts/postAttachCommand.sh app react",
"customizations": {
"vscode": {
"settings": {},
"extensions": ["noir-lang.vscode-noir"]
}
},
"hostRequirements": {
"cpus": 8,
"memory": "8gb",
"storage": "32gb"
},
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/scripts,target=/root/workspace,type=bind",
"workspaceFolder": "/root/workspace",
"forwardPorts": [8080]
}
21 changes: 21 additions & 0 deletions .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

TYPE=$1
NAME=$2


curl -s install.aztec.network | NON_INTERACTIVE=1 BIN_PATH=/usr/local/bin bash -s
docker compose -f $HOME/.aztec/docker-compose.yml pull

if ! grep -q "PXE_URL" ~/.bashrc; then
echo "export PXE_URL=https://\$CODESPACE_NAME-8080.preview.\$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" >> ~/.bashrc
fi

yes | npx create-aztec-app -t $TYPE -n $NAME -s
mv react/* react/.* .
rm -rf react

yarn

npx -y playwright install --with-deps
yarn prep
65 changes: 65 additions & 0 deletions .devcontainer/scripts/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
TYPE=$1
NAME=$2

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

(nohup /usr/local/bin/aztec sandbox &)

r=$(tput sgr0) # Reset color
bold=$(tput bold) # Bold text
g=$(tput setaf 46) # Light Green
b=$(tput setaf 21) # Bright Blue
p=$(tput setaf 13) # Magenta
y=$(tput setaf 226) # Bright Yellow
c=$(tput setaf 51) # Cyan
o=$(tput setaf 208) # Orange

# Function to print colored text
print_colored() {
case $2 in
green)
color=$g
;;
blue)
color=$b
;;
magenta)
color=$p
;;
yellow)
color=$y
;;
cyan)
color=$c
;;
orange)
color=$o
;;
*)
color=$r
;;
esac
echo "${color}$1${r}"
}

echo
echo "${bold}${c} █████╗ ███████╗████████╗███████╗ ██████╗${r}"
echo "${bold}${o}██╔══██╗╚══███╔╝╚══██╔══╝██╔════╝██╔════╝${r}"
echo "${bold}${g}███████║ ███╔╝ ██║ █████╗ ██║${r}"
echo "${bold}${b}██╔══██║ ███╔╝ ██║ ██╔══╝ ██║${r}"
echo "${bold}${p}██║ ██║███████╗ ██║ ███████╗╚██████╗${r}"
echo "${bold}${y}╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝ ╚═════╝${r}"
echo
print_colored "${bold}Sandbox Codespace" "cyan"
print_colored "${bold}Your codespace is ready with your chosen box! 🎉" "cyan"
echo
print_colored "All the packages are already installed, and you can now run yarn dev or any other package.json script." "magenta"
print_colored "You can also use this codespace for its running sandbox, by connecting your local environment to it." "magenta"
echo
print_colored "To do so, set the PXE_URL to this codespace's sandbox URL:" "magenta"
print_colored "${PXE_URL}" "green"
print_colored "ex. PXE_URL=\"${PXE_URL}\" yarn dev"
echo
print_colored "${bold}Enjoy your sandbox! 🏖️" "orange"
30 changes: 30 additions & 0 deletions .devcontainer/token/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Token Contract Only",
"image": "node:lts-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"onCreateCommand": ".devcontainer/scripts/onCreateCommand.sh contract token_contract",
"postAttachCommand": ".devcontainer/scripts/postAttachCommand.sh contract token_contract",
"customizations": {
"vscode": {
"settings": {},
"extensions": ["noir-lang.vscode-noir"]
}
},
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/token_contract,target=/root/workspace,type=bind",
"workspaceFolder": "/root/workspace",
"hostRequirements": {
"cpus": 8,
"memory": "8gb",
"storage": "32gb"
},
"mounts": [
{
"source": "${localWorkspaceFolder}/.devcontainer/scripts",
"target": "/root/workspace/.devcontainer/scripts",
"type": "bind"
}
],
"forwardPorts": [8080]
}
30 changes: 30 additions & 0 deletions .devcontainer/vanilla/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Vanilla Typescript App",
"image": "node:lts-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"onCreateCommand": ".devcontainer/scripts/onCreateCommand.sh app vanilla",
"postAttachCommand": ".devcontainer/scripts/postAttachCommand.sh app vanilla",
"customizations": {
"vscode": {
"settings": {},
"extensions": ["noir-lang.vscode-noir"]
}
},
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/vanilla,target=/root/workspace,type=bind",
"workspaceFolder": "/root/workspace",
"hostRequirements": {
"cpus": 8,
"memory": "8gb",
"storage": "32gb"
},
"mounts": [
{
"source": "${localWorkspaceFolder}/.devcontainer/scripts",
"target": "/root/workspace/.devcontainer/scripts",
"type": "bind"
}
],
"forwardPorts": [8080]
}
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
16 changes: 15 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 All @@ -58,3 +57,18 @@ jobs:
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 15
run: earthly -P --no-output +uniswap-trade-on-l1-from-l2 --e2e_mode=cache

notify:
needs: [e2e]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && failure() }}
steps:
- name: Send notification to aztec3-ci channel if workflow failed on master
uses: slackapi/slack-github-action@v1.25.0
with:
payload: |
{
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }}
Loading

0 comments on commit a68788d

Please sign in to comment.