-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
145 additions
and
15 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
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
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