nimbus-eth2/scripts/connect_to_testnet.sh

23 lines
599 B
Bash
Raw Normal View History

#!/bin/bash
set -eu
cd $(dirname "$0")
NETWORK_NAME=$1
source "$NETWORK_NAME.env"
cd ..
2019-03-27 13:04:09 +00:00
NIM_FLAGS="-d:release --lineTrace:on -d:chronicles_log_level=DEBUG -d:SECONDS_PER_SLOT=$SECONDS_PER_SLOT -d:SHARD_COUNT=$SHARD_COUNT -d:SLOTS_PER_EPOCH=$SLOTS_PER_EPOCH"
BEACON_NODE_BIN=${NETWORK_NAME}_node
2019-03-27 16:16:03 +00:00
nim c $NIM_FLAGS -o:"./$BEACON_NODE_BIN" beacon_chain/beacon_node
if [ ! -d ~/.cache/nimbus/BeaconNode/$NETWORK_NAME/validators ]; then
2019-03-27 16:12:48 +00:00
./$BEACON_NODE_BIN --network=$NETWORK_NAME importValidator
fi
./$BEACON_NODE_BIN --network=$NETWORK_NAME --tcpPort:$BOOTSTRAP_PORT --udpPort:$BOOTSTRAP_PORT