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
4 changes: 4 additions & 0 deletions spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ spec:
value: "{{ .Values.ethereum.acceleratedTestDeployments }}"
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
- name: REGISTRY_CONTRACT_ADDRESS
value: "{{ .Values.bootNode.contracts.registryAddress }}"
- name: TELEMETRY
Expand Down Expand Up @@ -230,6 +232,8 @@ spec:
value: "{{ .Values.telemetry.excludeMetrics }}"
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
{{- if .Values.blobSink.enabled }}
- name: BLOB_SINK_URL
value: {{ include "aztec-network.blobSinkUrl" . }}
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/templates/full-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ spec:
value: "{{ .Values.network.p2pBootstrapNodesAsFullPeers }}"
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
{{- if .Values.blobSink.enabled }}
- name: BLOB_SINK_URL
value: {{ include "aztec-network.blobSinkUrl" . }}
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/templates/prover-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ spec:
value: "{{ .Values.telemetry.excludeMetrics }}"
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
{{- if .Values.blobSink.enabled }}
- name: BLOB_SINK_URL
value: {{ include "aztec-network.blobSinkUrl" . }}
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/templates/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ spec:
value: "{{ .Values.telemetry.excludeMetrics }}"
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
- name: P2P_BOOTSTRAP_NODES_AS_FULL_PEERS
value: "{{ .Values.network.p2pBootstrapNodesAsFullPeers }}"
{{- if .Values.blobSink.enabled }}
Expand Down
1 change: 1 addition & 0 deletions spartan/aztec-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ aztec:

l1Salt: "" # leave empty for random salt
testAccounts: true
sponsoredFPC: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok for this value to be false here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, well it depends on what the default behaviour of this is in the cli. I haven't updated our L1 contract deployment process to specify --sponsored-fpc so I would hope this would mean it would default to false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same default as testAccounts, I specified them the same:

.option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that's false. It's not exactly clear

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it defaults to false (checked commander.js docs)

l1DeploymentMnemonic: "test test test test test test test test test test test junk" # the mnemonic used when deploying contracts
manaTarget: "" # use default value

Expand Down
86 changes: 86 additions & 0 deletions spartan/aztec-network/values/alpha-testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
telemetry:
enabled: true

aztec:
realProofs: true
numberOfDefaultAccounts: 0
testAccounts: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testAccounts and sponsoredFPC both true

sponsoredFPC: true
bootstrapENRs: "enr:-LO4QLbJddVpePYjaiCftOBY-L7O6Mfj_43TAn5Q1Y-5qQ_OWmSFc7bTKWHzw5xmdVIqXUiizum_kIRniXdPnWHHcwEEhWF6dGVjqDAwLTExMTU1MTExLTAwMDAwMDAwLTAtMTgwNmEwMjgtMWE1MzBmM2KCaWSCdjSCaXCEI8nh9YlzZWNwMjU2azGhA-_dX6aFcXP1DLk91negbXL2a0mNYGXH4hrMvb2i92I0g3VkcIKd0A,enr:-LO4QN4WF8kFyV3sQVX0C_y_03Eepxk5Wac70l9QJcIDRYwKS6aRst1YcfbTDdvovXdRfKf-WSXNVWViGLhDA-dUz2MEhWF6dGVjqDAwLTExMTU1MTExLTAwMDAwMDAwLTAtMTgwNmEwMjgtMWE1MzBmM2KCaWSCdjSCaXCEIicTHolzZWNwMjU2azGhAsz7aFFYRnP5xjTux5UW-HyEQcW_EJrZMT1CNm79N4g-g3VkcIKd0A,enr:-LO4QFrGfkRaCk_iFTeUjR5ESwo45Eov9hx_T1-BLdoT-iHzFgCiHMT4V1KBtdFp8D0ajLSe5HcNYrhalmdJXgv6NTUEhWF6dGVjqDAwLTExMTU1MTExLTAwMDAwMDAwLTAtMTgwNmEwMjgtMWE1MzBmM2KCaWSCdjSCaXCEIlICt4lzZWNwMjU2azGhAlC6nKB3iDtRFqWKWqxf_t-P9hc-SZ6VFBJV4y3bTZBQg3VkcIKd0A"
contracts:
registryAddress: "0x290667b79dd73ce03cd2fc901b905e7f1b001d18"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alpha testnet contracts and bootnodes

slashFactoryAddress: "0xc5aceadbb626630e854ffd6cb39105e9c541fa34"

network:
public: true
setupL2Contracts: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the fee juice contract get initialized out of band?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want the helm deployment setting up the L2 contracts. The genesist state has been setup to fund the FPC, we just need to deploy the contract. But I was going to that once I see the network is up and runing producing empty blocks.

p2pBootstrapNodesAsFullPeers: false

blobSink:
enabled: true
dataStoreConfig:
dataDir: "/data"
storageSize: "128Gi"
dataStoreMapSize: "134217728" # 128 GB

bot:
enabled: false

pxe:
enabled: false

faucet:
enabled: false

bootNode:
enabled: false
# unused.
externalHost: "http://localhost:8080"

proverNode:
l1FixedPriorityFeePerGas: 3
l1GasLimitBufferPercentage: 15
l1GasPriceMax: 1000
maxOldSpaceSize: "8192"
storageSize: "512Gi"
resources:
requests:
cpu: "3"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 cores so we use the new 4 core pool. Leaves a core for K8s/Google usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also 10Gi memory. These have 16GB available but K8s bloat takes some.

Copy link
Contributor

@alexghr alexghr Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Node's max-old-space-size get set as part of the parent values file?

Nope, good call. Will add

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, will add

memory: "10Gi"

validator:
replicas: 3
l1FixedPriorityFeePerGas: 3
l1GasLimitBufferPercentage: 15
l1GasPriceMax: 1000
storageSize: "512Gi"
sequencer:
minTxsPerBlock: 0
maxTxsPerBlock: 4
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 txs per block (0.1 TPS)

validator:
disabled: false
maxOldSpaceSize: "8192"
resources:
requests:
cpu: "3"
memory: "10Gi"

proverAgent:
replicas: 32
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32 x 32 core spot provers (-1 core for K8s)

bb:
hardwareConcurrency: 31
gke:
spotEnabled: true
resources:
requests:
memory: "116Gi"
cpu: "31"

ethereum:
chainId: "11155111"
l1GasPriceMax: 1000
l1FixedPriorityFeePerGas: 3

jobs:
deployL1Verifier:
enable: false
45 changes: 45 additions & 0 deletions spartan/terraform/gke-cluster/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ resource "google_container_cluster" "primary" {
issue_client_certificate = false
}
}

resource_usage_export_config {
enable_network_egress_metering = true
enable_resource_consumption_metering = true

bigquery_destination {
dataset_id = "egress_consumption"
}
}
}

# Create 2 core node pool with local ssd
Expand Down Expand Up @@ -103,6 +112,42 @@ resource "google_container_node_pool" "aztec_nodes-2core" {
}
}

# Create 4 core node pool no ssd
resource "google_container_node_pool" "aztec_nodes-4core" {
name = "${var.cluster_name}-4core"
location = var.zone
cluster = var.cluster_name
version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
max_node_count = 16
}

# Node configuration
node_config {
machine_type = "t2d-standard-4"

service_account = var.service_account
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]

labels = {
env = "production"
local-ssd = "false"
node-type = "network"
}
tags = ["aztec-gke-node", "aztec"]
}

# Management configuration
management {
auto_repair = true
auto_upgrade = false
}
}

# Create spot instance node pool with autoscaling
resource "google_container_node_pool" "spot_nodes_32core" {
name = "${var.cluster_name}-32core-spot"
Expand Down
5 changes: 2 additions & 3 deletions spartan/terraform/gke-cluster/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
terraform {
backend "s3" {
backend "gcs" {
bucket = "aztec-terraform"
key = "aztec-gke-cluster/terraform.tfstate"
region = "eu-west-2"
prefix = "terraform/state/gke-cluster"
}
required_providers {
google = {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/src/cli/cmds/start_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function startNode(

const testAccounts = nodeConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
const sponsoredFPCAccounts = nodeConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
const initialFundedAccounts = [...testAccounts, ...sponsoredFPCAccounts];
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was paranoid that I hadn't used the same concat method used when creating the genesis state in the cli deployment of L1 contracts.


const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/src/cli/cmds/start_prover_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export async function startProverNode(

const testAccounts = proverConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
const sponsoredFPCAccounts = proverConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
const initialFundedAccounts = [...testAccounts, ...sponsoredFPCAccounts];
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);

const proverNode = await createProverNode(proverConfig, { telemetry, broker }, { prefilledPublicData });
Expand Down