Understanding Byzantine Fault Tolerance (BFT)

Introduction to distributed network:

A distributed ledger is a type of database that is shared, replicated, and synchronized among the members of a decentralized network. The distributed ledger records the transactions, such as the exchange of assets or data.

Participants in the network govern and agree by consensus on the updates to the records in the ledger. Every record in the distributed ledger has a timestamp and unique cryptographic signature, thus making the ledger an auditable, immutable history of all transactions in the network.

When a new transaction is broadcasted to the network, nodes have the option to include that transaction in their copy of the ledger or to ignore it. When the majority of the actors (or nodes) in the network agree, the consensus is achieved.

What is Byzantine Fault Tolerance (BFT)

Derived from the term ‘Byzantine Generals Problem’, BFT defines system characteristics in which a distributed network correctly reach consensus despite the presence of malicious nodes in the system sending out incorrect information. In simple terms, Byzantine Fault Tolerance is the ability of a distributed network to correctly reach a consensus.

Let’s understand Byzantine Fault Tolerance through the following example:

Byzantine army:  Image multiple divisions of the army each commanded by a general camped outside the enemy city. The generals can communicate only through the messenger. After observing the enemy, they must decide upon a common action.

For a successful attack, all generals must attack the city at the same time. However, some of the generals may be traitors, trying to prevent the loyal generals from reaching an agreement.

The generals must have an algorithm to guarantee that 
(a) all loyal generals decide upon the same plan of action, and 
(b) a small number of traitors cannot cause the loyal generals to adopt a bad plan.

The loyal generals will all do what the algorithm says they should, but the traitors may do anything they wish. The algorithm must guarantee conditions regardless of what the traitors do. The loyal generals should not only reach an agreement but should agree upon a reasonable plan.

Many consensus protocols exist to secure a blockchain network. Like Bitcoin uses Proof-of-Work and Practical Byzantine Fault Tolerance used by Hyperledger Fabric, Harmony, etc. When it comes to Proof-Of-Work based networks, malicious attackers need 51% hash-power to decouple the network. In Jan 2019, $1 million worth of ETC got stolen using 51% attack. To achieve such an attack in the Bitcoin network is difficult due to the high cost.

In comparison, Practical Byzantine Fault Tolerance (PBFT) requires consensus from more than â…” of nodes. This makes it more secure than the Proof-Of-Work system. 

Other benefits of Practical Byzantine Fault Tolerance consensus mechanism over PoW

  • Transaction finality: In PBFT, there is no waiting period to ensure a transaction is secure unlike in the case of the PoW system where individuals or merchants have to wait for 5-6 block confirmations to ensure new block settlement finality i.e. occurrence of an event is final and permanent.
  • Energy efficiency: Unlike proof of work consensus mechanisms, PBFT can achieve network consensus without requiring energy-intensive computations. 

Weaknesses in PBFT consensus mechanism

  • Scaling validators: PBFT is a promising consensus only when the group of nodes is small but becomes inefficient for large networks. This is because each node must communicate with each other to keep the network secure. This results in huge communication costs as the number of nodes scales upwards. This complexity is dreadful for a system having thousands of nodes. Such an arrangement could yield communication complexity as O(n^2). Where n is the number of nodes and O is the communication message.
  • Sybil attacks: Given the limitation of the nodes which can join the network in PBFT, with a small group of nodes, it becomes an easier target for Sybil attacks. A single party can easily join the network with a large number of nodes and thus could compromise security. 
  • June 27, 2019