Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWindle committed Sep 25, 2023
1 parent 5c7336f commit 471159b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 152 deletions.
143 changes: 1 addition & 142 deletions yarn-project/aztec-node/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resource "aws_ecs_task_definition" "aztec-node-1" {
[
{
"name": "${var.DEPLOY_TAG}-aztec-node",
"image": "philwindle/aztec-node:latest",
"image": "aztecprotocol/aztec-node:latest",
"essential": true,
"memoryReservation": 3776,
"portMappings": [
Expand Down Expand Up @@ -211,147 +211,6 @@ resource "aws_ecs_service" "aztec-node-1" {
task_definition = aws_ecs_task_definition.aztec-node-1.family
}

# # Define task definition and service.
# resource "aws_ecs_task_definition" "aztec-node-2" {
# family = "${var.DEPLOY_TAG}-aztec-node"
# requires_compatibilities = ["FARGATE"]
# network_mode = "awsvpc"
# cpu = "2048"
# memory = "4096"
# 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 = <<DEFINITIONS
# [
# {
# "name": "${var.DEPLOY_TAG}-aztec-node",
# "image": "philwindle/aztec-node:latest",
# "essential": true,
# "memoryReservation": 3776,
# "portMappings": [
# {
# "containerPort": 80
# }
# ],
# "environment": [
# {
# "name": "NODE_ENV",
# "value": "production"
# },
# {
# "name": "SERVER_PORT",
# "value": "80"
# },
# {
# "name": "DEBUG",
# "value": "aztec:*"
# },
# {
# "name": "ETHEREUM_HOST",
# "value": "testnet"
# },
# {
# "name": "ARCHIVER_POLLING_INTERVAL",
# "value": "10000"
# },
# {
# "name": "SEQ_RETRY_INTERVAL",
# "value": "10000"
# },
# {
# "name": "SEQ_MAX_TX_PER_BLOCK",
# "value": "32"
# },
# {
# "name": "SEQ_MIN_TX_PER_BLOCK",
# "value": "32"
# },
# {
# "name": "SEQ_PUBLISHER_PRIVATE_KEY",
# "value": "${var.SEQ_PUBLISHER_PRIVATE_KEY}"
# },
# {
# "name": "CONTRACT_DEPLOYMENT_EMITTER_ADDRESS",
# "value": "${var.CONTRACT_DEPLOYMENT_EMITTER_ADDRESS}"
# },
# {
# "name": "ROLLUP_CONTRACT_ADDRESS",
# "value": "${var.ROLLUP_CONTRACT_ADDRESS}"
# },
# {
# "name": "INBOX_CONTRACT_ADDRESS",
# "value": "${var.INBOX_CONTRACT_ADDRESS}"
# },
# {
# "name": "API_KEY",
# "value": "${var.API_KEY}"
# },
# {
# "name": "API_PREFIX",
# "value": "/${var.DEPLOY_TAG}/aztec-node"
# },
# {
# "name": "SEARCH_START_BLOCK",
# "value": "15918000"
# },
# {
# "name": "P2P_TCP_LISTEN_PORT",
# "value": "40402"
# },
# {
# "name": "P2P_ENABLED",
# "value": "false"
# },
# {
# "name": "BOOTSTRAP_NODES",
# "value": "/ip4/44.201.46.76/tcp/40400/p2p/12D3KooWGBpbC6qQFkaCYphjNeY6sV99o4SnEWyTeBigoVriDn4D"
# }
# ],
# "logConfiguration": {
# "logDriver": "awslogs",
# "options": {
# "awslogs-group": "/fargate/service/${var.DEPLOY_TAG}/aztec-node",
# "awslogs-region": "eu-west-2",
# "awslogs-stream-prefix": "ecs"
# }
# }
# }
# ]
# DEFINITIONS
# }

# resource "aws_ecs_service" "aztec-node-2" {
# name = "${var.DEPLOY_TAG}-aztec-node-2"
# cluster = data.terraform_remote_state.setup_iac.outputs.ecs_cluster_id
# launch_type = "FARGATE"
# desired_count = 1
# deployment_maximum_percent = 100
# deployment_minimum_healthy_percent = 0
# platform_version = "1.4.0"

# network_configuration {
# subnets = [
# data.terraform_remote_state.setup_iac.outputs.subnet_az1_private_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]
# }

# load_balancer {
# target_group_arn = aws_alb_target_group.aztec-node.arn
# container_name = "${var.DEPLOY_TAG}-aztec-node"
# container_port = 80
# }

# service_registries {
# registry_arn = aws_service_discovery_service.aztec-node.arn
# container_name = "${var.DEPLOY_TAG}-aztec-node"
# container_port = 80
# }

# task_definition = aws_ecs_task_definition.aztec-node.family
# }

# Configure ALB to route /aztec-node to server.
resource "aws_alb_target_group" "aztec-node" {
name = "${var.DEPLOY_TAG}-aztec-node"
Expand Down
12 changes: 4 additions & 8 deletions yarn-project/aztec-sandbox/src/sandbox.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env -S node --no-warnings
import { AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
import { EthAddress, createAztecRPCServer, getConfigEnvVars as getRpcConfigEnvVars } from '@aztec/aztec-rpc';
import { createAztecRPCServer, getConfigEnvVars as getRpcConfigEnvVars } from '@aztec/aztec-rpc';
import { DeployL1Contracts, L1ContractAddresses, createEthereumChain, deployL1Contracts } from '@aztec/ethereum';
import { createDebugLogger } from '@aztec/foundation/log';
import { retryUntil } from '@aztec/foundation/retry';
Expand All @@ -18,11 +18,7 @@ import {
import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
import { foundry } from 'viem/chains';

const {
MNEMONIC = 'test test test test test test test test test test test junk',
OUTBOX_CONTRACT_ADDRESS = '',
REGISTRY_CONTRACT_ADDRESS = '',
} = process.env;
const { MNEMONIC = 'test test test test test test test test test test test junk' } = process.env;

const logger = createDebugLogger('aztec:sandbox');

Expand All @@ -44,9 +40,9 @@ function retrieveL1Contracts(config: AztecNodeConfig, account: Account): Promise
});
const l1Contracts = new L1ContractAddresses(
config.l1Contracts.rollupAddress,
EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS),
config.l1Contracts.registryAddress,
config.l1Contracts.inboxAddress,
EthAddress.fromString(OUTBOX_CONTRACT_ADDRESS),
config.l1Contracts.outboxAddress,
config.l1Contracts.contractDeploymentEmitterAddress,
undefined,
);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "rm -rf ./dest .tsbuildinfo",
"formatting": "run -T prettier --check ./src \"!src/web/main.js\" && run -T eslint ./src",
"formatting:fix": "run -T prettier -w ./src",
"test": "DEBUG='aztec:*,libp2p:*' NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand --passWithNoTests --testTimeout=15000",
"test": "DEBUG='aztec:*' NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand --passWithNoTests --testTimeout=15000",
"test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"",
"test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --config jest.integration.config.json"
},
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_p2p_network.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('e2e_p2p_network', () => {
p2pEnabled: true,
tcpListenPort: BOOT_NODE_TCP_PORT,
tcpListenIp: '0.0.0.0',
announceHostname: '10.1.0.15',
announceHostname: '127.0.0.1',
announcePort: BOOT_NODE_TCP_PORT,
peerIdPrivateKey: Buffer.from(peerId.privateKey!).toString('hex'),
serverMode: false,
Expand Down

0 comments on commit 471159b

Please sign in to comment.