From eda376a7d6f946e94bce44c84382944c5b4904d0 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 11 Jan 2024 23:57:38 +0000 Subject: [PATCH 1/2] update to output to stdout --- k8s-cluster/README.md | 8 +++++--- k8s-cluster/src/genesis.rs | 8 ++++---- k8s-cluster/src/scripts/bootstrap-startup-script.sh | 8 ++------ k8s-cluster/src/scripts/client-startup-script.sh | 6 +----- .../scripts/non-voting-validator-startup-script.sh | 12 ++---------- k8s-cluster/src/scripts/validator-startup-script.sh | 10 +--------- 6 files changed, 15 insertions(+), 37 deletions(-) diff --git a/k8s-cluster/README.md b/k8s-cluster/README.md index 506bd19680edc0..98d92d488f2382 100644 --- a/k8s-cluster/README.md +++ b/k8s-cluster/README.md @@ -296,6 +296,8 @@ solana -ul validators # should see `--num-validators`+1 current validators (incl - Have tested deployments of up to 1200 validators - Once again, we assume you are logged into docker and you are pulling from a public repo (Monogon hosts need to access) -## TODO: -- Big one here is that we rely on the local solana-cli on your host machine to create genesis currently. as a result, the local cli needs to be compatible -with the validator version you are deploying in monogon. This will be fixed in the future +## Tear down network (and start a new one) +``` +kubectl delete ns +``` +This will delete all services, secrets, replicasets, pods, etc. You can then deploy a new cluster as you want diff --git a/k8s-cluster/src/genesis.rs b/k8s-cluster/src/genesis.rs index b7a47568de0153..145384b3763e9a 100644 --- a/k8s-cluster/src/genesis.rs +++ b/k8s-cluster/src/genesis.rs @@ -26,10 +26,10 @@ pub const DEFAULT_WORD_COUNT: usize = 12; pub const DEFAULT_FAUCET_LAMPORTS: u64 = 500000000000000000; pub const DEFAULT_MAX_GENESIS_ARCHIVE_UNPACKED_SIZE: u64 = 1073741824; pub const DEFAULT_COMMISSION: u8 = 100; -pub const DEFAULT_INTERNAL_NODE_STAKE_SOL: f64 = 100.0; -pub const DEFAULT_INTERNAL_NODE_SOL: f64 = 1000.0; -pub const DEFAULT_BOOTSTRAP_NODE_STAKE_SOL: f64 = 100.0; -pub const DEFAULT_BOOTSTRAP_NODE_SOL: f64 = 1000.0; +pub const DEFAULT_INTERNAL_NODE_STAKE_SOL: f64 = 5.0; +pub const DEFAULT_INTERNAL_NODE_SOL: f64 = 100.0; +pub const DEFAULT_BOOTSTRAP_NODE_STAKE_SOL: f64 = 10.0; +pub const DEFAULT_BOOTSTRAP_NODE_SOL: f64 = 100.0; pub const DEFAULT_CLIENT_LAMPORTS_PER_SIGNATURE: u64 = 42; pub const DEFAULT_INTERNAL_NODE_SOL_TO_STAKE_SOL_RATIO: f64 = 10.0; diff --git a/k8s-cluster/src/scripts/bootstrap-startup-script.sh b/k8s-cluster/src/scripts/bootstrap-startup-script.sh index fa1fdef15e70ae..01f8c8dc6cb7c1 100755 --- a/k8s-cluster/src/scripts/bootstrap-startup-script.sh +++ b/k8s-cluster/src/scripts/bootstrap-startup-script.sh @@ -1,17 +1,13 @@ #!/bin/bash set -e -mkdir -p /home/solana/logs - # start faucet -nohup solana-faucet --keypair bootstrap-accounts/faucet.json >logs/faucet.log 2>&1 & +nohup solana-faucet --keypair bootstrap-accounts/faucet.json & # Start the bootstrap validator node # shellcheck disable=SC1091 source /home/solana/k8s-cluster-scripts/common.sh -# solana-ledger-tool -l ledger/ create-snapshot 0 -l ledger/ - if [[ "$SOLANA_GPU_MISSING" -eq 1 ]]; then echo "Testnet requires GPUs, but none were found! Aborting..." exit 1 @@ -137,7 +133,7 @@ args+=( --identity "$identity" \ --vote-account "$vote_account" \ --ledger ledger \ - --log logs/solana-validator.log \ + --log - \ --gossip-host "$MY_POD_IP" \ --gossip-port 8001 \ --rpc-port 8899 \ diff --git a/k8s-cluster/src/scripts/client-startup-script.sh b/k8s-cluster/src/scripts/client-startup-script.sh index a8ab138493bd39..5d13259fa070d0 100755 --- a/k8s-cluster/src/scripts/client-startup-script.sh +++ b/k8s-cluster/src/scripts/client-startup-script.sh @@ -1,7 +1,4 @@ #!/bin/bash -# set -e - -mkdir -p /home/solana/logs clientToRun="$1" benchTpsExtraArgs="$2" @@ -13,8 +10,7 @@ runtime_args=() while [[ -n $1 ]]; do if [[ ${1:0:1} = - ]]; then if [[ $1 = --target-node ]]; then - echo "--target-node not supported yet...not included" >> logs/client.log 2>&1 - # runtime_args+=("$1" "$2") + echo "WARNING: --target-node not supported yet...not included" shift 2 elif [[ $1 = --duration ]]; then runtime_args+=("$1" "$2") diff --git a/k8s-cluster/src/scripts/non-voting-validator-startup-script.sh b/k8s-cluster/src/scripts/non-voting-validator-startup-script.sh index 20e949b3f85238..b3f9d2e540f604 100755 --- a/k8s-cluster/src/scripts/non-voting-validator-startup-script.sh +++ b/k8s-cluster/src/scripts/non-voting-validator-startup-script.sh @@ -1,15 +1,7 @@ #!/bin/bash set -e -echo "in non-voting-validator startup script!" -mkdir -p /home/solana/logs - -echo "done decoding accounts. running faucet next..." -# sleep 3600 - -nohup solana-faucet --keypair non-voting-validator-accounts/faucet.json >logs/faucet.log 2>&1 & - -echo "faucet running" +nohup solana-faucet --keypair non-voting-validator-accounts/faucet.json & # Start Validator # shellcheck disable=SC1091 @@ -231,7 +223,7 @@ fi default_arg --identity "$identity" default_arg --ledger "$ledger_dir" -default_arg --log logs/solana-validator.log +default_arg --log - default_arg --full-rpc-api default_arg --no-incremental-snapshots default_arg --allow-private-addr diff --git a/k8s-cluster/src/scripts/validator-startup-script.sh b/k8s-cluster/src/scripts/validator-startup-script.sh index e4056a09c56834..d521e295609111 100755 --- a/k8s-cluster/src/scripts/validator-startup-script.sh +++ b/k8s-cluster/src/scripts/validator-startup-script.sh @@ -1,7 +1,5 @@ #!/bin/bash -mkdir -p /home/solana/logs - # Start Validator # shellcheck disable=SC1091 source /home/solana/k8s-cluster-scripts/common.sh @@ -240,7 +238,7 @@ fi default_arg --identity "$identity" default_arg --vote-account "$vote_account" default_arg --ledger "$ledger_dir" -default_arg --log logs/solana-validator.log +default_arg --log - default_arg --full-rpc-api default_arg --no-incremental-snapshots default_arg --allow-private-addr @@ -362,12 +360,6 @@ if [ "$vote_account_already_exists" != true ]; then fi fi -# sleep 3600 - -# $program "${args[@]}" & - -# sleep 3600 - echo "All commands succeeded. Running solana-validator next..." echo "Validator Args" From 06bd2601ecd0547bb1666f12c48e60e4f939a62c Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 12 Jan 2024 01:36:31 +0000 Subject: [PATCH 2/2] flip back default stake --- k8s-cluster/src/genesis.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/k8s-cluster/src/genesis.rs b/k8s-cluster/src/genesis.rs index 145384b3763e9a..b7a47568de0153 100644 --- a/k8s-cluster/src/genesis.rs +++ b/k8s-cluster/src/genesis.rs @@ -26,10 +26,10 @@ pub const DEFAULT_WORD_COUNT: usize = 12; pub const DEFAULT_FAUCET_LAMPORTS: u64 = 500000000000000000; pub const DEFAULT_MAX_GENESIS_ARCHIVE_UNPACKED_SIZE: u64 = 1073741824; pub const DEFAULT_COMMISSION: u8 = 100; -pub const DEFAULT_INTERNAL_NODE_STAKE_SOL: f64 = 5.0; -pub const DEFAULT_INTERNAL_NODE_SOL: f64 = 100.0; -pub const DEFAULT_BOOTSTRAP_NODE_STAKE_SOL: f64 = 10.0; -pub const DEFAULT_BOOTSTRAP_NODE_SOL: f64 = 100.0; +pub const DEFAULT_INTERNAL_NODE_STAKE_SOL: f64 = 100.0; +pub const DEFAULT_INTERNAL_NODE_SOL: f64 = 1000.0; +pub const DEFAULT_BOOTSTRAP_NODE_STAKE_SOL: f64 = 100.0; +pub const DEFAULT_BOOTSTRAP_NODE_SOL: f64 = 1000.0; pub const DEFAULT_CLIENT_LAMPORTS_PER_SIGNATURE: u64 = 42; pub const DEFAULT_INTERNAL_NODE_SOL_TO_STAKE_SOL_RATIO: f64 = 10.0;