mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
22591deced
When the connect_to_testnet script is invoked it will first verify that the genesis file of the testnet hasn't changed. If it has changed, any previously created database associated with the testnet will be erased. To facilitate this, the genesis file of each network is written to the data folder of the beacon node. The beacon node will refuse to start if it detects a discrepancy between the data folder and any state snapshot specified on the command-line. Since the testnet sharing spec requires us to use SSZ snapshots, the Json support is now phased out. To help with the transition and to preserve the functionality of the multinet scripts, the beacon node now supports a CLI query command that can extract any data from the genesis state. This is based on new developments in the SSZ navigators.
Work in progress. Things may and probably will break for the foreseeable future. Do not rely on this for anything.
Connecting to Testnet
To connect to a short-lived testnet we may or may not have running at the moment, use the connect_to_testnet
script like so:
scripts/connect_to_testnet.sh testnet0
Running your own testnet
The beacon_node
binary has a createTestnet
command.
nim c -r beacon_chain/beacon_node \
--data-dir=$DATA_DIR/node-0 \
createTestnet \
--validators-dir=$NETWORK_DIR \
--total-validators=$VALIDATOR_COUNT \
--last-user-validator=$LAST_USER_VALIDATOR \
--output-genesis=$NETWORK_DIR/genesis.ssz \
--output-bootstrap-file=$NETWORK_DIR/bootstrap_nodes.txt \
--bootstrap-address=$PUBLIC_IP \
--genesis-offset=600 # Delay in seconds
Replace ENV vars with values that make sense to you.
Full tutorial coming soon.
Maintaining the Status testnets
For detailed instructions, please see https://github.com/status-im/nimbus-private/blob/master/testnets-maintenance.md