Skip to content

Commit

Permalink
Merge pull request #8651 from MinaProtocol/compatible
Browse files Browse the repository at this point in the history
Merge back to develop
  • Loading branch information
mrmr1993 authored Apr 15, 2021
2 parents c8d6ff5 + 524cfcd commit f88edb4
Show file tree
Hide file tree
Showing 34 changed files with 420 additions and 32 deletions.
8 changes: 0 additions & 8 deletions automation/bake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ ARG BAKE_VERSION

FROM codaprotocol/coda-daemon:${BAKE_VERSION}

RUN apt-get update && apt-get install -y gnupg2

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

RUN apt-get update && apt-get install -y google-cloud-sdk

ARG COMMIT_HASH=master
ARG TESTNET_NAME=testworld
ARG CONFIG_FILE="/root/daemon.json"
Expand Down
8 changes: 4 additions & 4 deletions automation/terraform/modules/kubernetes/testnet/helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "helm_release" "seeds" {
name = "${var.testnet_name}-seeds"
repository = var.use_local_charts ? "" : local.mina_helm_repo
chart = var.use_local_charts ? "../../../../helm/seed-node" : "seed-node"
version = "1.0.3"
version = "1.0.4"
namespace = kubernetes_namespace.testnet_namespace.metadata[0].name
values = [
yamlencode(local.seed_vars)
Expand All @@ -47,7 +47,7 @@ resource "helm_release" "block_producers" {
name = "${var.testnet_name}-block-producers"
repository = var.use_local_charts ? "" : local.mina_helm_repo
chart = var.use_local_charts ? "../../../../helm/block-producer" : "block-producer"
version = "1.0.1"
version = "1.0.3"
namespace = kubernetes_namespace.testnet_namespace.metadata[0].name
values = [
yamlencode(local.block_producer_vars)
Expand All @@ -66,7 +66,7 @@ resource "helm_release" "snark_workers" {
name = "${var.testnet_name}-snark-worker"
repository = var.use_local_charts ? "" : local.mina_helm_repo
chart = var.use_local_charts ? "../../../../helm/snark-worker" : "snark-worker"
version = "1.0.1"
version = "1.0.2"
namespace = kubernetes_namespace.testnet_namespace.metadata[0].name
values = [
yamlencode(local.snark_worker_vars)
Expand All @@ -85,7 +85,7 @@ resource "helm_release" "archive_node" {
name = "archive-${count.index + 1}"
repository = var.use_local_charts ? "" : local.mina_helm_repo
chart = var.use_local_charts ? "../../../../helm/archive-node" : "archive-node"
version = "1.0.1"
version = "1.0.3"
namespace = kubernetes_namespace.testnet_namespace.metadata[0].name
values = [
yamlencode(local.archive_vars[count.index])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"pk": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq",
"balance": "66000.000000000",
"delegate": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq",
"sk": null,
"timing": {
"initial_minimum_balance": "60000",
"cliff_time": "150",
"cliff_amount": "12000",
"vesting_period": "6",
"vesting_increment": "150"
}
}
60 changes: 60 additions & 0 deletions automation/terraform/testnets/test-labels/fish.accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"pk": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"balance": "20000.000000000",
"delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"sk": null
}
{
"pk": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"balance": "20000.000000000",
"delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"sk": null
}
{
"pk": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"balance": "20000.000000000",
"delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"sk": null
}
{
"pk": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"balance": "20000.000000000",
"delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"sk": null
}
{
"pk": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"balance": "20000.000000000",
"delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"sk": null
}
{
"pk": "B62qrTLLzysdpmKwDffpS4BTRoSE4yC3pot5F4D4ZwAn5oxNb9yCxhz",
"balance": "20000.000000000",
"delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"sk": null
}
{
"pk": "B62qp1jrz9S5pU8MT6j5xMQawxFbNxHzkT1YnQspyDXxESb4Au8aeWL",
"balance": "20000.000000000",
"delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"sk": null
}
{
"pk": "B62qpBLWeBjAnnQGehYrHZ9vrh1HXwpm9Pp7qksT6AkMumswyJpGF4X",
"balance": "20000.000000000",
"delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"sk": null
}
{
"pk": "B62qj2jSJhbUwLYXeoLndzw5cwmWGFeeSRSDxEwYQUmpdBeiMPFQ5jq",
"balance": "20000.000000000",
"delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"sk": null
}
{
"pk": "B62qp7toDo2vTrNSVjsRSXkKBQCjvByLdwFcoGTqay6kuDSiU3pubeS",
"balance": "20000.000000000",
"delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"sk": null
}
114 changes: 114 additions & 0 deletions automation/terraform/testnets/test-labels/genesis_ledger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"genesis": {
"genesis_state_timestamp": "2021-04-08 19:42:22-7:00"
},
"ledger": {
"name": "test-labels",
"num_accounts": 16,
"accounts": [
{
"pk": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq",
"balance": "66000.000000000",
"delegate": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq",
"sk": null,
"timing": {
"initial_minimum_balance": "60000",
"cliff_time": "150",
"cliff_amount": "12000",
"vesting_period": "6",
"vesting_increment": "150"
}
},
{
"pk": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"balance": "20000.000000000",
"delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"sk": null
},
{
"pk": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"balance": "20000.000000000",
"delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"sk": null
},
{
"pk": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"balance": "20000.000000000",
"delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"sk": null
},
{
"pk": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"balance": "20000.000000000",
"delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"sk": null
},
{
"pk": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"balance": "20000.000000000",
"delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"sk": null
},
{
"pk": "B62qrTLLzysdpmKwDffpS4BTRoSE4yC3pot5F4D4ZwAn5oxNb9yCxhz",
"balance": "20000.000000000",
"delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB",
"sk": null
},
{
"pk": "B62qp1jrz9S5pU8MT6j5xMQawxFbNxHzkT1YnQspyDXxESb4Au8aeWL",
"balance": "20000.000000000",
"delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11",
"sk": null
},
{
"pk": "B62qpBLWeBjAnnQGehYrHZ9vrh1HXwpm9Pp7qksT6AkMumswyJpGF4X",
"balance": "20000.000000000",
"delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL",
"sk": null
},
{
"pk": "B62qj2jSJhbUwLYXeoLndzw5cwmWGFeeSRSDxEwYQUmpdBeiMPFQ5jq",
"balance": "20000.000000000",
"delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3",
"sk": null
},
{
"pk": "B62qp7toDo2vTrNSVjsRSXkKBQCjvByLdwFcoGTqay6kuDSiU3pubeS",
"balance": "20000.000000000",
"delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj",
"sk": null
},
{
"pk": "B62qrSYyANC6tD145U2rD6j2Pk22obbXridrLS4k2ATvAhJDhfDjD5N",
"balance": "2250000.000000000",
"delegate": "B62qjRyvPXehwFqoA2fgAKfK38edF8HYRhGMjjX76m6oPPKob9Tchzs",
"sk": null
},
{
"pk": "B62qjEy1BAqGPJYw3B24uhPnhMJc19LgsmHCVvH5GFzB5SJzBy7hJ8y",
"balance": "2250000.000000000",
"delegate": "B62qnPzdCBJKCVgkoGQPXa7dMpxny8zGr76E8YMMdQo6e3CK1Zpwo9Y",
"sk": null
},
{
"pk": "B62qqsQPNrNLGBTpsKyvtW6NKZERRPHaACMpkKGxmusV8MwaGjAtwRv",
"balance": "2250000.000000000",
"delegate": "B62qmEKWAURBnMHLojq9eW2wRKyvRtJQUG2tzGRJzTUVef3PyCFQ8th",
"sk": null
},
{
"pk": "B62qr7ed4upRdRaNmvxVKgxmbutxsGWeQeXBMEZjJN83CUrXnD1sDgz",
"balance": "2250000.000000000",
"delegate": "B62qqQPw875obJSweVGPpj2hu455ncZZTeMz8rvgiNZM5bErspo4sPM",
"sk": null
},
{
"pk": "B62qmf7k5jdBKRhnTo8tyfr978d7GvzgECUNGETdjWvjEi5VdsfNady",
"balance": "2250000.000000000",
"delegate": "B62qrMJjvLTz6XsE1Cge4yPAA9Y44SWeDtonH5LYN6ZYkwfsqukAf5D",
"sk": null
}
]
}
}
151 changes: 151 additions & 0 deletions automation/terraform/testnets/test-labels/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
terraform {
required_version = ">= 0.14.0"
backend "s3" {
key = "terraform-test-labels.tfstate"
encrypt = true
region = "us-west-2"
bucket = "o1labs-terraform-state"
acl = "bucket-owner-full-control"
}
}

provider "aws" {
region = "us-west-2"
}

provider "google" {
alias = "google-us-east4"
project = "o1labs-192920"
region = "us-east4"
zone = "us-east4-b"
}

provider "google" {
alias = "google-us-east1"
project = "o1labs-192920"
region = "us-east1"
zone = "us-east1-b"
}

provider "google" {
alias = "google-us-central1"
project = "o1labs-192920"
region = "us-central1"
zone = "us-central1-c"
}


variable "whale_count" {
type = number

description = "Number of online whales for the network to run"
default = 2
}

variable "fish_count" {
type = number

description = "Number of online fish for the network to run"
default = 2
}

variable "seed_count" {
default = 1
}

locals {
testnet_name = "test-labels"
coda_image = "gcr.io/o1labs-192920/coda-daemon-baked:1.1.5-compatible-be67bed-test-labels-425db71"
coda_archive_image = "gcr.io/o1labs-192920/coda-archive:1.0.4-8202b60"
seed_region = "us-central1"
seed_zone = "us-central1-b"

# replace with `make_report_discord_webhook_url = ""` if not in use (will fail if file not present)
make_report_discord_webhook_url = ""

# replace with `make_report_accounts = ""` if not in use (will fail if file not present)
# make_report_accounts = <<EOT
# ${file("../../../${local.testnet_name}-accounts.csv")}
# EOT
make_report_accounts = ""
}

module "testlabels" {
providers = { google.gke = google.google-us-central1 }
source = "../../modules/o1-testnet"

artifact_path = abspath(path.module)

cluster_name = "coda-infra-central1"
cluster_region = "us-central1"
k8s_context = "gke_o1labs-192920_us-central1_coda-infra-central1"
testnet_name = local.testnet_name

coda_image = local.coda_image
coda_archive_image = local.coda_archive_image
coda_agent_image = "codaprotocol/coda-user-agent:0.1.8"
coda_bots_image = "codaprotocol/coda-bots:0.0.13-beta-1"
coda_points_image = "codaprotocol/coda-points-hack:32b.4"
watchdog_image = "gcr.io/o1labs-192920/watchdog:0.4.3"

archive_node_count = 3
mina_archive_schema = "https://raw.githubusercontent.com/MinaProtocol/mina/06691e343be1ddad036c1fc4a6c94afc12afc4ee/src/app/archive/create_schema.sql"

archive_configs = [
{
name = "archive-1"
enableLocalDaemon = true
enablePostgresDB = true
postgresHost = "archive-1-postgresql"
},
{
name = "archive-2"
enableLocalDaemon = false
enablePostgresDB = false
postgresHost = "archive-1-postgresql"
},
{
name = "archive-3"
enableLocalDaemon = false
enablePostgresDB = true
postgresHost = "archive-3-postgresql"
}
]


coda_faucet_amount = "10000000000"
coda_faucet_fee = "100000000"

agent_min_fee = "0.05"
agent_max_fee = "0.1"
agent_min_tx = "0.0015"
agent_max_tx = "0.0015"
agent_send_every_mins = "1"

seed_zone = local.seed_zone
seed_region = local.seed_region

log_level = "Info"
log_txn_pool_gossip = false

block_producer_key_pass = "naughty blue worm"
block_producer_starting_host_port = 10501

snark_worker_replicas = 5
snark_worker_fee = "1.025"
snark_worker_public_key = "B62qk4nuKn2U5kb4dnZiUwXeRNtP1LncekdAKddnd1Ze8cWZnjWpmMU"
snark_worker_host_port = 10401
whale_count = var.whale_count
fish_count = var.fish_count
seed_count = var.seed_count

upload_blocks_to_gcloud = false
restart_nodes = false
restart_nodes_every_mins = "60"
make_reports = true
make_report_every_mins = "5"
make_report_discord_webhook_url = local.make_report_discord_webhook_url
make_report_accounts = local.make_report_accounts
seed_peers_url = "https://storage.googleapis.com/seed-lists/test-labels.txt"
}

Loading

0 comments on commit f88edb4

Please sign in to comment.