use staked connection for bench-tps in net scripts (#34767)
* add client-node-id to use staked connection * Add flag to use unstaked connection for bench-tps * Add bind-address for multinode * always specify url for bench-tps
This commit is contained in:
parent
257ba2f0b1
commit
5a1a697620
|
@ -20,10 +20,13 @@ usage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
args=("$@")
|
args=("$@")
|
||||||
|
default_arg --url "http://127.0.0.1:8899"
|
||||||
default_arg --entrypoint "127.0.0.1:8001"
|
default_arg --entrypoint "127.0.0.1:8001"
|
||||||
default_arg --faucet "127.0.0.1:9900"
|
default_arg --faucet "127.0.0.1:9900"
|
||||||
default_arg --duration 90
|
default_arg --duration 90
|
||||||
default_arg --tx-count 50000
|
default_arg --tx-count 50000
|
||||||
default_arg --thread-batch-sleep-ms 0
|
default_arg --thread-batch-sleep-ms 0
|
||||||
|
default_arg --bind-address "127.0.0.1"
|
||||||
|
default_arg --client-node-id "${SOLANA_CONFIG_DIR}/bootstrap-validator/identity.json"
|
||||||
|
|
||||||
$solana_bench_tps "${args[@]}"
|
$solana_bench_tps "${args[@]}"
|
||||||
|
|
|
@ -26,6 +26,8 @@ usage() {
|
||||||
-c bench-tps=2="--tx_count 25000"
|
-c bench-tps=2="--tx_count 25000"
|
||||||
This will start 2 bench-tps clients, and supply "--tx_count 25000"
|
This will start 2 bench-tps clients, and supply "--tx_count 25000"
|
||||||
to the bench-tps client.
|
to the bench-tps client.
|
||||||
|
--use-unstaked-connection - Use unstaked connection. By default, staked connection with
|
||||||
|
bootstrap node credendials is used.
|
||||||
EOM
|
EOM
|
||||||
)
|
)
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -444,7 +446,8 @@ startClient() {
|
||||||
startCommon "$ipAddress"
|
startCommon "$ipAddress"
|
||||||
ssh "${sshOptions[@]}" -f "$ipAddress" \
|
ssh "${sshOptions[@]}" -f "$ipAddress" \
|
||||||
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
|
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
|
||||||
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex $clientType"
|
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex $clientType \
|
||||||
|
$maybeUseUnstakedConnection"
|
||||||
) >> "$logFile" 2>&1 || {
|
) >> "$logFile" 2>&1 || {
|
||||||
cat "$logFile"
|
cat "$logFile"
|
||||||
echo "^^^ +++"
|
echo "^^^ +++"
|
||||||
|
@ -832,6 +835,7 @@ extraPrimordialStakes=0
|
||||||
disableQuic=false
|
disableQuic=false
|
||||||
enableUdp=false
|
enableUdp=false
|
||||||
clientType=thin-client
|
clientType=thin-client
|
||||||
|
maybeUseUnstakedConnection=""
|
||||||
|
|
||||||
command=$1
|
command=$1
|
||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
|
@ -976,6 +980,9 @@ while [[ -n $1 ]]; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift 2
|
shift 2
|
||||||
|
elif [[ $1 = --use-unstaked-connection ]]; then
|
||||||
|
maybeUseUnstakedConnection="$1"
|
||||||
|
shift 1
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -12,6 +12,7 @@ fi
|
||||||
benchTpsExtraArgs="$5"
|
benchTpsExtraArgs="$5"
|
||||||
clientIndex="$6"
|
clientIndex="$6"
|
||||||
clientType="${7:-thin-client}"
|
clientType="${7:-thin-client}"
|
||||||
|
maybeUseUnstakedConnection="$8"
|
||||||
|
|
||||||
missing() {
|
missing() {
|
||||||
echo "Error: $1 not specified"
|
echo "Error: $1 not specified"
|
||||||
|
@ -68,18 +69,24 @@ solana-bench-tps)
|
||||||
net/scripts/rsync-retry.sh -vPrc \
|
net/scripts/rsync-retry.sh -vPrc \
|
||||||
"$entrypointIp":~/solana/config/bench-tps"$clientIndex".yml ./client-accounts.yml
|
"$entrypointIp":~/solana/config/bench-tps"$clientIndex".yml ./client-accounts.yml
|
||||||
|
|
||||||
|
net/scripts/rsync-retry.sh -vPrc \
|
||||||
|
"$entrypointIp":~/solana/config/validator-identity-1.json ./validator-identity.json
|
||||||
|
|
||||||
args=()
|
args=()
|
||||||
|
|
||||||
if ${TPU_CLIENT}; then
|
if ${TPU_CLIENT}; then
|
||||||
args+=(--use-tpu-client)
|
args+=(--use-tpu-client)
|
||||||
args+=(--url "http://$entrypointIp:8899")
|
|
||||||
elif ${RPC_CLIENT}; then
|
elif ${RPC_CLIENT}; then
|
||||||
args+=(--use-rpc-client)
|
args+=(--use-rpc-client)
|
||||||
args+=(--url "http://$entrypointIp:8899")
|
|
||||||
else
|
else
|
||||||
args+=(--entrypoint "$entrypointIp:8001")
|
args+=(--entrypoint "$entrypointIp:8001")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$maybeUseUnstakedConnection" ]]; then
|
||||||
|
args+=(--bind-address "$entrypointIp")
|
||||||
|
args+=(--client-node-id ./validator-identity.json)
|
||||||
|
fi
|
||||||
|
|
||||||
clientCommand="\
|
clientCommand="\
|
||||||
solana-bench-tps \
|
solana-bench-tps \
|
||||||
--duration 7500 \
|
--duration 7500 \
|
||||||
|
@ -87,6 +94,7 @@ solana-bench-tps)
|
||||||
--threads $threadCount \
|
--threads $threadCount \
|
||||||
$benchTpsExtraArgs \
|
$benchTpsExtraArgs \
|
||||||
--read-client-keys ./client-accounts.yml \
|
--read-client-keys ./client-accounts.yml \
|
||||||
|
--url "http://$entrypointIp:8899" \
|
||||||
${args[*]} \
|
${args[*]} \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue