Plumb --no-snapshot in from CI (#5077)
* Plumb --no-snapshot in from CI
This commit is contained in:
@ -29,6 +29,7 @@ maybeExternalPrimordialAccountsFile=
|
|||||||
maybeLamports=
|
maybeLamports=
|
||||||
maybeLetsEncrypt=
|
maybeLetsEncrypt=
|
||||||
maybeFullnodeAdditionalDiskSize=
|
maybeFullnodeAdditionalDiskSize=
|
||||||
|
maybeNoSnapshot=
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
exitcode=0
|
exitcode=0
|
||||||
@ -83,6 +84,8 @@ Deploys a CD testnet
|
|||||||
- Attempt to generate a TLS certificate using this DNS name
|
- Attempt to generate a TLS certificate using this DNS name
|
||||||
--fullnode-additional-disk-size-gb [number]
|
--fullnode-additional-disk-size-gb [number]
|
||||||
- Size of additional disk in GB for all fullnodes
|
- Size of additional disk in GB for all fullnodes
|
||||||
|
--no-snapshot
|
||||||
|
- If set, disables booting validators from a snapshot
|
||||||
|
|
||||||
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
|
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
|
||||||
metrics
|
metrics
|
||||||
@ -122,6 +125,9 @@ while [[ -n $1 ]]; do
|
|||||||
elif [[ $1 == --machine-type* ]]; then # Bypass quoted long args for GPUs
|
elif [[ $1 == --machine-type* ]]; then # Bypass quoted long args for GPUs
|
||||||
shortArgs+=("$1")
|
shortArgs+=("$1")
|
||||||
shift
|
shift
|
||||||
|
elif [[ $1 = --no-snapshot ]]; then
|
||||||
|
maybeNoSnapshot="$1"
|
||||||
|
shift 1
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
fi
|
fi
|
||||||
@ -396,6 +402,11 @@ if ! $skipStart; then
|
|||||||
args+=($maybeLamports)
|
args+=($maybeLamports)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n $maybeNoSnapshot ]]; then
|
||||||
|
# shellcheck disable=SC2206
|
||||||
|
args+=($maybeNoSnapshot)
|
||||||
|
fi
|
||||||
|
|
||||||
time net/net.sh "${args[@]}"
|
time net/net.sh "${args[@]}"
|
||||||
) || ok=false
|
) || ok=false
|
||||||
|
|
||||||
|
@ -497,7 +497,8 @@ deploy() {
|
|||||||
--external-accounts-file "$EXTERNAL_ACCOUNTS_FILE" \
|
--external-accounts-file "$EXTERNAL_ACCOUNTS_FILE" \
|
||||||
--lamports 8589934592000000000 \
|
--lamports 8589934592000000000 \
|
||||||
--skip-deploy-update \
|
--skip-deploy-update \
|
||||||
--fullnode-additional-disk-size-gb 32000
|
--fullnode-additional-disk-size-gb 32000 \
|
||||||
|
--no-snapshot
|
||||||
|
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
@ -60,6 +60,8 @@ Operate a configured testnet
|
|||||||
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
|
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
|
||||||
--external-accounts-file FILE_PATH
|
--external-accounts-file FILE_PATH
|
||||||
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
|
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
|
||||||
|
--no-snapshot
|
||||||
|
- If set, disables booting validators from a snapshot
|
||||||
sanity/start/update-specific options:
|
sanity/start/update-specific options:
|
||||||
-F - Discard validator nodes that didn't bootup successfully
|
-F - Discard validator nodes that didn't bootup successfully
|
||||||
-o noLedgerVerify - Skip ledger verification
|
-o noLedgerVerify - Skip ledger verification
|
||||||
@ -97,6 +99,7 @@ numFullnodesRequested=
|
|||||||
externalPrimordialAccountsFile=
|
externalPrimordialAccountsFile=
|
||||||
remoteExternalPrimordialAccountsFile=
|
remoteExternalPrimordialAccountsFile=
|
||||||
stakeNodesInGenesisBlock=
|
stakeNodesInGenesisBlock=
|
||||||
|
maybeNoSnapshot=""
|
||||||
|
|
||||||
command=$1
|
command=$1
|
||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
@ -114,6 +117,9 @@ while [[ -n $1 ]]; do
|
|||||||
elif [[ $1 = --lamports ]]; then
|
elif [[ $1 = --lamports ]]; then
|
||||||
genesisOptions="$genesisOptions $1 $2"
|
genesisOptions="$genesisOptions $1 $2"
|
||||||
shift 2
|
shift 2
|
||||||
|
elif [[ $1 = --no-snapshot ]]; then
|
||||||
|
maybeNoSnapshot="$1"
|
||||||
|
shift 1
|
||||||
elif [[ $1 = --deploy-update ]]; then
|
elif [[ $1 = --deploy-update ]]; then
|
||||||
updatePlatforms="$updatePlatforms $2"
|
updatePlatforms="$updatePlatforms $2"
|
||||||
shift 2
|
shift 2
|
||||||
@ -353,6 +359,7 @@ startBootstrapLeader() {
|
|||||||
$numBenchTpsClients \"$benchTpsExtraArgs\" \
|
$numBenchTpsClients \"$benchTpsExtraArgs\" \
|
||||||
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
|
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
|
||||||
\"$genesisOptions\" \
|
\"$genesisOptions\" \
|
||||||
|
$maybeNoSnapshot \
|
||||||
"
|
"
|
||||||
) >> "$logFile" 2>&1 || {
|
) >> "$logFile" 2>&1 || {
|
||||||
cat "$logFile"
|
cat "$logFile"
|
||||||
@ -402,6 +409,7 @@ startNode() {
|
|||||||
\"$stakeNodesInGenesisBlock\" \
|
\"$stakeNodesInGenesisBlock\" \
|
||||||
$nodeIndex \
|
$nodeIndex \
|
||||||
\"$genesisOptions\" \
|
\"$genesisOptions\" \
|
||||||
|
$maybeNoSnapshot \
|
||||||
"
|
"
|
||||||
) >> "$logFile" 2>&1 &
|
) >> "$logFile" 2>&1 &
|
||||||
declare pid=$!
|
declare pid=$!
|
||||||
|
@ -19,6 +19,7 @@ benchTpsExtraArgs="${12}"
|
|||||||
numBenchExchangeClients="${13}"
|
numBenchExchangeClients="${13}"
|
||||||
benchExchangeExtraArgs="${14}"
|
benchExchangeExtraArgs="${14}"
|
||||||
genesisOptions="${15}"
|
genesisOptions="${15}"
|
||||||
|
noSnapshot="${16}"
|
||||||
set +x
|
set +x
|
||||||
export RUST_LOG
|
export RUST_LOG
|
||||||
|
|
||||||
@ -170,6 +171,7 @@ local|tar)
|
|||||||
args+=(--no-airdrop)
|
args+=(--no-airdrop)
|
||||||
fi
|
fi
|
||||||
args+=(--init-complete-file "$initCompleteFile")
|
args+=(--init-complete-file "$initCompleteFile")
|
||||||
|
args+=("$noSnapshot")
|
||||||
nohup ./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
|
nohup ./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
|
||||||
waitForNodeToInit
|
waitForNodeToInit
|
||||||
;;
|
;;
|
||||||
@ -247,6 +249,7 @@ local|tar)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
args+=(--init-complete-file "$initCompleteFile")
|
args+=(--init-complete-file "$initCompleteFile")
|
||||||
|
args+=("$noSnapshot")
|
||||||
nohup ./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
|
nohup ./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
|
||||||
waitForNodeToInit
|
waitForNodeToInit
|
||||||
;;
|
;;
|
||||||
@ -264,6 +267,7 @@ local|tar)
|
|||||||
if [[ $skipSetup != true ]]; then
|
if [[ $skipSetup != true ]]; then
|
||||||
./multinode-demo/clear-config.sh
|
./multinode-demo/clear-config.sh
|
||||||
fi
|
fi
|
||||||
|
args+=("$noSnapshot")
|
||||||
nohup ./multinode-demo/replicator.sh "${args[@]}" > fullnode.log 2>&1 &
|
nohup ./multinode-demo/replicator.sh "${args[@]}" > fullnode.log 2>&1 &
|
||||||
sleep 1
|
sleep 1
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user