multinode-demo/faucet.sh is no longer required (#10129)
This commit is contained in:
parent
36627fb8b3
commit
f33688361c
|
@ -73,16 +73,15 @@ source scripts/configure-metrics.sh
|
||||||
source multinode-demo/common.sh
|
source multinode-demo/common.sh
|
||||||
|
|
||||||
nodes=(
|
nodes=(
|
||||||
"multinode-demo/faucet.sh"
|
|
||||||
"multinode-demo/bootstrap-validator.sh \
|
"multinode-demo/bootstrap-validator.sh \
|
||||||
--no-restart \
|
--no-restart \
|
||||||
--init-complete-file init-complete-node1.log \
|
--init-complete-file init-complete-node0.log \
|
||||||
--dynamic-port-range 8000-8050"
|
--dynamic-port-range 8000-8050"
|
||||||
"multinode-demo/validator.sh \
|
"multinode-demo/validator.sh \
|
||||||
--enable-rpc-exit \
|
--enable-rpc-exit \
|
||||||
--no-restart \
|
--no-restart \
|
||||||
--dynamic-port-range 8050-8100
|
--dynamic-port-range 8050-8100
|
||||||
--init-complete-file init-complete-node2.log \
|
--init-complete-file init-complete-node1.log \
|
||||||
--rpc-port 18899"
|
--rpc-port 18899"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ if [[ extraNodes -gt 0 ]]; then
|
||||||
--no-restart \
|
--no-restart \
|
||||||
--dynamic-port-range $portStart-$portEnd
|
--dynamic-port-range $portStart-$portEnd
|
||||||
--label dyn$i \
|
--label dyn$i \
|
||||||
--init-complete-file init-complete-node$((2 + i)).log"
|
--init-complete-file init-complete-node$((1 + i)).log"
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -160,11 +159,10 @@ startNodes() {
|
||||||
for i in $(seq 0 $((${#nodes[@]} - 1))); do
|
for i in $(seq 0 $((${#nodes[@]} - 1))); do
|
||||||
declare cmd=${nodes[$i]}
|
declare cmd=${nodes[$i]}
|
||||||
|
|
||||||
if [[ "$i" -ne 0 ]]; then # 0 == faucet, skip it
|
|
||||||
declare initCompleteFile="init-complete-node$i.log"
|
declare initCompleteFile="init-complete-node$i.log"
|
||||||
rm -f "$initCompleteFile"
|
rm -f "$initCompleteFile"
|
||||||
initCompleteFiles+=("$initCompleteFile")
|
initCompleteFiles+=("$initCompleteFile")
|
||||||
fi
|
|
||||||
startNode "$i" "$cmd $maybeExpectedGenesisHash"
|
startNode "$i" "$cmd $maybeExpectedGenesisHash"
|
||||||
if $addLogs; then
|
if $addLogs; then
|
||||||
logs+=("$(getNodeLogFile "$i" "$cmd")")
|
logs+=("$(getNodeLogFile "$i" "$cmd")")
|
||||||
|
|
|
@ -38,6 +38,7 @@ common_args=()
|
||||||
label=
|
label=
|
||||||
airdrops_enabled=1
|
airdrops_enabled=1
|
||||||
maybe_force=
|
maybe_force=
|
||||||
|
keypair=
|
||||||
|
|
||||||
positional_args=()
|
positional_args=()
|
||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
|
@ -46,7 +47,7 @@ while [[ -n $1 ]]; do
|
||||||
label="-$2"
|
label="-$2"
|
||||||
shift 2
|
shift 2
|
||||||
elif [[ $1 = --keypair || $1 = -k ]]; then
|
elif [[ $1 = --keypair || $1 = -k ]]; then
|
||||||
common_args+=("$1" "$2")
|
keypair="$2"
|
||||||
shift 2
|
shift 2
|
||||||
elif [[ $1 = --force ]]; then
|
elif [[ $1 = --force ]]; then
|
||||||
maybe_force=--force
|
maybe_force=--force
|
||||||
|
@ -94,7 +95,15 @@ if [[ -f $stake_account ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
$solana_cli "${common_args[@]}" airdrop "$stake_sol"
|
if [[ -z $keypair ]]; then
|
||||||
|
echo "--keypair argument must be provided"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
$solana_cli "${common_args[@]}" --keypair "$SOLANA_CONFIG_DIR/faucet.json" transfer "$keypair" "$stake_sol"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $keypair ]]; then
|
||||||
|
common_args+=(--keypair "$keypair")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$solana_keygen new --no-passphrase -so "$stake_account"
|
$solana_keygen new --no-passphrase -so "$stake_account"
|
||||||
|
|
|
@ -265,7 +265,10 @@ setup_validator_accounts() {
|
||||||
if ! wallet vote-account "$vote_account"; then
|
if ! wallet vote-account "$vote_account"; then
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
echo "Adding $node_sol to validator identity account:"
|
echo "Adding $node_sol to validator identity account:"
|
||||||
wallet airdrop "$node_sol" || return $?
|
(
|
||||||
|
set -x
|
||||||
|
$solana_cli --keypair "$SOLANA_CONFIG_DIR/faucet.json" --url "$rpc_url" transfer "$identity" "$node_sol"
|
||||||
|
) || return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating validator vote account"
|
echo "Creating validator vote account"
|
||||||
|
|
|
@ -67,7 +67,7 @@ Operate a configured testnet
|
||||||
--hashes-per-tick NUM_HASHES|sleep|auto
|
--hashes-per-tick NUM_HASHES|sleep|auto
|
||||||
- Override the default --hashes-per-tick for the cluster
|
- Override the default --hashes-per-tick for the cluster
|
||||||
--no-airdrop
|
--no-airdrop
|
||||||
- If set, disables airdrops. Nodes must be funded in genesis config when airdrops are disabled.
|
- If set, disables the faucet keypair. Nodes must be funded in genesis config
|
||||||
--faucet-lamports NUM_LAMPORTS_TO_MINT
|
--faucet-lamports NUM_LAMPORTS_TO_MINT
|
||||||
- Override the default 500000000000000000 lamports minted in genesis
|
- Override the default 500000000000000000 lamports minted in genesis
|
||||||
--internal-nodes-stake-lamports NUM_LAMPORTS_PER_NODE
|
--internal-nodes-stake-lamports NUM_LAMPORTS_PER_NODE
|
||||||
|
|
|
@ -271,6 +271,9 @@ EOF
|
||||||
fi
|
fi
|
||||||
net/scripts/rsync-retry.sh -vPrc \
|
net/scripts/rsync-retry.sh -vPrc \
|
||||||
"$entrypointIp":~/solana/config/shred-version config/shred-version
|
"$entrypointIp":~/solana/config/shred-version config/shred-version
|
||||||
|
|
||||||
|
net/scripts/rsync-retry.sh -vPrc \
|
||||||
|
"$entrypointIp":~/solana/config/faucet.json config/faucet.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
|
@ -310,7 +313,6 @@ EOF
|
||||||
# Typically the blockstreamer node has a static IP/DNS name for hosting
|
# Typically the blockstreamer node has a static IP/DNS name for hosting
|
||||||
# the blockexplorer web app, and is a location that somebody would expect
|
# the blockexplorer web app, and is a location that somebody would expect
|
||||||
# to be able to airdrop from
|
# to be able to airdrop from
|
||||||
scp "$entrypointIp":~/solana/config/faucet.json config/
|
|
||||||
if [[ $airdropsEnabled = true ]]; then
|
if [[ $airdropsEnabled = true ]]; then
|
||||||
cat >> ~/solana/on-reboot <<EOF
|
cat >> ~/solana/on-reboot <<EOF
|
||||||
multinode-demo/faucet.sh > faucet.log 2>&1 &
|
multinode-demo/faucet.sh > faucet.log 2>&1 &
|
||||||
|
|
|
@ -15,9 +15,7 @@ else
|
||||||
args=("$@")
|
args=("$@")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
keypair="target/wallet-sanity-keypair.json"
|
args+=(--keypair "$SOLANA_CONFIG_DIR"/faucet.json)
|
||||||
$solana_keygen new --no-passphrase -sf -o $keypair
|
|
||||||
args+=(--keypair "$keypair")
|
|
||||||
|
|
||||||
node_readiness=false
|
node_readiness=false
|
||||||
timeout=60
|
timeout=60
|
||||||
|
@ -38,12 +36,10 @@ fi
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
$solana_cli "${args[@]}" address
|
$solana_cli "${args[@]}" address
|
||||||
$solana_cli "${args[@]}" airdrop 0.01
|
$solana_cli "${args[@]}" balance
|
||||||
$solana_cli "${args[@]}" balance --lamports
|
|
||||||
$solana_cli "${args[@]}" ping --count 5 --interval 0
|
$solana_cli "${args[@]}" ping --count 5 --interval 0
|
||||||
$solana_cli "${args[@]}" balance --lamports
|
$solana_cli "${args[@]}" balance
|
||||||
)
|
)
|
||||||
rm $keypair
|
|
||||||
|
|
||||||
echo PASS
|
echo PASS
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue