2019-02-28 21:21:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
. $(dirname $0)/vars.sh
|
|
|
|
|
|
|
|
DATA_DIR=$SIMULATION_DIR/node-${1}
|
|
|
|
|
2019-03-07 13:59:28 +00:00
|
|
|
V_PREFIX="$VALIDATORS_DIR/v$(printf '%06d' ${1})"
|
|
|
|
PORT=$(printf '5%04d' ${1})
|
2019-03-19 18:57:57 +00:00
|
|
|
|
|
|
|
NAT_FLAG=""
|
|
|
|
if [ "${NAT:-}" == "1" ]; then
|
|
|
|
NAT_FLAG="--nat:extip:$(curl -s ifconfig.me)"
|
|
|
|
fi
|
2019-03-07 13:59:28 +00:00
|
|
|
|
2019-02-28 21:21:29 +00:00
|
|
|
$BEACON_NODE_BIN \
|
2019-03-19 17:22:17 +00:00
|
|
|
--network:$NETWORK_METADATA_FILE \
|
2019-02-28 21:21:29 +00:00
|
|
|
--dataDir:$DATA_DIR \
|
2019-03-22 14:35:20 +00:00
|
|
|
--nodename:${1} \
|
2019-03-18 03:54:08 +00:00
|
|
|
--validator:${V_PREFIX}0.privkey \
|
|
|
|
--validator:${V_PREFIX}1.privkey \
|
|
|
|
--validator:${V_PREFIX}2.privkey \
|
|
|
|
--validator:${V_PREFIX}3.privkey \
|
|
|
|
--validator:${V_PREFIX}4.privkey \
|
|
|
|
--validator:${V_PREFIX}5.privkey \
|
|
|
|
--validator:${V_PREFIX}6.privkey \
|
|
|
|
--validator:${V_PREFIX}7.privkey \
|
|
|
|
--validator:${V_PREFIX}8.privkey \
|
|
|
|
--validator:${V_PREFIX}9.privkey \
|
2019-03-07 13:59:28 +00:00
|
|
|
--tcpPort:$PORT \
|
|
|
|
--udpPort:$PORT \
|
2019-03-19 18:57:57 +00:00
|
|
|
$NAT_FLAG \
|
2019-03-19 17:22:17 +00:00
|
|
|
--stateSnapshot:$SNAPSHOT_FILE
|