Practical Byzantine Fault Tolerance (pBFT): Complete Guide For Beginners
An American computer scientist named Barbara Liskov and a systems & networking, security, privacy, and cryptography researcher named Miguel Castro introduced a consensus algorithm called Practical Byzantine Fault Tolerance (pBFT) in the late 90s. The consensus algorithm pBFT could work efficiently in asynchronous systems was a purpose behind its design. It is used effectively and extensively for low overhead time. Solving problems related to Byzantine Fault Tolerance (BFT) was a goal of pBFT. Distributed computing and blockchain are application areas of pBFT.
BFT helps nodes on a distributed network to reach a consensus in the situation when some nodes fail to respond, while some nodes respond with incorrect information. Employing a collective decision making in order to protect systems against failures is an objective of BFT. Faulty nodes can be reduced. The collective decision making is done with correct and faulty nodes. Byzantine Generals’ Problem has contributions in the development of BFT.
Computer scientists named Leslie Lamport, Robert Shostak, and Marshall Pease explained Byzantine Generals’ Problem in 1982.
The Byzantine army has multiple divisions
Each division has its own general.
Each general will command its own division
The multiple divisions stand outside an enemy city
The generals will use messenger to communicate with one another
They observe enemies at first, then a common plan of action can be decided
Some generals can be traitors. They can stop loyal generals from reaching a consensus
The generals have to decide the time of attacking the enemy city. Armies in the majority are required for attacking simultaneously
The generals should have an algorithm.
The algorithm should guarantee that decisions of all loyal generals are on the same plan of action
It should also guarantee that the loyal generals don’t adopt a bad plan by influencing with some traitors. The loyal generals will do work according to what is there on the algorithm. Whereas traitors will do what they want. The loyal generals will reach a consensus and their agreement on a plan will be reasonable.
When good nodes in the network reach a consensus, then BFT will be achieved. Good nodes mean the correctly working nodes. A message from a particular node will be assumed to be faulty due to not receiving the message within a certain time limit. A default response can be assigned due to responding of a majority of nodes with a correct value.
Leslie Lamport stated that, if 2m+1 correctly working processors are there, then a consensus will be reached despite faulty of m processors. Over two-thirds processors can be strictly honest.
Fail-stop and arbitrary-node failure are the two types of failures.
In fail-stop, a node will fail and stop working further
In arbitrary-node failure, a result will come despite failure. Either an incorrect result, a deliberately misleading result, or a bizarre result will be responded.
Energy efficiency, transaction finality, and low reward variance are the benefits of pBFT.
In energy efficiency, nodes don’t need to perform complex mathematical equations to achieve a consensus. Therefore, energy will not be required extensively. The combination of pBFT and PoW is used by Zilliqa for every 100th block.
In transaction finality, no need for multiple confirmations of transactions like PoW. In PoW, every node confirms transactions of a block individually in order to add the block to the existing blockchain. 10-60 minutes are hardly required for the confirmation of transactions. Numbers of nodes confirming a particular block will decide the time. Therefore, transactions in pBFT will be finalized within less time.
In low reward variance, each node will respond to a client’s request by taking part. Each node can be provided with incentives which lead to low variance.
If nodes in a distributed network are less, then pBFT will work efficiently. If nodes increase over time, then the high communication overhead will also be increased exponentially
pBFT can be subjected to Sybil attacks. In Sybil attacks, one malicious node can control many identities in order to subvert the reputation system of a peer-to-peer network. The difficulty to handle Sybil attacks will be increased due to the increase of nodes.
pBFT has issues related to scalability. It is combined with other mechanisms for further use. The high communication overhead creates difficulty for pBFT to scale up.
A scalable, secure, and public blockchain platform called Zilliqa combines pBFT with PoW for its use. A blockchain framework implementation called Hyperledger Fabric is using a permissioned version of pBFT. A software called Tendermint is using pBFT in combination with DPoS(Delegated Proof-of-Stake).
RBFT – Redundant BFT, ABsTRACTs, Q/U, HQ – Hybrid Quorum Protocol for BFT, Adapt, Zyzzyva – Speculative Byzantine Fault Tolerance, and Aardvark are some of the variations proposed and employed earlier with the objective to improve the quality and performance of pBFT.
A client will send a request to the leader node in the network. The main purpose of the leader node is to broadcast the request to other nodes. The requested service will be performed by the leader node and other nodes as well. They will, later on, send a reply to the client. If the client receives the reply of ‘m+1’ from different nodes with the same result, then the request will be served successfully. M is denoted as a faulty node. The maximum number of faulty nodes can be on M.
*Every pBFT rounds will have different leader nodes. The leader node can be replaced due to not broadcasting of the request to other nodes within a predefined time. View change protocol is likely to substitute the leader node. If it is required to replace the current leader node with the next leading node, then the legitimacy of the current leading node will be voted by honest nodes in the majority.
A practical Byzantine state machine replication can be provided by pBFT. It can continue to work in the situation when malicious nodes attack the existing system. In pBFT, there will be two types of nodes viz., the primary node which will be known as the leader node. While the secondary node which will be comprised of other nodes rather than the leader the nodes. An eligible node from the secondary node will be selected as the primary node. The goal of pBFT is that all honest nodes should reach a consensus. A condition is defined as malicious nodes should not be greater than or equal to one-third of the total nodes. The pBFT will operate on the condition. If honest nodes increase, then the system will be secure greatly.
Read the full article