Bitcoin – Consensus in an Open System

We had seen how we could establish a consensus mechanism in a closed environment. However, in an open environment like bitcoin where anyone can join the network anytime. The biggest challenge is how to ensure consensus in an open system. To understand the challenge, we will first understand why we need a consensus mechanism when we utilize blockchain as the backbone for Bitcoin Cryptocurrency.

Why do we require consensus in Bitcoin Network?

Bitcoin is a peer-to-peer network, and when Alice broadcasts a transaction in this peer-to-peer network, all the nodes in this network need to agree on the correctness of this transaction.

This kind of broadcast is different from the traditional message-passing system. In a traditional message-passing system, we need to know the peer nodes to whom we need to send a message. But, this kind of broadcasting works like flooding. In this sense, Alice sends the message to the subset of nodes who she knows, then those nodes will further send the message to another subset of nodes, and those nodes will again send and so on. In this way, by flooding the message in the network, the message will get propagated. But flooding is costlier compared to a normal message-passing scheme. That’s why the peer nodes drop already seen messages.

Broadcast the message in the Bitcoin Network
Broadcast of message in the Bitcoin Network

We required the consensus because all the nodes in this network need to agree on the correctness of these transactions. How will we ensure that the transaction is actually coming from Alice and not from an attacker?  The attacker may also be impersonating Alice and can send the transaction in the network. So the network needs to find the outcome to a consensus that this particular transaction is coming from Alice and not from an attacker.

A node does not know all the peers in the network as this is an open network. It may be possible that some nodes can also initiate malicious transactions and that need to be prevented by the network.

Every node has a block of transactions that have already reached the consensus, which means the block of committed transactions stored in the form of a blockchain.

Blockchain list
Bitcoin – Blockchain List

The nodes also have a list of outstanding transactions that need to be validated against the block of committed transactions or existing blockchain. Consensus can be performed on the transaction in the following ways:

  • Per transaction Consensus: The consensus algorithm will be run for each transaction, and the transaction list will be maintained in the network. This scheme can be named a transaction chain. However, the scheme wouldn’t be efficient, as we have to run the consensus algorithm for every individual transaction. 
  • Block-based Consensus: The consensus algorithm will be run on a block of transactions. A list of outstanding transactions forms a block, and after consensus, a block will be added to the blockchain. This is a more efficient implementation of a consensus as the consensus algorithm needs to run on a block rather than per transaction.

References

  • NPTEL lecture series on Blockchains Architecture, Design and Use Cases by Prof. Sandip Chakraborty, IIT Kharagpur.

 264 total views,  1 views today

Scroll to Top
Scroll to Top