Proof of work was the first Consensus Mechanism in blockchain technology. To learn more about this concept, let’s start from the beginning.
According to Chris Berg, a Principal Research Fellow at RMIT University and co-founder of the RMIT Blockchain Innovation Hub, the Consensus Mechanism is the key invention of blockchain technology.
As Berg highlights:
“All blockchains need some way to come to agreement about what the contents of their shared ledger is. All blockchains need a way for the network to agree which transactions to add and in which order.”
In other words, the Consensus Mechanism is a system used to verify transactions and maintain the security of a blockchain network.
According to Berg, achieving an agreement is easy in a centralized system. The central authority:
>> Holds a master copy of the ledger
>> Notifies everyone of changes to the ledger
>> Ensures that everyone is keeping an accurate copy.
So, how do you come to an agreement without that central authority?
To answer the question above, we need to understand better what it means to achieve efficient communication and agreement in a decentralized environment.
As Berg notes, we must think about the Byzantine Generals’ Problem.
>> Context: A Byzantine army surrounds a castle on different sides.
>> Organization: The army is organized into divisions, each led by a general.
>> Question: How can the generals come to an agreement on when they should attack the castle?
>> Problem #1: There’s a challenge to ensure good communication between generals. Moreover, the communication can be intercepted by the enemy.
>> Problem #2: Some generals may be corrupt. They may want to disrupt the coordinated offensive intentionally.
As Berg indicates:
“The Byzantine Generals’ Problem describes the challenge of achieving a consensus in a distributed decentralized system when information flows in perfectly and in the presence of adversaries.”
A Consensus Mechanism is needed to ensure undisrupted communication and agreement among the decentralized system’s players.
Satoshi Nakamoto introduced a Bitcoin Consensus Mechanism called the Proof of Work to solve this dilemma.
Proof of Work is an algorithm launched on the Bitcoin network in 2009 to solve the “Double Spending” problem, which aims to keep system players from attempting to spend the same asset twice.
Imagine someone spending $100 twice. This situation creates duplicate coins. Also, it reduces the coin’s value, making the currency worthless and unpredictable.
A centralized system, for example, would keep this from happening. On the blockchain, however, this is more difficult to control.
The Proof of Work solved this problem by validating, storing, and making public all existing transactions.
Proof of work requires nodes on the network to perform a complex mathematical puzzle called mining, a process used to generate new coins and verify new transactions on the blockchain.
The Proof of Work algorithm rewards miners for solving mathematical problems to verify transactions and create new blocks.
As a way of verifying the legitimacy of transactions on the network, this mathematical puzzle has a key feature:
>> The puzzle must be challenging for the miner to solve but easy for the network to check.
All the network miners compete to be the first to find the solution through multiple attempts.
As a reward for solving the puzzle and verifying transactions, the miners are paid with cryptocurrency from the network. Once verified, the transactions are placed in a block and added to the public blockchain.
The more miners there are, the more difficult the network makes it to verify transactions and get the reward. As a result, the miners are invested in continuously optimizing their ability to verify transactions.
That’s why you’ve probably heard that the Proof of Work algorithm is not sustainable. The network participants are incentivized to expand the energy involved in solving the mathematical puzzles. As a result, massive amounts of energy are spent on mining.
According to an MIT Technology Review article:
“Decentralization comes at a hefty cost. In the case of proof of work, that cost is computing power. Proof of work pits miners against each other, as they compete to solve a difficult math problem. Any miner who solves the problem first, updates the ledger by appending a new block to the chain, and gets newly minted coins in return. This requires an enormous amount of computing power and, thus, electricity.”
What’s the solution? Moving to other Consensus Mechanisms, such as the Proof of Stake, that doesn’t require extra energy. Stay tuned to learn more about it.