It is done in three steps:
- Generate keys for various parts of bootstrap network (there are lot of them!)
- Generate Zerostate
- Generate Node's configuration
In general you need at least one DHT node and at least one validator. To participate in elections you need at least three validators running, but network could be bootstrapped with a single one.
You need to edit configuration of initial network in script-config.ts
.
To generate keys execute command:
yarn keys
This will generate:
- One key for each DHT server
- One common lite server key
- One common validator control server key
- One common validator control client key
- One validation key per validator
- Three ADNL keys per validator
To generate zerostate execute command:
yarn zerostate
this will generate zerostate for network
To generate configuration for nodes execute command:
yarn nodes
Then copy to nodes and launch network starting from DHT.
systemctl stop dht-server
cd /var/ton-dht-server/
rm -fr *
<copy dht to this node>
chown -R validator:validator .
systemctl start dht-server
yarn launch
MIT