diff --git a/docker-compose.yml b/docker-compose.yml index d795da1139f..a55a1a8493e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ name: aztec-devnet services: pxe: - image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:afe0263560a82f2c84b9d76451ec4585a3ed389251fb90e916faaa85d9eb9a0d} + image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:edc36351a531c2d76c2a96e2a67dc1f4020d5dcb9c7132d7df8e75a8518ed1b3} # need to run bb for proofs and bb is only built for x86 platform: linux/amd64 environment: @@ -28,7 +28,7 @@ services: expose: - 8080:8080 cli: - image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:afe0263560a82f2c84b9d76451ec4585a3ed389251fb90e916faaa85d9eb9a0d} + image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:edc36351a531c2d76c2a96e2a67dc1f4020d5dcb9c7132d7df8e75a8518ed1b3} # run the same image as pxe platform: linux/amd64 environment: diff --git a/yarn-project/aztec/terraform/node/main.tf b/yarn-project/aztec/terraform/node/main.tf index 4b177950eb4..9cdb618b93c 100644 --- a/yarn-project/aztec/terraform/node/main.tf +++ b/yarn-project/aztec/terraform/node/main.tf @@ -56,10 +56,10 @@ data "terraform_remote_state" "l1_contracts" { locals { publisher_private_keys = [var.SEQ_1_PUBLISHER_PRIVATE_KEY, var.SEQ_2_PUBLISHER_PRIVATE_KEY] node_p2p_private_keys = [var.NODE_1_PRIVATE_KEY, var.NODE_2_PRIVATE_KEY] - node_count = length(local.publisher_private_keys) - data_dir = "/usr/src/yarn-project/aztec/data" - agents_per_sequencer = var.AGENTS_PER_SEQUENCER - total_agents = local.node_count * local.agents_per_sequencer + #node_count = length(local.publisher_private_keys) + node_count = 1 + data_dir = "/usr/src/yarn-project/aztec/data" + agents_per_sequencer = var.AGENTS_PER_SEQUENCER } resource "aws_cloudwatch_log_group" "aztec-node-log-group" { @@ -115,18 +115,32 @@ resource "aws_efs_file_system" "node_data_store" { } } -resource "aws_efs_mount_target" "private_az1" { +# resource "aws_efs_mount_target" "private_az1" { +# count = local.node_count +# file_system_id = aws_efs_file_system.node_data_store[count.index].id +# subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az1_private_id +# security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_private_id] +# } + +# resource "aws_efs_mount_target" "private_az2" { +# count = local.node_count +# file_system_id = aws_efs_file_system.node_data_store[count.index].id +# subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az2_private_id +# security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_private_id] +# } + +resource "aws_efs_mount_target" "public_az1" { count = local.node_count file_system_id = aws_efs_file_system.node_data_store[count.index].id - subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az1_private_id - security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_private_id] + subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az1_id + security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_public_id] } -resource "aws_efs_mount_target" "private_az2" { +resource "aws_efs_mount_target" "public_az2" { count = local.node_count file_system_id = aws_efs_file_system.node_data_store[count.index].id - subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az2_private_id - security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_private_id] + subnet_id = data.terraform_remote_state.setup_iac.outputs.subnet_az2_id + security_groups = [data.terraform_remote_state.setup_iac.outputs.security_group_public_id] } # Define task definitions for each node. @@ -151,7 +165,7 @@ resource "aws_ecs_task_definition" "aztec-node" { [ { "name": "${var.DEPLOY_TAG}-aztec-node-${count.index + 1}", - "image": "${var.DOCKERHUB_ACCOUNT}/aztec:${var.DEPLOY_TAG}", + "image": "${var.FULL_IMAGE}", "command": ["start", "--node", "--archiver", "--sequencer", "--prover"], "essential": true, "memoryReservation": 3776, @@ -187,7 +201,7 @@ resource "aws_ecs_task_definition" "aztec-node" { }, { "name": "DEBUG", - "value": "aztec:*,-json-rpc:json_proxy:*,-aztec:avm_simulator:*,discv5:*,libp2p:*" + "value": "aztec:*,-json-rpc:json_proxy:*,-aztec:avm_simulator:*,libp2p:*,discv5:*" }, { "name": "ETHEREUM_HOST", @@ -310,22 +324,6 @@ resource "aws_ecs_task_definition" "aztec-node" { "name": "P2P_PEER_CHECK_INTERVAL_MS", "value": "2000" }, - { - "name": "ACVM_WORKING_DIRECTORY", - "value": "/usr/src/acvm" - }, - { - "name": "BB_WORKING_DIRECTORY", - "value": "/usr/src/bb" - }, - { - "name": "ACVM_BINARY_PATH", - "value": "/usr/src/noir/noir-repo/target/release/acvm" - }, - { - "name": "BB_BINARY_PATH", - "value": "/usr/src/barretenberg/cpp/build/bin/bb" - }, { "name": "PROVER_AGENTS", "value": "0" @@ -380,11 +378,11 @@ resource "aws_ecs_service" "aztec-node" { } - load_balancer { - target_group_arn = aws_lb_target_group.aztec-node-tcp[count.index].arn - container_name = "${var.DEPLOY_TAG}-aztec-node-${count.index + 1}" - container_port = var.NODE_P2P_TCP_PORT + count.index - } + # load_balancer { + # target_group_arn = aws_lb_target_group.aztec-node-tcp[count.index].arn + # container_name = "${var.DEPLOY_TAG}-aztec-node-${count.index + 1}" + # container_port = var.NODE_P2P_TCP_PORT + count.index + # } # load_balancer { # target_group_arn = aws_lb_target_group.aztec-node-udp[count.index].arn @@ -555,35 +553,30 @@ resource "aws_security_group_rule" "allow-node-udp-out" { // Configuration for proving agents resource "aws_cloudwatch_log_group" "aztec-proving-agent-log-group" { - count = local.total_agents - name = "/fargate/service/${var.DEPLOY_TAG}/aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + name = "/fargate/service/${var.DEPLOY_TAG}/aztec-proving-agent-group-${count.index + 1}" retention_in_days = 14 } resource "aws_service_discovery_service" "aztec-proving-agent" { - count = local.total_agents - name = "${var.DEPLOY_TAG}-aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + name = "${var.DEPLOY_TAG}-aztec-proving-agent-group-${count.index + 1}" health_check_custom_config { failure_threshold = 1 } - dns_config { namespace_id = data.terraform_remote_state.setup_iac.outputs.local_service_discovery_id - dns_records { ttl = 60 type = "A" } - dns_records { ttl = 60 type = "SRV" } - routing_policy = "MULTIVALUE" } - # Terraform just fails if this resource changes and you have registered instances. provisioner "local-exec" { when = destroy @@ -593,23 +586,22 @@ resource "aws_service_discovery_service" "aztec-proving-agent" { # Define task definitions for each node. resource "aws_ecs_task_definition" "aztec-proving-agent" { - count = local.total_agents - family = "${var.DEPLOY_TAG}-aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + family = "${var.DEPLOY_TAG}-aztec-proving-agent-group-${count.index + 1}" requires_compatibilities = ["FARGATE"] network_mode = "awsvpc" cpu = "16384" - memory = "65536" + memory = "98304" execution_role_arn = data.terraform_remote_state.setup_iac.outputs.ecs_task_execution_role_arn task_role_arn = data.terraform_remote_state.aztec2_iac.outputs.cloudwatch_logging_ecs_role_arn - - container_definitions = <