Skip to content

Deployment: Add/Remove a Node from the Network

Add a Node to a Network

Assumptions

  1. There is an existing STRATO network which is an operational PBFT network
  2. The network to be added currently does not have an assigned blockstanbul validator or private key

Steps to Add a Node

  1. SSH or otherwise navigate onto the node you'll be adding
  2. bash git clone https://github.com/blockapps/strato-getting-started cd strato-getting-started\
  3. Copy the run script from one of the existing nodes to your new node.

    Your run.sh script should contain the following:

    • blockstanbulPrivateKey=<your-new-node-private-key>
    • validators= the list of validators that the nodes on the existing network were started with
    • blockstanbulSkipCheck=true

    The blockstanbulRoundPeriodS and blockstanbulBlockPeriodMs should be the same as the existing network. In most cases, the block period is not set

    The BOOT_NODE_IP listed should be for a node that is listed in the current validator pool.

  4. Generate a private key/address pair for the new node by running bash ./strato --keygen 1 from within the STRATO directory on the new node.
    In the run.sh script, replace the NODE_HOST value with your new node's IP address. Replace the private key with the new key you have just generated.

  5. Navigate to each of your existing nodes. Then, on each existing node, execute:
    blockstanbulPrivateKey=<admin_private_key> ./strato --blockstanbul-vote --username=admin --password=admin --node=<node_name> --nonce=<nonce-provided> --recipient=$newAddress
    
    The admin_private_key can be any one of the blockstanbulAdmins listed in the blockstanbulAdmins array used on the run script for that node. When you provide a nonce to use for the command, the nonce you choose to use must be higher than any other nonces used by that address on that node.
  6. After each node with a pending vote has proposed a block, it should be a member of the validator pool.
  7. Return to the new node and modify the run.sh script to start your new node.

The new node should be watched to see that its sequence numbers are increasing. From the web you can verify this at http://<NODE_HOST>/prometheus/consoles/pbft-overview.html, or you can see this using the CMD, if you have deployed a monitoring dashboard and have added the node to the list you are watching.

Remove A Node from a Network

Assumptions

  1. There is an existing STRATO network which is an operational PBFT network
  2. The address of the node to be removed, which was previously generated by ./strato --keygen 1 and used to add the node to the network, is known by the user.

Steps to Remove A Node

  1. Navigate to each of your existing nodes. Then on each existing node, execute:

    blockstanbulPrivateKey=<admin_private_key> ./strato --blockstanbul-vote --username=admin --password=admin --node=<node_name> --nonce=<nonce-provided> --recipient=$addressToBeDeleted --remove
    
    The admin_private_key can be any one of the blockstanbulAdmins listed in the blockstanbulAdmins array used on the run script for that node.

    When you provide a nonce to use for the command, the nonce you choose to use must be higher than any other nonces used by that address on that node. Node_name should be the IP address or the hostname of the node you are removing. addressToBeDeleted is the address of the node generated by ./strato --keygen 1, which was previously used to add the node into the network.

    Note

    Specifically, you need at least (⅔) + 1 of the nodes to vote out a node from the network. Having each existing node submit a vote to remove will further ensure that the intended node is successfully voted out.

  2. After each node with a pending vote has proposed a block, the node being removed should no longer be a member of the validator pool.