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)
|
|
|
|
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
|
|
|
: ${SKIP_BUILDS:=""}
|
|
|
|
: ${BUILD_OUTPUTS_DIR:="$GIT_ROOT/build"}
|
|
|
|
|
2019-08-15 17:04:16 +00:00
|
|
|
NUM_VALIDATORS=${VALIDATORS:-1000}
|
2019-08-19 16:41:13 +00:00
|
|
|
NUM_NODES=${NODES:-4}
|
2019-08-14 08:56:32 +00:00
|
|
|
NUM_MISSING_NODES=${MISSING_NODES:-0}
|
2019-07-01 12:36:01 +00:00
|
|
|
|
2019-03-28 15:18:59 +00:00
|
|
|
SIMULATION_DIR="${SIM_ROOT}/data"
|
|
|
|
VALIDATORS_DIR="${SIM_ROOT}/validators"
|
|
|
|
SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.json"
|
|
|
|
NETWORK_METADATA_FILE="${SIMULATION_DIR}/network.json"
|
|
|
|
BEACON_NODE_BIN="${BUILD_OUTPUTS_DIR}/beacon_node"
|
|
|
|
VALIDATOR_KEYGEN_BIN="${BUILD_OUTPUTS_DIR}/validator_keygen"
|
2019-07-12 14:24:11 +00:00
|
|
|
DEPLOY_DEPOSIT_CONTRACT_BIN="${BUILD_OUTPUTS_DIR}/deploy_deposit_contract"
|
2019-03-28 15:18:59 +00:00
|
|
|
MASTER_NODE_ADDRESS_FILE="${SIMULATION_DIR}/node-0/beacon_node.address"
|