Participants connection to the network¶
The moment of the first node running is the beginning of the new blockchain net creation. You can create the blockchain net from the starting only one node, further you can add new nodes as required.
Connection of a new node to the existing net¶
You can add new nodes into the net at any time. The configuration files setting is described in the section Installing and running the Waves Enterprise platform. Perform all these actions and run the node. The following steps are making:
The new node user gives the public key and the node description to the net administrator.
The network administrator (the node with “Connection-manager” role) uses the received public key and description for the 111 RegisterNode transaction creation with the
Transaction falls to the block and further into the nodes states of network participants. As a result of the transaction among the stored data, each participant of the network stores the public key and the address of the new node.
If necessary, the network administrator can add additional roles to the new node using the transaction 102 Permit.
The user runs the node.
After starting, the node sends handshake-message with its public key to the participants from the “peers” list of its configuration file.
Network participants compare the public key from the handshake message and the key from transaction 111 RegisterNode sent earlier by the network administrator. If the check is successful, the network participant updates its database and sends the Peers Message message to the network.
Having successfully connected, the new node synchronizes with the network and receives the address table of the network participants.
Deleting the node¶
The network administrator creates the 111 RegisterNode transaction with the parameter
"opType": "remove"and the public key of the removed node within.
This transaction is fell into the block and approved by other nodes.
After accepting the transaction the nodes find the public key specified in the transaction 111 RegisterNode in their state and delete it from there.
Then nodes delete the network address of the removed node from the
network.known-peersof the node configuration file.