Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,11 @@ jobs:
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
- run:
name: "Release canary to NPM: bb.js"
command: |
Expand Down Expand Up @@ -1212,11 +1217,6 @@ jobs:
command: |
should_release || exit 0
deploy_npm l1-contracts latest
- 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
- run:
name: "Deploy L1 contracts to mainnet fork"
working_directory: l1-contracts
Expand Down
7 changes: 6 additions & 1 deletion iac/mainnet-fork/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@ resource "aws_efs_file_system" "aztec_mainnet_fork_data_store" {
creation_token = "${var.DEPLOY_TAG}-mainnet-fork-data"

tags = {
Name = "${var.DEPLOY_TAG}-mainnet-fork-data"
Name = "${var.DEPLOY_TAG}-mainnet-fork-data"
TaskDefinitionArn = "${aws_ecs_task_definition.aztec_mainnet_fork.arn}" # This line forces recreation on task definition change
}

lifecycle_policy {
transition_to_ia = "AFTER_30_DAYS"
}

lifecycle {
create_before_destroy = true
}
}

resource "aws_efs_mount_target" "aztec_fork_private_az1" {
Expand Down
12 changes: 9 additions & 3 deletions l1-contracts/scripts/ci_deploy_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ retry docker pull $CLI_IMAGE

# remove 0x prefix from private key
PRIVATE_KEY=${CONTRACT_PUBLISHER_PRIVATE_KEY#0x}
docker run \
$CLI_IMAGE \
deploy-l1-contracts -u $ETHEREUM_HOST -p $PRIVATE_KEY | tee ./serve/contract_addresses.json

# Retries up to 3 times with 10 second intervals
ATTEMPTS=3
for i in $(seq 1 $ATTEMPTS); do
docker run \
$CLI_IMAGE \
deploy-l1-contracts -u $ETHEREUM_HOST -p $PRIVATE_KEY | tee $FILE_PATH && break
[ "$i" != "$ATTEMPTS" ] && sleep 10
done

## Result format is:
# Rollup Address: 0xe33d37702bb94e83ca09e7dc804c9f4c4ab8ee4a
Expand Down