Skip to content

Commit 90af2e4

Browse files
authored
fix: testnet archival node (#17139)
- Fixes issue with config where '10000000' config was converted to '1e+07' - Adds archival node deployment to new helm charts
2 parents f52afd9 + 3a3bbef commit 90af2e4

File tree

8 files changed

+109
-1
lines changed

8 files changed

+109
-1
lines changed

.github/workflows/deploy-staging-networks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ jobs:
248248
BOT_SWAPS_REPLICAS=0
249249
FLUSH_ENTRY_QUEUE=false
250250
251+
DEPLOY_ARCHIVAL_NODE=true
252+
251253
RPC_INGRESS_ENABLED=true
252254
RPC_INGRESS_HOST=rpc.testnet.aztec-labs.com
253255
RPC_INGRESS_STATIC_IP_NAME=testnet-rpc-ip

spartan/scripts/deploy_network.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ PROVER_FAILED_PROOF_STORE=${PROVER_FAILED_PROOF_STORE:-}
7070

7171
OTEL_COLLECTOR_ENDPOINT=${OTEL_COLLECTOR_ENDPOINT:-}
7272
DEPLOY_INTERNAL_BOOTNODE=${DEPLOY_INTERNAL_BOOTNODE:-}
73+
DEPLOY_ARCHIVAL_NODE=${DEPLOY_ARCHIVAL_NODE:-false}
7374

7475
BOT_RESOURCE_PROFILE=${BOT_RESOURCE_PROFILE:-${RESOURCE_PROFILE}}
7576
BOT_TRANSFERS_MNEMONIC_START_INDEX=${BOT_TRANSFERS_MNEMONIC_START_INDEX:-5001}
@@ -330,6 +331,7 @@ RPC_INGRESS_STATIC_IP_NAME = "${RPC_INGRESS_STATIC_IP_NAME}"
330331
RPC_INGRESS_SSL_CERT_NAME = "${RPC_INGRESS_SSL_CERT_NAME}"
331332
332333
PROVER_FAILED_PROOF_STORE = "${PROVER_FAILED_PROOF_STORE}"
334+
DEPLOY_ARCHIVAL_NODE = ${DEPLOY_ARCHIVAL_NODE}
333335
EOF
334336

335337
tf_run "${DEPLOY_AZTEC_INFRA_DIR}" "${DESTROY_AZTEC_INFRA}" "${CREATE_AZTEC_INFRA}"

spartan/terraform/deploy-aztec-infra/main.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,24 @@ locals {
223223
wait = true
224224
}
225225

226+
archive = var.DEPLOY_ARCHIVAL_NODE ? {
227+
name = "${var.RELEASE_PREFIX}-archive"
228+
chart = "aztec-node"
229+
values = [
230+
"common.yaml",
231+
"archive.yaml",
232+
"archive-resources-dev.yaml"
233+
]
234+
custom_settings = {
235+
"nodeType" = "archive"
236+
"node.env.NETWORK" = var.NETWORK
237+
"node.env.P2P_ARCHIVED_TX_LIMIT" = "10000000"
238+
}
239+
boot_node_host_path = "node.env.BOOT_NODE_HOST"
240+
bootstrap_nodes_path = "node.env.BOOTSTRAP_NODES"
241+
wait = true
242+
} : null
243+
226244
# Optional: transfer bots
227245
bot_transfers = var.BOT_TRANSFERS_REPLICAS > 0 ? {
228246
name = "${var.RELEASE_PREFIX}-bot-transfers"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
replicaCount: 1
2+
3+
hostNetwork: true
4+
5+
node:
6+
resources:
7+
requests:
8+
cpu: "3"
9+
memory: "12Gi"
10+
11+
persistence:
12+
enabled: true
13+
14+
statefulSet:
15+
enabled: true
16+
volumeClaimTemplates:
17+
- metadata:
18+
name: data
19+
annotations:
20+
"helm.sh/resource-policy": "Retain"
21+
spec:
22+
accessModes: [ReadWriteOnce]
23+
resources:
24+
requests:
25+
storage: "1Ti"
26+
27+
service:
28+
headless:
29+
enabled: true
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
nodeSelector:
2+
local-ssd: "false"
3+
node-type: "network"
4+
cores: "2"
5+
6+
affinity:
7+
podAntiAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
- labelSelector:
10+
matchExpressions:
11+
- key: app
12+
operator: In
13+
values:
14+
- node
15+
topologyKey: "kubernetes.io/hostname"
16+
namespaceSelector: {}
17+
18+
replicaCount: 1
19+
hostNetwork: true
20+
21+
node:
22+
resources:
23+
requests:
24+
cpu: "1.5"
25+
memory: "5Gi"
26+
27+
persistence:
28+
enabled: true
29+
30+
statefulSet:
31+
enabled: true
32+
volumeClaimTemplates:
33+
- metadata:
34+
name: data
35+
annotations:
36+
"helm.sh/resource-policy": "Retain"
37+
spec:
38+
accessModes: [ReadWriteOnce]
39+
resources:
40+
requests:
41+
storage: "1Ti"
42+
43+
service:
44+
headless:
45+
enabled: true
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node:
2+
env:
3+
OTEL_SERVICE_NAME: "archival-node"
4+
startCmd:
5+
- --node
6+
- --archiver

spartan/terraform/deploy-aztec-infra/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ variable "EXTERNAL_BOOTNODES" {
301301
default = []
302302
}
303303

304+
variable "DEPLOY_ARCHIVAL_NODE" {
305+
description = "Whether to deploy the archival node"
306+
type = bool
307+
default = false
308+
}
309+
304310
variable "NETWORK" {
305311
description = "One of the existing network names to use default config for"
306312
type = string

spartan/terraform/deploy-testnet/values/testnet-archive-node.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ affinity:
2828

2929
node:
3030
env:
31-
P2P_ARCHIVED_TX_LIMIT: 10000000 # 10 million
31+
P2P_ARCHIVED_TX_LIMIT: "10000000" # 10 million
3232
resources:
3333
requests:
3434
cpu: "3"

0 commit comments

Comments
 (0)