Enable booting testnet validators without tower required (#19298)
This commit is contained in:
parent
5d380b24a8
commit
7d135f185c
|
@ -20,6 +20,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
no_restart=0
|
no_restart=0
|
||||||
|
maybeRequireTower=true
|
||||||
|
|
||||||
args=()
|
args=()
|
||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
|
@ -84,6 +85,9 @@ while [[ -n $1 ]]; do
|
||||||
elif [[ $1 == --accounts-db-skip-shrink ]]; then
|
elif [[ $1 == --accounts-db-skip-shrink ]]; then
|
||||||
args+=("$1")
|
args+=("$1")
|
||||||
shift
|
shift
|
||||||
|
elif [[ $1 == --skip-require-tower ]]; then
|
||||||
|
maybeRequireTower=false
|
||||||
|
shift
|
||||||
else
|
else
|
||||||
echo "Unknown argument: $1"
|
echo "Unknown argument: $1"
|
||||||
$program --help
|
$program --help
|
||||||
|
@ -108,8 +112,11 @@ ledger_dir="$SOLANA_CONFIG_DIR"/bootstrap-validator
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ $maybeRequireTower = true ]]; then
|
||||||
|
args+=(--require-tower)
|
||||||
|
fi
|
||||||
|
|
||||||
args+=(
|
args+=(
|
||||||
--require-tower
|
|
||||||
--ledger "$ledger_dir"
|
--ledger "$ledger_dir"
|
||||||
--rpc-port 8899
|
--rpc-port 8899
|
||||||
--snapshot-interval-slots 200
|
--snapshot-interval-slots 200
|
||||||
|
|
|
@ -46,6 +46,8 @@ EOF
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maybeRequireTower=true
|
||||||
|
|
||||||
positional_args=()
|
positional_args=()
|
||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
if [[ ${1:0:1} = - ]]; then
|
if [[ ${1:0:1} = - ]]; then
|
||||||
|
@ -163,6 +165,9 @@ while [[ -n $1 ]]; do
|
||||||
elif [[ $1 == --accounts-db-skip-shrink ]]; then
|
elif [[ $1 == --accounts-db-skip-shrink ]]; then
|
||||||
args+=("$1")
|
args+=("$1")
|
||||||
shift
|
shift
|
||||||
|
elif [[ $1 == --skip-require-tower ]]; then
|
||||||
|
maybeRequireTower=false
|
||||||
|
shift
|
||||||
elif [[ $1 = -h ]]; then
|
elif [[ $1 = -h ]]; then
|
||||||
usage "$@"
|
usage "$@"
|
||||||
else
|
else
|
||||||
|
@ -235,7 +240,10 @@ default_arg --identity "$identity"
|
||||||
default_arg --vote-account "$vote_account"
|
default_arg --vote-account "$vote_account"
|
||||||
default_arg --ledger "$ledger_dir"
|
default_arg --ledger "$ledger_dir"
|
||||||
default_arg --log -
|
default_arg --log -
|
||||||
|
|
||||||
|
if [[ $maybeRequireTower = true ]]; then
|
||||||
default_arg --require-tower
|
default_arg --require-tower
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $SOLANA_CUDA ]]; then
|
if [[ -n $SOLANA_CUDA ]]; then
|
||||||
program=$solana_validator_cuda
|
program=$solana_validator_cuda
|
||||||
|
|
|
@ -307,7 +307,7 @@ startBootstrapLeader() {
|
||||||
$nodeIndex \
|
$nodeIndex \
|
||||||
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
|
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
|
||||||
\"$genesisOptions\" \
|
\"$genesisOptions\" \
|
||||||
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority $maybeAllowPrivateAddr $maybeAccountsDbSkipShrink\" \
|
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority $maybeAllowPrivateAddr $maybeAccountsDbSkipShrink $maybeSkipRequireTower\" \
|
||||||
\"$gpuMode\" \
|
\"$gpuMode\" \
|
||||||
\"$maybeWarpSlot\" \
|
\"$maybeWarpSlot\" \
|
||||||
\"$waitForNodeInit\" \
|
\"$waitForNodeInit\" \
|
||||||
|
@ -378,7 +378,7 @@ startNode() {
|
||||||
$nodeIndex \
|
$nodeIndex \
|
||||||
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
|
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
|
||||||
\"$genesisOptions\" \
|
\"$genesisOptions\" \
|
||||||
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority $maybeAllowPrivateAddr $maybeAccountsDbSkipShrink\" \
|
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority $maybeAllowPrivateAddr $maybeAccountsDbSkipShrink $maybeSkipRequireTower\" \
|
||||||
\"$gpuMode\" \
|
\"$gpuMode\" \
|
||||||
\"$maybeWarpSlot\" \
|
\"$maybeWarpSlot\" \
|
||||||
\"$waitForNodeInit\" \
|
\"$waitForNodeInit\" \
|
||||||
|
@ -777,6 +777,7 @@ maybeDisableAirdrops=""
|
||||||
maybeWaitForSupermajority=""
|
maybeWaitForSupermajority=""
|
||||||
maybeAllowPrivateAddr=""
|
maybeAllowPrivateAddr=""
|
||||||
maybeAccountsDbSkipShrink=""
|
maybeAccountsDbSkipShrink=""
|
||||||
|
maybeSkipRequireTower=""
|
||||||
debugBuild=false
|
debugBuild=false
|
||||||
doBuild=true
|
doBuild=true
|
||||||
gpuMode=auto
|
gpuMode=auto
|
||||||
|
@ -909,6 +910,9 @@ while [[ -n $1 ]]; do
|
||||||
elif [[ $1 = --accounts-db-skip-shrink ]]; then
|
elif [[ $1 = --accounts-db-skip-shrink ]]; then
|
||||||
maybeAccountsDbSkipShrink="$1"
|
maybeAccountsDbSkipShrink="$1"
|
||||||
shift 1
|
shift 1
|
||||||
|
elif [[ $1 = --skip-require-tower ]]; then
|
||||||
|
maybeSkipRequireTower="$1"
|
||||||
|
shift 1
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue