Browse Source

Support tpu disable quic in net scripts (#27039)

Support tpu disable quic in net scripts
Lijun Wang 3 years ago
parent
commit
ed463dd48c
3 changed files with 22 additions and 1 deletions
  1. 1 1
      multinode-demo/validator.sh
  2. 10 0
      net/net.sh
  3. 11 0
      net/remote/remote-node.sh

+ 1 - 1
multinode-demo/validator.sh

@@ -147,7 +147,7 @@ while [[ -n $1 ]]; do
     elif [[ $1 = --skip-poh-verify ]]; then
     elif [[ $1 = --skip-poh-verify ]]; then
       args+=("$1")
       args+=("$1")
       shift
       shift
-    elif [[ $1 = --tpu-use-quic ]]; then
+    elif [[ $1 = --tpu-disable-quic ]]; then
       args+=("$1")
       args+=("$1")
       shift
       shift
     elif [[ $1 = --rpc-send-batch-ms ]]; then
     elif [[ $1 = --rpc-send-batch-ms ]]; then

+ 10 - 0
net/net.sh

@@ -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.
                                       - Boot from a snapshot that has warped ahead to WARP_SLOT rather than a slot 0 genesis.
    --full-rpc
    --full-rpc
                                       - Support full RPC services on all nodes
                                       - Support full RPC services on all nodes
+
+   --tpu-disable-quic
+                                      - Disable quic for tpu packet forwarding
+
  sanity/start-specific options:
  sanity/start-specific options:
    -F                   - Discard validator nodes that didn't bootup successfully
    -F                   - Discard validator nodes that didn't bootup successfully
    -o noInstallCheck    - Skip solana-install sanity
    -o noInstallCheck    - Skip solana-install sanity
@@ -320,6 +324,7 @@ startBootstrapLeader() {
          \"$waitForNodeInit\" \
          \"$waitForNodeInit\" \
          \"$extraPrimordialStakes\" \
          \"$extraPrimordialStakes\" \
          \"$TMPFS_ACCOUNTS\" \
          \"$TMPFS_ACCOUNTS\" \
+         \"$disableQuic\" \
       "
       "
 
 
   ) >> "$logFile" 2>&1 || {
   ) >> "$logFile" 2>&1 || {
@@ -392,6 +397,7 @@ startNode() {
          \"$waitForNodeInit\" \
          \"$waitForNodeInit\" \
          \"$extraPrimordialStakes\" \
          \"$extraPrimordialStakes\" \
          \"$TMPFS_ACCOUNTS\" \
          \"$TMPFS_ACCOUNTS\" \
+         \"$disableQuic\" \
       "
       "
   ) >> "$logFile" 2>&1 &
   ) >> "$logFile" 2>&1 &
   declare pid=$!
   declare pid=$!
@@ -800,6 +806,7 @@ maybeWarpSlot=
 maybeFullRpc=false
 maybeFullRpc=false
 waitForNodeInit=true
 waitForNodeInit=true
 extraPrimordialStakes=0
 extraPrimordialStakes=0
+disableQuic=false
 
 
 command=$1
 command=$1
 [[ -n $command ]] || usage
 [[ -n $command ]] || usage
@@ -912,6 +919,9 @@ while [[ -n $1 ]]; do
     elif [[ $1 == --full-rpc ]]; then
     elif [[ $1 == --full-rpc ]]; then
       maybeFullRpc=true
       maybeFullRpc=true
       shift 1
       shift 1
+    elif [[ $1 == --tpu-disable-quic ]]; then
+      disableQuic=true
+      shift 1
     elif [[ $1 == --async-node-init ]]; then
     elif [[ $1 == --async-node-init ]]; then
       waitForNodeInit=false
       waitForNodeInit=false
       shift 1
       shift 1

+ 11 - 0
net/remote/remote-node.sh

@@ -28,6 +28,8 @@ maybeFullRpc="${19}"
 waitForNodeInit="${20}"
 waitForNodeInit="${20}"
 extraPrimordialStakes="${21:=0}"
 extraPrimordialStakes="${21:=0}"
 tmpfsAccounts="${22:false}"
 tmpfsAccounts="${22:false}"
+disableQuic="${23}"
+
 set +x
 set +x
 
 
 missing() {
 missing() {
@@ -283,6 +285,11 @@ EOF
       args+=(--enable-extended-tx-metadata-storage)
       args+=(--enable-extended-tx-metadata-storage)
     fi
     fi
 
 
+
+    if $disableQuic; then
+      args+=(--tpu-disable-quic)
+    fi
+
     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 &
@@ -411,6 +418,10 @@ EOF
       args+=(--enable-extended-tx-metadata-storage)
       args+=(--enable-extended-tx-metadata-storage)
     fi
     fi
 
 
+    if $disableQuic; then
+      args+=(--tpu-disable-quic)
+    fi
+
 cat >> ~/solana/on-reboot <<EOF
 cat >> ~/solana/on-reboot <<EOF
     $maybeSkipAccountsCreation
     $maybeSkipAccountsCreation
     nohup multinode-demo/validator.sh ${args[@]} > validator.log.\$now 2>&1 &
     nohup multinode-demo/validator.sh ${args[@]} > validator.log.\$now 2>&1 &