-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lx/move-add-gate-out-of-aux
- Loading branch information
Showing
618 changed files
with
23,585 additions
and
3,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Aztec Network EKS Deployment | ||
|
||
# Manual trigerring of this workflow is intentionally disabled | ||
# Helm deployments do not support lock files | ||
# Without a lockfile, manual trigerring can lead to corrupted or partial deployments | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
- production | ||
pull_request: | ||
branches: | ||
- staging | ||
- production | ||
|
||
jobs: | ||
network_deployment: | ||
# This job will run on Ubuntu | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: deploy-${{ github.ref }} # Only one job per branch | ||
cancel-in-progress: false # Allow previous deployment to complete to avoid corruption | ||
|
||
# Set up a variable based on the branch name | ||
env: | ||
NAMESPACE: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }} | ||
CHART_PATH: ./spartan/aztec-network | ||
|
||
steps: | ||
# Step 1: Check out the repository's code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Configure AWS credentials using GitHub Secrets | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
|
||
# Step 3: Set up Kubernetes context for AWS EKS | ||
- name: Configure kubectl with EKS cluster | ||
run: | | ||
aws eks update-kubeconfig --region us-east-2 --name spartan_cluster | ||
# Step 4: Install Helm | ||
- name: Install Helm | ||
run: | | ||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | ||
# Step 5: Apply Helm Chart | ||
- name: Deploy Helm chart | ||
run: | | ||
helm dependency update ${{ env.CHART_PATH }} | ||
helm upgrade --install ${{ env.NAMESPACE }} ${{ env.CHART_PATH }} --namespace ${{ env.NAMESPACE }} --atomic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Redo Typo PR | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pr_number: | ||
description: 'The PR number to redo' | ||
required: true | ||
type: string | ||
|
||
pull_request_target: | ||
types: [labeled] | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**/README.md' | ||
|
||
jobs: | ||
redo-typo-pr: | ||
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'redo-typo-pr') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} | ||
|
||
- name: Authenticate with GitHub CLI | ||
run: | | ||
echo "${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}" | gh auth login --with-token | ||
- name: Set git configure for commits | ||
run: | | ||
# Identify ourselves, needed to commit | ||
git config --global user.name AztecBot | ||
git config --global user.email tech@aztecprotocol.com | ||
- name: Determine PR number | ||
id: determine-pr-number | ||
run: echo "PR_NUMBER=${{ github.event.inputs.pr_number || github.event.pull_request.number }}" >> $GITHUB_ENV | ||
|
||
- name: Run repo-typo-pr script | ||
run: ./scripts/redo-typo-pr ${{ env.PR_NUMBER }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Deploy to Sepolia network | ||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
IMAGE_TAG: latest | ||
DEPLOY_TAG: sepolianet | ||
CONTRACT_S3_BUCKET: s3://static.aztec.network | ||
|
||
# TF Variables | ||
TF_VAR_IMAGE_TAG: latest | ||
TF_VAR_DEPLOY_TAG: sepolianet | ||
TF_VAR_L1_CHAIN_ID: 11155111 | ||
TF_VAR_ETHEREUM_HOST: https://sepolia.infura.io/v3/${{ secrets.SEPOLIA_API_KEY }} | ||
TF_VAR_PROVING_ENABLED: false | ||
TF_VAR_API_KEY: ${{ secrets.SEPOLIANET_API_KEY }} | ||
# Node / Sequencer | ||
TF_VAR_BOOTSTRAP_NODES: "" | ||
TF_VAR_P2P_ENABLED: "false" | ||
TF_VAR_NODE_P2P_PRIVATE_KEYS: '[""]' | ||
TF_VAR_SEQ_MIN_TX_PER_BLOCK: 1 | ||
TF_VAR_SEQ_MAX_TX_PER_BLOCK: 64 | ||
TF_VAR_NODE_LB_RULE_PRIORITY: 7000 | ||
TF_VAR_NODE_P2P_TCP_PORT: 40500 | ||
TF_VAR_NODE_P2P_UDP_PORT: 45500 | ||
# Address 0x652575Ff941e7c2850fB89f2B207efF6B06BC7B4 | ||
TF_VAR_SEQUENCER_PRIVATE_KEYS: '["${{ secrets.SEPOLIA_SEQ_PRIVATE_KEY }}"]' | ||
|
||
# Prover Node | ||
TF_VAR_PROVER_NODE_LB_RULE_PRIORITY: 7100 | ||
# Address 0xE3b8F9F23b8D4BD7d437218Bff3bcED1ce5E70B3 | ||
TF_VAR_PROVER_PRIVATE_KEYS: '["${{ secrets.SEPOLIA_PROVER_PRIVATE_KEY }}"]' | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/setup-runner.yml | ||
with: | ||
username: ${{ github.event.pull_request.user.login || github.actor }} | ||
runner_type: builder-x86 | ||
secrets: inherit | ||
|
||
deploy: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ github.sha }}" | ||
|
||
- uses: ./.github/ci-setup-action | ||
|
||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: 1.7.5 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-2 | ||
|
||
- name: Deploy L1 Contracts to Sepolia | ||
run: | | ||
set -e | ||
docker pull aztecprotocol/aztec:${{ env.IMAGE_TAG }} | ||
docker run aztecprotocol/aztec:${{ env.IMAGE_TAG }} deploy-l1-contracts \ | ||
--private-key ${{ secrets.SEPOLIA_SEQ_PRIVATE_KEY }} \ | ||
--rpc-url ${{ env.TF_VAR_ETHEREUM_HOST }} \ | ||
--l1-chain-id ${{ env.TF_VAR_L1_CHAIN_ID }} \ | ||
--salt ${{ github.run_id }} \ | ||
--json | tee ./l1_contracts.json | ||
# upload contract addresses to S3 | ||
aws s3 cp ./l1_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/${{ env.DEPLOY_TAG }}/l1_contracts.json | ||
# export contract addresses so they can be used by subsequent terraform deployments | ||
function extract() { | ||
jq -r ".$1" ./l1_contracts.json | ||
} | ||
echo "TF_VAR_ROLLUP_CONTRACT_ADDRESS=$(extract rollupAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_REGISTRY_CONTRACT_ADDRESS=$(extract registryAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_INBOX_CONTRACT_ADDRESS=$(extract inboxAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_OUTBOX_CONTRACT_ADDRESS=$(extract outboxAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$(extract availabilityOracleAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_FEE_JUICE_CONTRACT_ADDRESS=$(extract feeJuiceAddress)" >>$GITHUB_ENV | ||
echo "TF_VAR_FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$(extract feeJuicePortalAddress)" >>$GITHUB_ENV | ||
- name: Apply l1-contracts Terraform | ||
working-directory: ./l1-contracts/terraform | ||
run: | | ||
env | ||
terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/l1-contracts" | ||
terraform apply -input=false -auto-approve | ||
- name: Deploy Aztec Node | ||
working-directory: ./yarn-project/aztec/terraform/node | ||
run: | | ||
terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/aztec-node" | ||
terraform apply -input=false -auto-approve | ||
- name: Deploy Aztec Prover Node | ||
working-directory: ./yarn-project/aztec/terraform/prover-node | ||
run: | | ||
terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/aztec-prover-node" | ||
terraform apply -input=false -auto-approve | ||
- name: Deploy PXE | ||
working-directory: ./yarn-project/aztec/terraform/pxe | ||
run: | | ||
terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/pxe" | ||
terraform apply -input=false -auto-approve -replace="aws_efs_file_system.pxe_data_store" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ build/ | |
.idea | ||
cmake-build-debug | ||
.terraform* | ||
terraform.tfstate* | ||
.bootstrapped | ||
.tsbuildinfo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
21425dedcc31287431a4a25589d52d5397e974bc | ||
fc74c55ffed892962413c6fe15af62e1d2e7b785 |
Oops, something went wrong.