2020-08-11 02:16:33 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-05-17 11:16:48 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Produces a testnet specification and a genesis state where the genesis time
|
2021-03-30 05:17:58 +00:00
|
|
|
# is now + $GENESIS_DELAY.
|
|
|
|
#
|
2021-07-09 06:15:32 +00:00
|
|
|
# Generates datadirs for multiple validator keys according to the
|
2021-10-01 06:32:37 +00:00
|
|
|
# $VALIDATOR_COUNT and $BN_COUNT variables.
|
2020-05-17 11:16:48 +00:00
|
|
|
#
|
|
|
|
|
2021-08-06 00:47:31 +00:00
|
|
|
set -o nounset -o errexit -o pipefail
|
|
|
|
|
2020-05-26 08:30:44 +00:00
|
|
|
source ./vars.env
|
2020-05-17 11:16:48 +00:00
|
|
|
|
2021-03-30 05:17:58 +00:00
|
|
|
|
|
|
|
NOW=`date +%s`
|
|
|
|
GENESIS_TIME=`expr $NOW + $GENESIS_DELAY`
|
|
|
|
|
2020-05-17 11:16:48 +00:00
|
|
|
lcli \
|
|
|
|
new-testnet \
|
2021-08-06 00:47:31 +00:00
|
|
|
--spec $SPEC_PRESET \
|
2021-03-30 05:17:58 +00:00
|
|
|
--deposit-contract-address $DEPOSIT_CONTRACT_ADDRESS \
|
2020-05-17 11:16:48 +00:00
|
|
|
--testnet-dir $TESTNET_DIR \
|
2021-03-30 05:17:58 +00:00
|
|
|
--min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \
|
|
|
|
--min-genesis-time $GENESIS_TIME \
|
|
|
|
--genesis-delay $GENESIS_DELAY \
|
|
|
|
--genesis-fork-version $GENESIS_FORK_VERSION \
|
2021-07-09 06:15:32 +00:00
|
|
|
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
2022-12-02 14:20:43 +00:00
|
|
|
--bellatrix-fork-epoch $BELLATRIX_FORK_EPOCH \
|
|
|
|
--capella-fork-epoch $CAPELLA_FORK_EPOCH \
|
2023-03-26 15:49:16 +00:00
|
|
|
--deneb-fork-epoch $DENEB_FORK_EPOCH \
|
2022-12-02 14:20:43 +00:00
|
|
|
--ttd $TTD \
|
|
|
|
--eth1-block-hash $ETH1_BLOCK_HASH \
|
2022-06-29 09:07:09 +00:00
|
|
|
--eth1-id $CHAIN_ID \
|
2023-11-09 04:06:10 +00:00
|
|
|
--eth1-follow-distance 128 \
|
2021-07-31 03:50:52 +00:00
|
|
|
--seconds-per-slot $SECONDS_PER_SLOT \
|
|
|
|
--seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \
|
2022-12-13 09:57:26 +00:00
|
|
|
--proposer-score-boost "$PROPOSER_SCORE_BOOST" \
|
2022-11-30 17:15:06 +00:00
|
|
|
--validator-count $GENESIS_VALIDATOR_COUNT \
|
|
|
|
--interop-genesis-state \
|
2020-05-17 11:16:48 +00:00
|
|
|
--force
|
|
|
|
|
2022-12-02 14:20:43 +00:00
|
|
|
echo Specification and genesis.ssz generated at $TESTNET_DIR.
|
2020-05-26 08:30:44 +00:00
|
|
|
echo "Generating $VALIDATOR_COUNT validators concurrently... (this may take a while)"
|
|
|
|
|
|
|
|
lcli \
|
|
|
|
insecure-validators \
|
|
|
|
--count $VALIDATOR_COUNT \
|
2021-03-30 05:17:58 +00:00
|
|
|
--base-dir $DATADIR \
|
2023-09-09 06:10:15 +00:00
|
|
|
--node-count $VC_COUNT
|
2020-05-26 08:30:44 +00:00
|
|
|
|
2021-03-30 05:17:58 +00:00
|
|
|
echo Validators generated with keystore passwords at $DATADIR.
|