How are Blockchain systems secured?
Methods to ensure security and validity
In my last article, “How to Derail a Blockchain?”, we saw the two attacks- Sybil attack and 51% attack- towards which blockchain systems are vulnerable. In this article, I look into the various methods by which blockchain systems are secured.
CONSENSUS PROTOCOLS
The security and the correctness of blockchain systems are achieved by using Consensus Protocols. The Consensus Protocols are methods or mechanisms by which the validators/miners/nodes of a system agree on the state of a blockchain. The Consensus Protocols generally have two parts to them-
- Sybil Resistance Mechanism- The most important and widely mechanism to prevent Sybil attacks is Proof of Work(PoW) and Proof of Stake(PoS). Under PoW each of the nodes has to undergo a very computationally expensive process like finding a nonce which makes the leading digit of the hash of the block a 0. All the nodes or miners have to go through this process again and again. With the PoS, the nodes/validators have to put in collateral, and misbehavior on the network leads to the loss of collateral. These methods prevent Sybil attacks by making it difficult for the “fake nodes” to contribute by it computationally or monetarily difficult.
- Chain Selection Process - It is a process by which the nodes identify which is the correct blockchain to which new blocks have to be mine and added. The simplest of the chain selection procedure is the “longest chain rule”. The rule specifies that the blockchain version with the lost chain is the selected blockchain of use. It makes sense as longer the blockchain more and more computation by the PoW or PoS has been used to verify the integrity of the chain.
Bitcoin and Etheruem currently use the Nakamoto Protocol as the consensus protocol. The Nakamoto Protocol uses the “longest chain rule” for the chain selection process. Currently, for the Cybil Resistance Mechanism, the method used is still Proof of Work(PoW). With the launch of Eth2.0, it is expected that Ethereum move away from Nakamoto Protocol by using Proof of Stake over Proof of Work.
BLOCK CONFIRMATIONS
A block confirmation is simply the act of confirming your transaction is included in a block on the blockchain. This is characterized by the number of blocks that have been added to the blockchain after the block containing your transaction was mined.
The more the block confirmation more unlikely for your transaction to be made void. Generally, a transaction is considered a success (or completed) after a different number of confirmations on different networks-
BTC (at least 1 block confirmation)
ETH (at least 36 blocks must be confirmed)
LTC (at least 36 blocks need to be confirmed)
Note- The block confirmations change from time to time.
As in this article, we saw the various consensus protocols used by blockchain to maintain security and integrity. In the next article, I will talk about the Sybil resistance mechanism in detail and also introduce to you the other mechanism apart from PoW and PoS.