To have your independent Conflux chain with multiple nodes in the production
mode, you need to ensure that your nodes can be connected to other nodes in
this chain, and will not connect to other chains (like our testnet).

To achieve this, you should setup your own boot node, and let other nodes
connect to it. Then they will connect to others with our discovery protocol.

You need the IP address, the port number, and the node id of the bootnode for
others to connect. The node id is the public key corresponding the the node's
unique private key for identification at the network layer. And here is an
instruction to let the bootnode generate its private key automatically, and get
the node id through the log file.

If you are editing based on our provided default.toml, you need to
comment out the bootnode entry. Otherwise the node will connect to the
existing Conflux net.

Launch the bootnode, and find the node id in the console print out. The
information for node id is Self node id: $ID where $ID is the 0x-prefixed
node id of this bootnode. Remove the 0x prefix and you'll get the node id
$NODEID. If you missed the line from the screen, you can look at the log file
with:

bash
grep "Self node id" log/conflux.log|awk '{print $9}'|tr -d '0x'

Now we have the $IP, $PORT$, and $NODEID of the boot node, we can get
the url for this boot node with the format cfxnode://$NODEID@$IP:$PORT.
Denote this as $BOOTNODE_URL.

Start other nodes by setting bootnodes="$BOOTNODE_URL" in their
configuration.

Note that with the instruction above, other nodes connected to the boot node
will stay in untrusted state for a while (3 days by default), and untrusted
nodes will not be broadcast in our discovery protocol. Thus, the network
structure will be a star with the boot node in the center before other nodes
are promoted to trusted state. You can change node_table_promotion_timeout_s
in the configurations to make this period shorter.

You can also setup multiple bootnodes at the very beginning. However, this
cannot be done by simply replaying the boot node setup steps above multiple
times, because you need to set bootnodes of every boot node before they are
started.

One way to achieve this is to start these bootnodes and stop them immediately.
Then gather their node ids, set their configuration, and restart them all.

Another better way is to generate their private keys seperately, and manually
set their net_key to start. This can be done with the functions provided in
our python test framework in the directory test.

Then you can construct the bootnode url with the generated node id, and start
each node by setting the net_key="$NET_KEY" field to the private key or pass
it with the command line option --net-key $NET_KEY.

Every line is an account. The key is the account address, and the value is a
string representing its balance in Drip. Note that genesis_accounts does not
apply if mode is test or dev.

If the mode is test or dev, you can setup the genesis accounts with their
secret keys by setting genesis_secrets. Each line is an account private key
without 0x-prefix. The balance of each account is set to
10000000000000000000000 by default.