2019-02-28 21:21:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PWD_CMD="pwd"
|
|
|
|
# get native Windows paths on Mingw
|
|
|
|
uname | grep -qi mingw && PWD_CMD="pwd -W"
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
2019-09-01 15:02:49 +00:00
|
|
|
|
2019-02-28 21:21:29 +00:00
|
|
|
SIM_ROOT="$($PWD_CMD)"
|
|
|
|
|
2019-03-28 15:18:59 +00:00
|
|
|
# Set a default value for the env vars usually supplied by a Makefile
|
|
|
|
cd $(git rev-parse --show-toplevel)
|
|
|
|
: ${GIT_ROOT:="$($PWD_CMD)"}
|
|
|
|
cd - &>/dev/null
|
2019-02-28 21:21:29 +00:00
|
|
|
|
2019-10-23 13:22:35 +00:00
|
|
|
# When changing these, also update the readme section on running simulation
|
|
|
|
# so that the run_node example is correct!
|
2019-10-08 15:34:46 +00:00
|
|
|
NUM_VALIDATORS=${VALIDATORS:-192}
|
2019-10-22 13:59:42 +00:00
|
|
|
NUM_NODES=${NODES:-6}
|
2019-10-03 01:51:44 +00:00
|
|
|
NUM_MISSING_NODES=${MISSING_NODES:-1}
|
2019-07-01 12:36:01 +00:00
|
|
|
|
2019-03-28 15:18:59 +00:00
|
|
|
SIMULATION_DIR="${SIM_ROOT}/data"
|
2019-10-17 13:18:58 +00:00
|
|
|
METRICS_DIR="${SIM_ROOT}/prometheus"
|
2019-03-28 15:18:59 +00:00
|
|
|
VALIDATORS_DIR="${SIM_ROOT}/validators"
|
2019-10-29 16:46:41 +00:00
|
|
|
SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.ssz"
|
2019-10-28 23:04:52 +00:00
|
|
|
NETWORK_BOOTSTRAP_FILE="${SIMULATION_DIR}/bootstrap_nodes.txt"
|
2019-09-01 15:02:49 +00:00
|
|
|
BEACON_NODE_BIN="${SIMULATION_DIR}/beacon_node"
|
|
|
|
DEPLOY_DEPOSIT_CONTRACT_BIN="${SIMULATION_DIR}/deploy_deposit_contract"
|
2019-03-28 15:18:59 +00:00
|
|
|
MASTER_NODE_ADDRESS_FILE="${SIMULATION_DIR}/node-0/beacon_node.address"
|
2019-10-17 13:18:58 +00:00
|
|
|
BASE_METRICS_PORT=8008
|
|
|
|
|