remove IPADDR, which was making Rob feel ill
IPADDR is simple, but not exactly what we need for testnet, where NAT'd folks need to join in, need to advertize themselves as on the interweb. myip() helps, but there's some TODOs: fullnode-config probably needs to be told where it lives in the real world (machine interfaces tell us dick), or incorporate something like the "ifconfig.co" code in myip.sh
This commit is contained in:
@ -1,22 +1,30 @@
|
||||
#!/bin/bash
|
||||
here=$(dirname $0)
|
||||
. "${here}"/myip.sh
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
printf 'usage: %s [network path to solana repo on leader machine]\n' "$0"
|
||||
leader=$1
|
||||
|
||||
[[ -z ${leader} ]] && {
|
||||
echo "usage: $0 [network path to solana repo on leader machine]"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
LEADER=$1
|
||||
myip=$(myip) || exit $?
|
||||
|
||||
set -x
|
||||
[[ -f validator-"$myip".json ]] || {
|
||||
echo "I can't find a matching validator config file for \"${myip}\"...
|
||||
Please run ${here}/setup.sh first.
|
||||
"
|
||||
exit 1
|
||||
}
|
||||
|
||||
rsync -v "$LEADER"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $?
|
||||
rsync -vz "${leader}"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $?
|
||||
|
||||
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400
|
||||
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400 1>/dev/null 2>/dev/null
|
||||
|
||||
# if RUST_LOG is unset, default to info
|
||||
export RUST_LOG=${RUST_LOG:-solana=info}
|
||||
|
||||
IPADDR="$(ifconfig | awk '/inet (addr)?/ {print $2}' | cut -d: -f2 | grep -v '127.0.0.1')"
|
||||
|
||||
cargo run --release --bin solana-fullnode -- \
|
||||
-l validator-"$IPADDR".json -v leader.json < genesis.log tx-*.log
|
||||
-l validator-"${myip}".json -v leader.json \
|
||||
< genesis.log tx-*.log
|
||||
|
Reference in New Issue
Block a user