How to Setup Multiple BigchainDB Nodes

How to Setup Multiple BigchainDB Nodes

Posted By : Harikesh Maurya | 30-Oct-2019

BigchainDB node has three main components:-

1. BigchainDb

2. Tendermint

3. MongoDB


Let’s take a tour of how they connect to each other and how they work.


  1. Transaction is Posted to BigchainDB web frontend

  2. Transactions are collected into a block

  3. Block is sent to Tendermint for replication

  4. Tendermint asks each node to CHECK the block.

  5. Node validates block schema and ID and says valid if it's valid

  6. Tendermint asks each node to DELIVER the block.

  7. Node write block to bigchainDb table.

  8. Voting pipeline votes on block validity


Tendermint is the software through Bigchaindb replicate the data from one machine to other machines securely and consistently. So Tendermint play an important role in multiple node connection.


There are two ways to add more nodes to the network

  1. We can add a new node as a validator node

  2. Or, we can add a new node as a non-validator node


Non-Validator Node Setup

Non-Validator Node is not participating directly, but will verify and keep up with the consensus protocol.  


These are the following steps to add non-validator node:-

  1. Copy the genesis.json file of coordinator node present in ~/.tendermint/config.

  2. And paste it  in ~/.tendermint/config of other node

  3. Run Tendermint init, it will create priv_validator.json with respect  to the new JSON (Note:- if priv_validator is already found .Please regenerate because init never overwrite the existing one)

  4. Run Tendermint node using --p2p.persistent_peers command.  


Re-generate priv_validator.json file

  1. Run Tendermint gen_validator it will create new priv_validator.json

  2. Overwrite old priv_validator.json with the new one.  

  3. Run Tendermint unsafe_reset_all (Remove all the data and WAL, reset this node's validator to genesis state)


Validator Node Setup

Validator node is also participating in the consensus by proposing blocks and voting on them.


These are the following steps to add validator node

  1. Add validators in the  genesis.json before starting the network. Example is given below 

                "value":"<Member 1 public key>"
             "name":"<Member 1 name>"
                "value":"<Member 2 public key>"
             "name":"<Member 2 name>"


  1. Generator new priv_validator.json

  2. Copy its pub_key into genesis.json

  3. Update the new genesis.json  into ~/.tendermint/config

  4. Copy the new genesis.json and priv_validator.json into the new machine.

  5. And run Tendermint node on both the machine using --p2p.persistent_peers. 

    Note: The key ‘name’ is the Member’s moniker

About Author

Harikesh Maurya

Harikesh is an Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in Java Enterprise Edition, Java, Spring Boot, Spring Security, and Hibernate. He has a good sense of humor.

Leave a Comment

Name is required

Comment is required

Leave a Comment

    Request For Proposal

    Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.

    We would love to hear from you!

    Oodles | Blockchain Development Company

    Please enter a valid Phone Number

    Please remove URL from text

    Recaptcha is required.