Skip to content

Commit

Permalink
Add --allow-private-addr to bootstrap-validator.sh (solana-labs#30163)
Browse files Browse the repository at this point in the history
* Add --allow-private-addr to bootstrap-validator.sh

* Remove --allow-private-addr argument option since it is default

* fix bench-tps docs, remove option for private-addr (default)
  • Loading branch information
apfitzge authored Feb 22, 2023
1 parent 6a66d46 commit 045b9fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
3 changes: 0 additions & 3 deletions ci/localnet-sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ source multinode-demo/common.sh --prebuild

nodes=(
"multinode-demo/bootstrap-validator.sh \
--allow-private-addr \
--no-restart \
--init-complete-file init-complete-node0.log \
--dynamic-port-range 8000-8050"
"multinode-demo/validator.sh \
--allow-private-addr \
--no-restart \
--dynamic-port-range 8050-8100
--init-complete-file init-complete-node1.log \
Expand All @@ -92,7 +90,6 @@ if [[ extraNodes -gt 0 ]]; then
portEnd=$((portStart + 49))
nodes+=(
"multinode-demo/validator.sh \
--allow-private-addr \
--no-restart \
--dynamic-port-range $portStart-$portEnd
--label dyn$i \
Expand Down
6 changes: 0 additions & 6 deletions docs/src/cluster/bench-tps.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/bootstrap-validator.sh
NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/validator.sh
```

To run multiple nodes on the same machine using loopback IP address, pass parameter to allow private addresses

```bash
NDEBUG=1 ./multinode-demo/bootstrap-validator.sh --allow-private-addr
NDEBUG=1 ./multinode-demo/validator-x.sh --allow-private-addr
```

### Testnet Client Demo

Expand Down
4 changes: 1 addition & 3 deletions multinode-demo/bootstrap-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ while [[ -n $1 ]]; do
elif [[ $1 == --no-snapshot-fetch ]]; then
args+=("$1")
shift
elif [[ $1 == --allow-private-addr ]]; then
args+=("$1")
shift
elif [[ $1 == --accounts-db-skip-shrink ]]; then
args+=("$1")
shift
Expand Down Expand Up @@ -149,6 +146,7 @@ args+=(
--no-os-network-limits-test
--no-wait-for-vote-to-start-leader
--full-rpc-api
--allow-private-addr
)
default_arg --gossip-port 8001
default_arg --log -
Expand Down
10 changes: 3 additions & 7 deletions multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ vote_account=
no_restart=0
gossip_entrypoint=
ledger_dir=
maybe_allow_private_addr=

usage() {
if [[ -n $1 ]]; then
Expand Down Expand Up @@ -177,10 +176,6 @@ while [[ -n $1 ]]; do
elif [[ $1 == --expected-bank-hash ]]; then
args+=("$1" "$2")
shift 2
elif [[ $1 == --allow-private-addr ]]; then
args+=("$1")
maybe_allow_private_addr=$1
shift
elif [[ $1 == --accounts-db-skip-shrink ]]; then
args+=("$1")
shift
Expand Down Expand Up @@ -265,6 +260,7 @@ default_arg --ledger "$ledger_dir"
default_arg --log -
default_arg --full-rpc-api
default_arg --no-incremental-snapshots
default_arg --allow-private-addr

if [[ $maybeRequireTower = true ]]; then
default_arg --require-tower
Expand Down Expand Up @@ -335,8 +331,8 @@ setup_validator_accounts() {
return 0
}

# shellcheck disable=SC2086 # Don't want to double quote "$maybe_allow_private_addr"
rpc_url=$($solana_gossip $maybe_allow_private_addr rpc-url --timeout 180 --entrypoint "$gossip_entrypoint")
# shellcheck disable=SC2086
rpc_url=$($solana_gossip --allow-private-addr rpc-url --timeout 180 --entrypoint "$gossip_entrypoint")

[[ -r "$identity" ]] || $solana_keygen new --no-passphrase -so "$identity"
[[ -r "$vote_account" ]] || $solana_keygen new --no-passphrase -so "$vote_account"
Expand Down

0 comments on commit 045b9fe

Please sign in to comment.