Skip main navigation

Blockchain Consensus: What Is It and Why Do We Need It?

In this video, we take a look at what a blockchain consensus is and why we need it.
In the previous videos, we dissected the blockchain as decentralized database system by looking at how user identities are designed and maintained, how data are stored in a “chain format” on the block chain, and how data are transmitted across the network of nodes and organizing into blocks at fixed intervals. There’s one component that’s still missing. This is not a traditional database server where there’s one node receiving and processing all the data. In a public blockchain, we have a decentralized system of thousands to millions of nodes connected on the Internet. Each one of them is out there listening on their own and receiving and processing data on their own.
A major downside of this setup is that, well, it’s a big Internet out there. These nodes could be located all across the world with different connection speeds and latency. One node could be a supercomputer with a lightening fast fiber optic connection and another could be a dingy laptop connected to a coffee shop WiFi. So information that’s broadcast to the entire network will take longer to reach some nodes and reach others quickly. Therefore, at any point in time, each of the nodes could very likely receive different sets of information from different users but there has to be only one blockchain.
So we need a consensus process to periodically reconcile these different datasets across the nodes to ensure that despite the differences, at the end of the day, there’s only one “master copy” that’s shared by all nodes. This is now the only problem of decentralized record keeping. Notice that in an open system like Bitcoin or Ethereum, there’s no restriction on who could become a node. Unlike a private system, there’s no vetting whatsoever and anyone with a computer can download the software and become a miner in a couple of seconds. Therefore, it’s very likely that some of these nodes are not honest.
They could be controlled by bad actors and generate fraudulent data with the hope that it might end up on the blockchain and benefit themselves. Therefore, a consensus protocol is also needed to hopefully deter this behavior, this problem of malicious nodes, together with the previous problem of non-synchronous data constitute the so-called Byzantine generals problem, which is the mathematical description of the fundamental limitation of decentralized record keeping systems like a blockchain. Consensus protocols exist to address this Byzantine generals problem. So to recap in a blockchain, consensus is an algorithm that makes the decentralized record keeping more similar to a centralized database. It’s an automated process to ensure that there exists only one single valid copy of record shared by all the nodes.
Here, you want to be very careful about what is not. A consensus protocol gets you a unified copy of data across all the nodes. However, it does not get you higher-quality data or makes the sharing process more secure than traditional database. A lot of blockchain marketing materials will promote the height that because of consensus, the blockchain data is somehow more secure and less subject to fraud than those in a regular database and this is simply not true. Consensus is just a process of reconciling the differences, not a magical process that enhances user security or reduces fraud. There are many type of consensus protocols which often serve as the distinguishing feature of a blockchain implementation.
Will take a deeper look at them in the next few videos.
This article is from the free online

Cryptocurrency and Blockchain Technology Explained

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education