Add testnet-tds support to testnet manager (#4762)
* Add testnet-tds support to testnet scripts
This commit is contained in:
parent
bc8f435d45
commit
1ca7e9f67b
|
@ -24,6 +24,9 @@ blockstreamer=false
|
|||
deployUpdateManifest=true
|
||||
fetchLogs=true
|
||||
maybeHashesPerTick=
|
||||
maybeStakeNodesInGenesisBlock=
|
||||
maybeExternalPrimordialAccountsFile=
|
||||
maybeLamports=
|
||||
|
||||
usage() {
|
||||
exitcode=0
|
||||
|
@ -62,12 +65,18 @@ Deploys a CD testnet
|
|||
-s - Skip start. Nodes will still be created or configured, but network software will not be started.
|
||||
-S - Stop network software without tearing down nodes.
|
||||
-f - Discard validator nodes that didn't bootup successfully
|
||||
-w - Skip time-consuming "bells and whistles" that are
|
||||
unnecessary for a high-node count demo testnet
|
||||
|
||||
--stake-internal-nodes NUM_LAMPORTS
|
||||
- Amount to stake internal nodes. If set, airdrops are disabled.
|
||||
--external-accounts-file FILE_PATH
|
||||
- Path to external Primordial Accounts file, if it exists.
|
||||
--hashes-per-tick NUM_HASHES|sleep|auto
|
||||
- Override the default --hashes-per-tick for the cluster
|
||||
|
||||
--lamports NUM_LAMPORTS
|
||||
- Specify the number of lamports to mint (default 100000000000000)
|
||||
--skip-deploy-update
|
||||
- If set, will skip software update deployment
|
||||
--skip-remote-log-retrieval
|
||||
- If set, will not fetch logs from remote nodes
|
||||
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
|
||||
metrics
|
||||
EOF
|
||||
|
@ -82,6 +91,21 @@ while [[ -n $1 ]]; do
|
|||
if [[ $1 = --hashes-per-tick ]]; then
|
||||
maybeHashesPerTick="$1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --lamports ]]; then
|
||||
maybeLamports="$1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --stake-internal-nodes ]]; then
|
||||
maybeStakeNodesInGenesisBlock="$1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --external-accounts-file ]]; then
|
||||
maybeExternalPrimordialAccountsFile="$1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --skip-deploy-update ]]; then
|
||||
deployUpdateManifest=false
|
||||
shift 1
|
||||
elif [[ $1 = --skip-remote-log-retrieval ]]; then
|
||||
fetchLogs=false
|
||||
shift 1
|
||||
else
|
||||
usage "Unknown long option: $1"
|
||||
fi
|
||||
|
@ -334,6 +358,19 @@ if ! $skipStart; then
|
|||
args+=(--deploy-update windows)
|
||||
fi
|
||||
|
||||
if [[ -n $maybeStakeNodesInGenesisBlock ]]; then
|
||||
# shellcheck disable=SC2206 # Do not want to quote $maybeStakeNodesInGenesisBlock
|
||||
args+=($maybeStakeNodesInGenesisBlock)
|
||||
fi
|
||||
if [[ -n $maybeExternalPrimordialAccountsFile ]]; then
|
||||
# shellcheck disable=SC2206 # Do not want to quote $maybeExternalPrimordialAccountsFile
|
||||
args+=($maybeExternalPrimordialAccountsFile)
|
||||
fi
|
||||
if [[ -n $maybeLamports ]]; then
|
||||
# shellcheck disable=SC2206 # Do not want to quote $maybeLamports
|
||||
args+=($maybeLamports)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086 # Don't want to double quote the $maybeXYZ variables
|
||||
time net/net.sh "${args[@]}"
|
||||
) || ok=false
|
||||
|
|
|
@ -44,6 +44,8 @@ steps:
|
|||
value: "testnet-beta-perf"
|
||||
- label: "testnet-demo"
|
||||
value: "testnet-demo"
|
||||
- label: "testnet-tds"
|
||||
value: "testnet-tds"
|
||||
- select: "Operation"
|
||||
key: "testnet-operation"
|
||||
default: "sanity-or-restart"
|
||||
|
@ -153,6 +155,11 @@ testnet-demo)
|
|||
: "${GCE_NODE_COUNT:=150}"
|
||||
: "${GCE_LOW_QUOTA_NODE_COUNT:=70}"
|
||||
;;
|
||||
testnet-tds)
|
||||
CHANNEL_OR_TAG=beta
|
||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||
: "${GCE_NODE_COUNT:=3}"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid TESTNET=$TESTNET"
|
||||
exit 1
|
||||
|
@ -287,6 +294,14 @@ sanity() {
|
|||
$ok
|
||||
)
|
||||
;;
|
||||
testnet-tds)
|
||||
(
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-sanity.sh tds-solana-com gce "${GCE_ZONES[0]}" -f
|
||||
)
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid TESTNET=$TESTNET"
|
||||
exit 1
|
||||
|
@ -424,7 +439,9 @@ deploy() {
|
|||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-deploy.sh -p demo-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P -u -f -w \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P -u -f \
|
||||
--skip-deploy-update \
|
||||
--skip-remote-log-retrieval \
|
||||
-a demo-testnet-solana-com \
|
||||
${skipCreate:+-e} \
|
||||
${maybeSkipStart:+-s} \
|
||||
|
@ -436,7 +453,9 @@ deploy() {
|
|||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-deploy.sh -p demo-testnet-solana-com2 -C gce ${GCE_LOW_QUOTA_ZONE_ARGS[@]} \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_LOW_QUOTA_NODE_COUNT" -c 0 -P -f -x -w \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_LOW_QUOTA_NODE_COUNT" -c 0 -P -f -x \
|
||||
--skip-deploy-update \
|
||||
--skip-remote-log-retrieval \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
|
@ -444,6 +463,28 @@ deploy() {
|
|||
fi
|
||||
)
|
||||
;;
|
||||
testnet-tds)
|
||||
(
|
||||
set -x
|
||||
# TODO: Should we spread the few nodes around multiple zones?
|
||||
# shellcheck disable=SC2068
|
||||
# shellcheck disable=SC2086
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-deploy.sh -p tds-solana-com -C gce ${GCE_ZONE_ARGS[0]} \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 1 -P -u \
|
||||
-a tds-solana-com --hashes-per-tick auto \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D} \
|
||||
--stake-internal-nodes 1000000000000 \
|
||||
--external-accounts-file /tmp/stakes.yml \
|
||||
--lamports 8589934592000000000 \
|
||||
--skip-deploy-update
|
||||
|
||||
)
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid TESTNET=$TESTNET"
|
||||
exit 1
|
||||
|
|
39
net/net.sh
39
net/net.sh
|
@ -50,17 +50,16 @@ Operate a configured testnet
|
|||
-c bench-tps=2="--tx_count 25000"
|
||||
This will start 2 bench-tps clients, and supply "--tx_count 25000"
|
||||
to the bench-tps client.
|
||||
-n NUM_FULL_NODES - Number of fullnodes to apply command to.
|
||||
|
||||
--hashes-per-tick NUM_HASHES|sleep|auto
|
||||
- Override the default --hashes-per-tick for the cluster
|
||||
-n NUM_FULL_NODES - Number of fullnodes to apply command to.
|
||||
|
||||
-x Accounts and Stakes for external nodes
|
||||
- A YML file with a list of account pubkeys and corresponding stakes
|
||||
for external nodes
|
||||
-s Num lamports per node in genesis block
|
||||
- Create account keypairs for internal nodes and assign these many lamports
|
||||
|
||||
--lamports NUM_LAMPORTS_TO_MINT
|
||||
- Override the default 100000000000000 lamports minted in genesis
|
||||
--stake-internal-nodes NUM_LAMPORTS_PER_NODE
|
||||
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
|
||||
--external-accounts-file FILE_PATH
|
||||
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
|
||||
sanity/start/update-specific options:
|
||||
-F - Discard validator nodes that didn't bootup successfully
|
||||
-o noLedgerVerify - Skip ledger verification
|
||||
|
@ -96,6 +95,7 @@ failOnValidatorBootupFailure=true
|
|||
genesisOptions=
|
||||
numFullnodesRequested=
|
||||
externalPrimordialAccountsFile=
|
||||
remoteExternalPrimordialAccountsFile=/tmp/external-primodial-accounts.yml
|
||||
stakeNodesInGenesisBlock=
|
||||
|
||||
command=$1
|
||||
|
@ -111,9 +111,18 @@ while [[ -n $1 ]]; do
|
|||
elif [[ $1 = --target-lamports-per-signature ]]; then
|
||||
genesisOptions="$genesisOptions $1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --lamports ]]; then
|
||||
genesisOptions="$genesisOptions $1 $2"
|
||||
shift 2
|
||||
elif [[ $1 = --deploy-update ]]; then
|
||||
updatePlatforms="$updatePlatforms $2"
|
||||
shift 2
|
||||
elif [[ $1 = --stake-internal-nodes ]]; then
|
||||
stakeNodesInGenesisBlock="$2"
|
||||
shift 2
|
||||
elif [[ $1 = --external-accounts-file ]]; then
|
||||
externalPrimordialAccountsFile="$2"
|
||||
shift 2
|
||||
else
|
||||
usage "Unknown long option: $1"
|
||||
fi
|
||||
|
@ -123,7 +132,7 @@ while [[ -n $1 ]]; do
|
|||
fi
|
||||
done
|
||||
|
||||
while getopts "h?T:t:o:f:rD:c:Fn:i:x:s:" opt "${shortArgs[@]}"; do
|
||||
while getopts "h?T:t:o:f:rD:c:Fn:i:" opt "${shortArgs[@]}"; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
|
@ -202,12 +211,6 @@ while getopts "h?T:t:o:f:rD:c:Fn:i:x:s:" opt "${shortArgs[@]}"; do
|
|||
F)
|
||||
failOnValidatorBootupFailure=false
|
||||
;;
|
||||
x)
|
||||
externalPrimordialAccountsFile=$OPTARG
|
||||
;;
|
||||
s)
|
||||
stakeNodesInGenesisBlock=$OPTARG
|
||||
;;
|
||||
i)
|
||||
nodeAddress=$OPTARG
|
||||
;;
|
||||
|
@ -321,7 +324,7 @@ startBootstrapLeader() {
|
|||
set -x
|
||||
startCommon "$ipAddress" || exit 1
|
||||
[[ -z "$externalPrimordialAccountsFile" ]] || rsync -vPrc -e "ssh ${sshOptions[*]}" "$externalPrimordialAccountsFile" \
|
||||
"$ipAddress:~/solana/config/external-primodial-accounts.yml"
|
||||
"$ipAddress:$remoteExternalPrimordialAccountsFile"
|
||||
case $deployMethod in
|
||||
tar)
|
||||
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/solana-release/bin/* "$ipAddress:~/.cargo/bin/"
|
||||
|
@ -343,7 +346,7 @@ startBootstrapLeader() {
|
|||
\"$RUST_LOG\" \
|
||||
$skipSetup \
|
||||
$failOnValidatorBootupFailure \
|
||||
\"$externalPrimordialAccountsFile\" \
|
||||
\"$remoteExternalPrimordialAccountsFile\" \
|
||||
\"$stakeNodesInGenesisBlock\" \
|
||||
$nodeIndex \
|
||||
$numBenchTpsClients \"$benchTpsExtraArgs\" \
|
||||
|
@ -377,7 +380,7 @@ startNode() {
|
|||
\"$RUST_LOG\" \
|
||||
$skipSetup \
|
||||
$failOnValidatorBootupFailure \
|
||||
\"$externalPrimordialAccountsFile\" \
|
||||
\"$remoteExternalPrimordialAccountsFile\" \
|
||||
\"$stakeNodesInGenesisBlock\" \
|
||||
$nodeIndex \
|
||||
\"$genesisOptions\" \
|
||||
|
|
Loading…
Reference in New Issue