Merge branch 'unstable' of github.com:status-im/nim-beacon-chain into unstable

This commit is contained in:
yslcrypto 2021-04-14 16:19:36 +02:00
commit bdea50d664
3 changed files with 16 additions and 13 deletions

View File

@ -330,16 +330,6 @@ type
desc: "The number of validator deposits in the newly created chain" desc: "The number of validator deposits in the newly created chain"
name: "total-validators" }: uint64 name: "total-validators" }: uint64
firstValidator* {.
defaultValue: 0
desc: "Index of first validator to add to validator list"
name: "first-validator" }: uint64
lastUserValidator* {.
defaultValue: config.totalValidators - 1,
desc: "The last validator index that will be free for taking from a testnet participant"
name: "last-user-validator" }: uint64
bootstrapAddress* {. bootstrapAddress* {.
defaultValue: init(ValidIpAddress, "127.0.0.1") defaultValue: init(ValidIpAddress, "127.0.0.1")
desc: "The public IP address that will be advertised as a bootstrap node for the testnet" desc: "The public IP address that will be advertised as a bootstrap node for the testnet"

View File

@ -1738,7 +1738,7 @@ proc doCreateTestnet(config: BeaconNodeConf, rng: var BrHmacDrbgContext) {.raise
quit 1 quit 1
var deposits: seq[DepositData] var deposits: seq[DepositData]
for i in config.firstValidator.int ..< launchPadDeposits.len: for i in 0 ..< launchPadDeposits.len:
deposits.add(launchPadDeposits[i] as DepositData) deposits.add(launchPadDeposits[i] as DepositData)
let let

View File

@ -58,7 +58,15 @@ MISSING_BINARY_HELP
exit 1 exit 1
fi fi
if [[ "$WEB3_URL" == "" ]]; then WEB3_URL_OPT_PRESENT=0
for op in "$@"; do
if [[ "${op}" =~ ^--web3-url=.*$ ]]; then
WEB3_URL_OPT_PRESENT=1
break
fi
done
if [[ "${WEB3_URL}" == "" && "${WEB3_URL_OPT_PRESENT}" == "0" ]]; then
cat <<WEB3_HELP cat <<WEB3_HELP
To monitor the Eth1 validator deposit contract, you'll need to pair To monitor the Eth1 validator deposit contract, you'll need to pair
@ -75,15 +83,20 @@ WEB3_HELP
read WEB3_URL read WEB3_URL
fi fi
EXTRA_ARGS=""
if [[ "${WEB3_URL}" != "" ]]; then
EXTRA_ARGS="--web3-url=${WEB3_URL}"
fi
# Allow the binary to receive signals directly. # Allow the binary to receive signals directly.
exec ${WINPTY} build/${NBC_BINARY} \ exec ${WINPTY} build/${NBC_BINARY} \
--network=${NETWORK} \ --network=${NETWORK} \
--data-dir="${DATA_DIR}" \ --data-dir="${DATA_DIR}" \
--log-file="${DATA_DIR}/nbc_bn_$(date +"%Y%m%d%H%M%S").log" \ --log-file="${DATA_DIR}/nbc_bn_$(date +"%Y%m%d%H%M%S").log" \
--web3-url="${WEB3_URL}" \
--tcp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \ --tcp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \
--udp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \ --udp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \
--rpc \ --rpc \
--rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \ --rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \
${EXTRA_ARGS} \
$@ $@