Skip to content

Commit

Permalink
Support tpu disable quic in net scripts (#27039)
Browse files Browse the repository at this point in the history
Support tpu disable quic in net scripts
  • Loading branch information
lijunwangs authored Aug 24, 2022
1 parent 841ed68 commit ed463dd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ while [[ -n $1 ]]; do
elif [[ $1 = --skip-poh-verify ]]; then
args+=("$1")
shift
elif [[ $1 = --tpu-use-quic ]]; then
elif [[ $1 = --tpu-disable-quic ]]; then
args+=("$1")
shift
elif [[ $1 = --rpc-send-batch-ms ]]; then
Expand Down
10 changes: 10 additions & 0 deletions net/net.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ Operate a configured testnet
- Boot from a snapshot that has warped ahead to WARP_SLOT rather than a slot 0 genesis.
--full-rpc
- Support full RPC services on all nodes
--tpu-disable-quic
- Disable quic for tpu packet forwarding
sanity/start-specific options:
-F - Discard validator nodes that didn't bootup successfully
-o noInstallCheck - Skip solana-install sanity
Expand Down Expand Up @@ -320,6 +324,7 @@ startBootstrapLeader() {
\"$waitForNodeInit\" \
\"$extraPrimordialStakes\" \
\"$TMPFS_ACCOUNTS\" \
\"$disableQuic\" \
"

) >> "$logFile" 2>&1 || {
Expand Down Expand Up @@ -392,6 +397,7 @@ startNode() {
\"$waitForNodeInit\" \
\"$extraPrimordialStakes\" \
\"$TMPFS_ACCOUNTS\" \
\"$disableQuic\" \
"
) >> "$logFile" 2>&1 &
declare pid=$!
Expand Down Expand Up @@ -800,6 +806,7 @@ maybeWarpSlot=
maybeFullRpc=false
waitForNodeInit=true
extraPrimordialStakes=0
disableQuic=false

command=$1
[[ -n $command ]] || usage
Expand Down Expand Up @@ -912,6 +919,9 @@ while [[ -n $1 ]]; do
elif [[ $1 == --full-rpc ]]; then
maybeFullRpc=true
shift 1
elif [[ $1 == --tpu-disable-quic ]]; then
disableQuic=true
shift 1
elif [[ $1 == --async-node-init ]]; then
waitForNodeInit=false
shift 1
Expand Down
11 changes: 11 additions & 0 deletions net/remote/remote-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ maybeFullRpc="${19}"
waitForNodeInit="${20}"
extraPrimordialStakes="${21:=0}"
tmpfsAccounts="${22:false}"
disableQuic="${23}"

set +x

missing() {
Expand Down Expand Up @@ -283,6 +285,11 @@ EOF
args+=(--enable-extended-tx-metadata-storage)
fi


if $disableQuic; then
args+=(--tpu-disable-quic)
fi

if [[ $airdropsEnabled = true ]]; then
cat >> ~/solana/on-reboot <<EOF
./multinode-demo/faucet.sh > faucet.log 2>&1 &
Expand Down Expand Up @@ -411,6 +418,10 @@ EOF
args+=(--enable-extended-tx-metadata-storage)
fi

if $disableQuic; then
args+=(--tpu-disable-quic)
fi

cat >> ~/solana/on-reboot <<EOF
$maybeSkipAccountsCreation
nohup multinode-demo/validator.sh ${args[@]} > validator.log.\$now 2>&1 &
Expand Down

0 comments on commit ed463dd

Please sign in to comment.