From 27f594ea904ca71ddc2d8117192e12c8f32b98cc Mon Sep 17 00:00:00 2001 From: Steven Platt <31355889+stevenplatt@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:01:03 -0500 Subject: [PATCH 1/2] updated ci-net and script dependencies --- .../terraform/modules/o1-testnet/files.tf | 20 +++++++++-------- .../terraform/modules/o1-testnet/scripts.tf | 18 ++++++++------- .../terraform/modules/o1-testnet/testnet.tf | 2 +- automation/terraform/testnets/ci-net/main.tf | 22 ++++++++++--------- 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/automation/terraform/modules/o1-testnet/files.tf b/automation/terraform/modules/o1-testnet/files.tf index 91dc833b0e0..7eb37815c96 100644 --- a/automation/terraform/modules/o1-testnet/files.tf +++ b/automation/terraform/modules/o1-testnet/files.tf @@ -1,9 +1,11 @@ -data "local_file" "genesis_ledger" { - filename = "${var.artifact_path}/genesis_ledger.json" - depends_on = [ - null_resource.block_producer_key_generation - ] -} +# terraform cannot handle file sizes above 4mb, as a result, using a genesis_ledger.json file is no longer supported + +# data "local_file" "genesis_ledger" { +# filename = "${var.artifact_path}/genesis_ledger.json" +# depends_on = [ +# null_resource.block_producer_key_generation +# ] +# } # data "local_file" "libp2p_peers" { # for_each = toset(concat(local.whale_block_producer_libp2p_names, local.fish_block_producer_libp2p_names)) @@ -16,7 +18,7 @@ data "local_file" "genesis_ledger" { data "local_file" "libp2p_seed_peers" { for_each = toset(local.seed_names) filename = "${var.artifact_path}/keys/libp2p-keys/${each.key}.peerid" - depends_on = [ - null_resource.block_producer_key_generation - ] + # depends_on = [ + # null_resource.block_producer_key_generation + # ] } diff --git a/automation/terraform/modules/o1-testnet/scripts.tf b/automation/terraform/modules/o1-testnet/scripts.tf index 1f5ebafb4ee..8f66b0b9979 100644 --- a/automation/terraform/modules/o1-testnet/scripts.tf +++ b/automation/terraform/modules/o1-testnet/scripts.tf @@ -1,9 +1,11 @@ -resource "null_resource" "block_producer_key_generation" { - provisioner "local-exec" { - working_dir = "${path.module}/../../.." - command = "./scripts/generate-keys-and-ledger.sh --testnet=${var.testnet_name} --sc=${var.seed_count} --wu=${local.whale_count_unique} --wt=${local.whale_count_total} --fu=${local.fish_count_unique} --ft=${local.fish_count_total} --reset=false --artifact-path=${var.artifact_path}" - } -} +# dynamic key and ledger generation is not used in production testnets, only for disposable integration tests + +# resource "null_resource" "block_producer_key_generation" { +# provisioner "local-exec" { +# working_dir = "${path.module}/../../.." +# command = "./scripts/generate-keys-and-ledger.sh --testnet=${var.testnet_name} --sc=${var.seed_count} --wu=${local.whale_count_unique} --wt=${local.whale_count_total} --fu=${local.fish_count_unique} --ft=${local.fish_count_total} --reset=false --artifact-path=${var.artifact_path}" +# } +# } resource "null_resource" "block_producer_uploads" { provisioner "local-exec" { @@ -15,7 +17,7 @@ resource "null_resource" "block_producer_uploads" { } depends_on = [ module.kubernetes_testnet.testnet_namespace, - null_resource.block_producer_key_generation + # null_resource.block_producer_key_generation ] } @@ -26,6 +28,6 @@ resource "null_resource" "seed_list" { } depends_on = [ module.kubernetes_testnet.testnet_namespace, - null_resource.block_producer_key_generation + # null_resource.block_producer_key_generation ] } diff --git a/automation/terraform/modules/o1-testnet/testnet.tf b/automation/terraform/modules/o1-testnet/testnet.tf index 29c82513025..c40ea76910d 100644 --- a/automation/terraform/modules/o1-testnet/testnet.tf +++ b/automation/terraform/modules/o1-testnet/testnet.tf @@ -51,7 +51,7 @@ module "kubernetes_testnet" { agent_send_every_mins = var.agent_send_every_mins additional_peers = [for peer in local.static_peers : peer.full_peer] - runtime_config = var.use_embedded_runtime_config ? "" : data.local_file.genesis_ledger.content + runtime_config = var.use_embedded_runtime_config ? "" : "" seed_zone = var.seed_zone seed_region = var.seed_region diff --git a/automation/terraform/testnets/ci-net/main.tf b/automation/terraform/testnets/ci-net/main.tf index 57e25555080..84bb70c2eb7 100644 --- a/automation/terraform/testnets/ci-net/main.tf +++ b/automation/terraform/testnets/ci-net/main.tf @@ -69,7 +69,7 @@ locals { module "ci_testnet" { - source = "../../modules/o1-testnet" + source = "../../modules/o1-testnet" artifact_path = var.ci_artifact_path @@ -108,21 +108,23 @@ module "ci_testnet" { snark_coordinators = [ { - snark_worker_replicas = var.snark_worker_count - snark_worker_fee = "0.025" - snark_worker_public_key = "B62qk4nuKn2U5kb4dnZiUwXeRNtP1LncekdAKddnd1Ze8cWZnjWpmMU" - snark_coordinators_host_port = 10401 + snark_coordinator_name = "ci-net" + snark_worker_replicas = var.snark_worker_count + snark_worker_fee = "0.025" + snark_worker_public_key = "B62qk4nuKn2U5kb4dnZiUwXeRNtP1LncekdAKddnd1Ze8cWZnjWpmMU" + snark_coordinators_host_port = 10401 + persist_working_dir = false } ] - whales= [ - for i in range(var.whale_count):{ + whales = [ + for i in range(var.whale_count) : { duplicates = 1 } ] - - fishes= [ - for i in range(var.fish_count):{ + + fishes = [ + for i in range(var.fish_count) : { duplicates = 1 } ] From 2b0bac0102dc29b241edd5d4c198647cc6174ad0 Mon Sep 17 00:00:00 2001 From: Steven Platt <31355889+stevenplatt@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:11:52 -0500 Subject: [PATCH 2/2] current berkeley testnet configuration --- automation/terraform/testnets/berkeley/main.tf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/automation/terraform/testnets/berkeley/main.tf b/automation/terraform/testnets/berkeley/main.tf index d6b5c4ebe43..a376f0e4a11 100644 --- a/automation/terraform/testnets/berkeley/main.tf +++ b/automation/terraform/testnets/berkeley/main.tf @@ -60,8 +60,8 @@ variable "plain_node_count" { locals { testnet_name = "berkeley" - mina_image = "minaprotocol/mina-daemon:focal-berkeley-latest" #"minaprotocol/mina-daemon:1.3.2beta2-release-2.0.0-6f9d956-focal-berkeley" - mina_archive_image = "minaprotocol/mina-archive:focal-latest" #"minaprotocol/mina-archive:1.3.2beta2-release-2.0.0-6f9d956-focal" + mina_image = "gcr.io/o1labs-192920/mina-daemon:2.0.0rampup1-rampup-b1facec-focal-berkeley" #"minaprotocol/mina-daemon:1.3.2beta2-release-2.0.0-6f9d956-focal-berkeley" + mina_archive_image = "gcr.io/o1labs-192920/mina-archive:2.0.0rampup1-rampup-b1facec-focal" #"minaprotocol/mina-archive:1.3.2beta2-release-2.0.0-6f9d956-focal" seed_region = "us-central1" seed_zone = "us-central1-b" @@ -76,14 +76,14 @@ locals { } module "berkeley" { - providers = { google.gke = google.google-us-east1 } + providers = { google.gke = google.google-us-central1 } source = "../../modules/o1-testnet" artifact_path = abspath(path.module) - cluster_name = "coda-infra-east" - cluster_region = "us-east1" - k8s_context = "gke_o1labs-192920_us-east1_coda-infra-east" + cluster_name = "coda-infra-central1" + cluster_region = "us-central1" + k8s_context = "gke_o1labs-192920_us-central1_coda-infra-central1" testnet_name = local.testnet_name mina_image = local.mina_image @@ -96,7 +96,7 @@ module "berkeley" { archive_node_count = 2 mina_archive_schema = "create_schema.sql" - mina_archive_schema_aux_files = ["https://raw.githubusercontent.com/MinaProtocol/mina/8468f29424fa5e70cfedf69ee281f4fa24037dfe/src/app/archive/create_schema.sql", "https://raw.githubusercontent.com/MinaProtocol/mina/8468f29424fa5e70cfedf69ee281f4fa24037dfe/src/app/archive/zkapp_tables.sql"] + mina_archive_schema_aux_files = ["https://raw.githubusercontent.com/MinaProtocol/mina/b1facecde934ce3969771c34962b878d75321ca7/src/app/archive/create_schema.sql", "https://raw.githubusercontent.com/MinaProtocol/mina/b1facecde934ce3969771c34962b878d75321ca7/src/app/archive/zkapp_tables.sql"] archive_configs = [ {