solana/multinode-demo/validator.sh

23 lines
585 B
Bash
Raw Normal View History

#!/bin/bash
2018-05-27 18:19:07 -07:00
if [[ -z $1 ]]; then
printf 'usage: %s [network path to solana repo on leader machine]\n' "$0"
2018-05-27 18:19:07 -07:00
exit 1
fi
LEADER=$1
2018-05-27 18:19:07 -07:00
set -x
rsync -v "$LEADER"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $?
2018-05-27 18:19:07 -07:00
2018-06-15 14:32:09 -07:00
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400
2018-05-27 18:19:07 -07:00
# if RUST_LOG is unset, default to info
export RUST_LOG=${RUST_LOG:-solana=info}
2018-06-22 14:10:50 -07:00
IPADDR="$(ifconfig | awk '/inet (addr)?/ {print $2}' | cut -d: -f2 | grep -v '127.0.0.1')"
cargo run --release --bin solana-fullnode -- \
2018-06-22 14:10:50 -07:00
-l validator-"$IPADDR".json -v leader.json < genesis.log tx-*.log