Rename bootstrap leader (#7906)

* Rename bootstrap leader to bootstrap validator

It's a normal validator as soon as other validators enter the
leader schedule.

* cargo fmt

* Fix build

Thanks @CriesofCarrots!
This commit is contained in:
Greg Fitzgerald
2020-01-22 09:22:09 -07:00
committed by GitHub
parent 65f5885bce
commit 3aabeb2b81
21 changed files with 158 additions and 155 deletions

View File

@@ -152,7 +152,7 @@ Manage testnet instances
Only supported on GCE.
--dedicated - Use dedicated instances for additional validators
(by default preemptible instances are used to reduce
cost). Note that the bootstrap leader, archiver,
cost). Note that the bootstrap validator, archiver,
blockstreamer and client nodes are always dedicated.
--self-destruct-hours [number]
- Specify lifetime of the allocated instances in hours. 0 to
@@ -514,12 +514,12 @@ EOF
}
if $externalNodes; then
echo "Bootstrap leader is already configured"
echo "Bootstrap validator is already configured"
else
echo "Looking for bootstrap leader instance..."
cloud_FindInstance "$prefix-bootstrap-leader"
echo "Looking for bootstrap validator instance..."
cloud_FindInstance "$prefix-bootstrap-validator"
[[ ${#instances[@]} -eq 1 ]] || {
echo "Unable to find bootstrap leader"
echo "Unable to find bootstrap validator"
exit 1
}
@@ -649,7 +649,7 @@ create)
printNetworkInfo() {
cat <<EOF
==[ Network composition ]===============================================================
Bootstrap leader = $bootstrapLeaderMachineType (GPU=$enableGpu)
Bootstrap validator = $bootstrapLeaderMachineType (GPU=$enableGpu)
Additional validators = $additionalValidatorCount x $validatorMachineType
Client(s) = $clientNodeCount x $clientMachineType
Archivers(s) = $archiverNodeCount x $archiverMachineType
@@ -812,9 +812,9 @@ EOF
done
if $externalNodes; then
echo "Bootstrap leader is already configured"
echo "Bootstrap validator is already configured"
else
cloud_CreateInstances "$prefix" "$prefix-bootstrap-leader" 1 \
cloud_CreateInstances "$prefix" "$prefix-bootstrap-validator" 1 \
"$enableGpu" "$bootstrapLeaderMachineType" "${zones[0]}" "$validatorBootDiskSizeInGb" \
"$startupScript" "$bootstrapLeaderAddress" "$bootDiskType" "$validatorAdditionalDiskSizeInGb" \
"never preemptible" "$sshPrivateKey"
@@ -890,7 +890,7 @@ info)
echo "-------------------+-----------------+-----------------+--------------"
fi
nodeType=bootstrap-leader
nodeType=bootstrap-validator
if [[ ${#validatorIpList[@]} -gt 0 ]]; then
for i in $(seq 0 $(( ${#validatorIpList[@]} - 1)) ); do
ipAddress=${validatorIpList[$i]}

View File

@@ -472,7 +472,7 @@ startBootstrapLeader() {
declare ipAddress=$1
declare nodeIndex="$2"
declare logFile="$3"
echo "--- Starting bootstrap leader: $ipAddress"
echo "--- Starting bootstrap validator: $ipAddress"
echo "start log: $logFile"
# Deploy local binaries to bootstrap validator. Other validators and clients later fetch the
@@ -501,7 +501,7 @@ startBootstrapLeader() {
ssh "${sshOptions[@]}" -n "$ipAddress" \
"./solana/net/remote/remote-node.sh \
$deployMethod \
bootstrap-leader \
bootstrap-validator \
$entrypointIp \
$((${#validatorIpList[@]} + ${#blockstreamerIpList[@]} + ${#archiverIpList[@]})) \
\"$RUST_LOG\" \
@@ -781,7 +781,7 @@ deploy() {
if $bootstrapLeader; then
SECONDS=0
declare bootstrapNodeDeployTime=
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-leader-$ipAddress.log"
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-validator-$ipAddress.log"
bootstrapNodeDeployTime=$SECONDS
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"
@@ -819,7 +819,7 @@ deploy() {
annotateBlockexplorerUrl
sanity skipBlockstreamerSanity # skip sanity on blockstreamer node, it may not
# have caught up to the bootstrap leader yet
# have caught up to the bootstrap validator yet
echo "--- Sleeping $clientDelayStart seconds after validators are started before starting clients"
sleep "$clientDelayStart"
@@ -861,7 +861,7 @@ deploy() {
echo
echo "+++ Deployment Successful"
echo "Bootstrap leader deployment took $bootstrapNodeDeployTime seconds"
echo "Bootstrap validator deployment took $bootstrapNodeDeployTime seconds"
echo "Additional validator deployment (${#validatorIpList[@]} validators, ${#blockstreamerIpList[@]} blockstreamer nodes, ${#archiverIpList[@]} archivers) took $additionalNodeDeployTime seconds"
echo "Client deployment (${#clientIpList[@]} instances) took $clientDeployTime seconds"
echo "Network start logs in $netLogDir"

View File

@@ -144,7 +144,7 @@ cat >> ~/solana/on-reboot <<EOF
EOF
case $nodeType in
bootstrap-leader)
bootstrap-validator)
set -x
if [[ $skipSetup != true ]]; then
clear_config_dir "$SOLANA_CONFIG_DIR"
@@ -213,10 +213,10 @@ EOF
fi
if [[ -n $internalNodesStakeLamports ]]; then
args+=(--bootstrap-leader-stake-lamports "$internalNodesStakeLamports")
args+=(--bootstrap-validator-stake-lamports "$internalNodesStakeLamports")
fi
if [[ -n $internalNodesLamports ]]; then
args+=(--bootstrap-leader-lamports "$internalNodesLamports")
args+=(--bootstrap-validator-lamports "$internalNodesLamports")
fi
# shellcheck disable=SC2206 # Do not want to quote $genesisOptions
args+=($genesisOptions)
@@ -224,8 +224,8 @@ EOF
if [[ -f net/keypairs/mint.json ]]; then
export FAUCET_KEYPAIR=net/keypairs/mint.json
fi
if [[ -f net/keypairs/bootstrap-leader-identity.json ]]; then
export BOOTSTRAP_LEADER_IDENTITY_KEYPAIR=net/keypairs/bootstrap-leader-identity.json
if [[ -f net/keypairs/bootstrap-validator-identity.json ]]; then
export BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR=net/keypairs/bootstrap-validator-identity.json
fi
multinode-demo/setup.sh "${args[@]}"
fi
@@ -244,7 +244,7 @@ EOF
args+=($extraNodeArgs)
cat >> ~/solana/on-reboot <<EOF
nohup ./multinode-demo/bootstrap-leader.sh ${args[@]} > validator.log.\$now 2>&1 &
nohup ./multinode-demo/bootstrap-validator.sh ${args[@]} > validator.log.\$now 2>&1 &
pid=\$!
oom_score_adj "\$pid" 1000
disown
@@ -254,7 +254,7 @@ EOF
if [[ $skipSetup != true ]]; then
solana --url http://"$entrypointIp":8899 \
--keypair ~/solana/config/bootstrap-leader/identity-keypair.json \
--keypair ~/solana/config/bootstrap-validator/identity-keypair.json \
validator-info publish "$(hostname)" -n team/solana --force || true
fi
;;
@@ -373,7 +373,7 @@ EOF
waitForNodeToInit
if [[ $skipSetup != true && $nodeType != blockstreamer ]]; then
# Wait for the validator to catch up to the bootstrap leader before
# Wait for the validator to catch up to the bootstrap validator before
# delegating stake to it
solana --url http://"$entrypointIp":8899 catchup config/validator-identity.json