Posted By : Harikesh
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.
Transaction is Posted to BigchainDB web frontend
Transactions are collected into a block
Block is sent to Tendermint for replication
Tendermint asks each node to CHECK the block.
Node validates block schema and ID and says valid if it's valid
Tendermint asks each node to DELIVER the block.
Node write block to bigchainDb table.
Voting pipeline votes on block validity
NOTE:-
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
We can add a new node as a validator node
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:-
Copy the genesis.json file of coordinator node present in ~/.tendermint/config.
And paste it in ~/.tendermint/config of other node
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)
Run Tendermint node using --p2p.persistent_peers command.
Re-generate priv_validator.json file
Run Tendermint gen_validator it will create new priv_validator.json
Overwrite old priv_validator.json with the new one.
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
Add validators in the genesis.json before starting the network. Example is given below
"validators":[ { "pub_key":{ "type":"AC26791624DE60", "value":"<Member 1 public key>" }, "power":10, "name":"<Member 1 name>" }, { "pub_key":{ "type":"AC26791624DE60", "value":"<Member 2 public key>" }, "power":10, "name":"<Member 2 name>" }...
Generator new priv_validator.json
Copy its pub_key into genesis.json
Update the new genesis.json into ~/.tendermint/config
Copy the new genesis.json and priv_validator.json into the new machine.
And run Tendermint node on both the machine using --p2p.persistent_peers.
Note: The key ‘name’ is the Member’s moniker
November 21, 2024 at 12:51 pm
Your comment is awaiting moderation.