Remove unused exchange program and bench client (#18463)

This commit is contained in:
Justin Starry
2021-07-12 21:59:11 -05:00
committed by GitHub
parent 8ad4ffdee5
commit cfece66403
24 changed files with 11 additions and 3544 deletions

View File

@ -20,7 +20,6 @@ usage() {
Valid client types are:
idle
bench-tps
bench-exchange
User can optionally provide extraArgs that are transparently
supplied to the client program as command line parameters.
For example,
@ -307,7 +306,6 @@ startBootstrapLeader() {
\"$internalNodesLamports\" \
$nodeIndex \
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
${#clientIpList[@]} \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority\" \
\"$gpuMode\" \
@ -379,7 +377,6 @@ startNode() {
\"$internalNodesLamports\" \
$nodeIndex \
${#clientIpList[@]} \"$benchTpsExtraArgs\" \
${#clientIpList[@]} \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
\"$maybeNoSnapshot $maybeSkipLedgerVerify $maybeLimitLedgerSize $maybeWaitForSupermajority\" \
\"$gpuMode\" \
@ -409,7 +406,7 @@ startClient() {
startCommon "$ipAddress"
ssh "${sshOptions[@]}" -f "$ipAddress" \
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" \"$benchExchangeExtraArgs\" $clientIndex"
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex"
) >> "$logFile" 2>&1 || {
cat "$logFile"
echo "^^^ +++"
@ -421,8 +418,6 @@ startClients() {
for ((i=0; i < "$numClients" && i < "$numClientsRequested"; i++)) do
if [[ $i -lt "$numBenchTpsClients" ]]; then
startClient "${clientIpList[$i]}" "solana-bench-tps" "$i"
elif [[ $i -lt $((numBenchTpsClients + numBenchExchangeClients)) ]]; then
startClient "${clientIpList[$i]}" "solana-bench-exchange" $((i-numBenchTpsClients))
else
startClient "${clientIpList[$i]}" "idle"
fi
@ -767,9 +762,7 @@ updatePlatforms=
nodeAddress=
numIdleClients=0
numBenchTpsClients=0
numBenchExchangeClients=0
benchTpsExtraArgs=
benchExchangeExtraArgs=
failOnValidatorBootupFailure=true
genesisOptions=
numValidatorsRequested=
@ -977,10 +970,6 @@ while getopts "h?T:t:o:f:rc:Fn:i:d" opt "${shortArgs[@]}"; do
numBenchTpsClients=$numClients
benchTpsExtraArgs=$extraArgs
;;
bench-exchange)
numBenchExchangeClients=$numClients
benchExchangeExtraArgs=$extraArgs
;;
*)
echo "Unknown client type: $clientType"
exit 1
@ -1013,7 +1002,7 @@ if [[ -n $numValidatorsRequested ]]; then
fi
numClients=${#clientIpList[@]}
numClientsRequested=$((numBenchTpsClients + numBenchExchangeClients + numIdleClients))
numClientsRequested=$((numBenchTpsClients + numIdleClients))
if [[ "$numClientsRequested" -eq 0 ]]; then
numBenchTpsClients=$numClients
numClientsRequested=$numClients

View File

@ -10,8 +10,7 @@ if [[ -n $4 ]]; then
export RUST_LOG="$4"
fi
benchTpsExtraArgs="$5"
benchExchangeExtraArgs="$6"
clientIndex="$7"
clientIndex="$6"
missing() {
echo "Error: $1 not specified"
@ -57,23 +56,6 @@ solana-bench-tps)
--read-client-keys ./client-accounts.yml \
"
;;
solana-bench-exchange)
solana-keygen new --no-passphrase -fso bench.keypair
net/scripts/rsync-retry.sh -vPrc \
"$entrypointIp":~/solana/config/bench-exchange"$clientIndex".yml ./client-accounts.yml
clientCommand="\
solana-bench-exchange \
--entrypoint $entrypointIp:8001 \
--faucet $entrypointIp:9900 \
--threads $threadCount \
--batch-size 1000 \
--fund-amount 20000 \
--duration 7500 \
--identity bench.keypair \
$benchExchangeExtraArgs \
--read-client-keys ./client-accounts.yml \
"
;;
idle)
# Add the faucet keypair to idle clients for convenience
net/scripts/rsync-retry.sh -vPrc \

View File

@ -20,15 +20,13 @@ internalNodesLamports="${11}"
nodeIndex="${12}"
numBenchTpsClients="${13}"
benchTpsExtraArgs="${14}"
numBenchExchangeClients="${15}"
benchExchangeExtraArgs="${16}"
genesisOptions="${17}"
extraNodeArgs="${18}"
gpuMode="${19:-auto}"
maybeWarpSlot="${20}"
waitForNodeInit="${21}"
extraPrimordialStakes="${22:=0}"
tmpfsAccounts="${23:false}"
genesisOptions="${15}"
extraNodeArgs="${16}"
gpuMode="${17:-auto}"
maybeWarpSlot="${18}"
waitForNodeInit="${19}"
extraPrimordialStakes="${20:=0}"
tmpfsAccounts="${21:false}"
set +x
missing() {
@ -194,13 +192,6 @@ EOF
tail -n +2 -q config/bench-tps"$i".yml >> config/client-accounts.yml
echo "" >> config/client-accounts.yml
done
for i in $(seq 0 $((numBenchExchangeClients-1))); do
# shellcheck disable=SC2086 # Do not want to quote $benchExchangeExtraArgs
solana-bench-exchange --batch-size 1000 --fund-amount 20000 \
--write-client-keys config/bench-exchange"$i".yml $benchExchangeExtraArgs
tail -n +2 -q config/bench-exchange"$i".yml >> config/client-accounts.yml
echo "" >> config/client-accounts.yml
done
if [[ -f $externalPrimordialAccountsFile ]]; then
cat "$externalPrimordialAccountsFile" >> config/validator-balances.yml
fi