Proof-of-work consensus mechanism is a term in crypto mining that is used to describe the measure of computational effort expending by a miner towards validating a Bitcoin transaction into the public ledger or blockchain network. The validator shows proof to others that he deserves to be rewarded for his efforts.
The consensus protocol ensures the stable operation of the blockchain system. The protocol creates a stable system among parties in a distributed network to prevent false claims and fraud.
Key Takeaways
•The main objective of consensus protocol is to retain the integrity of the blockchain system and avoid double validation of transactions.
•The Proof-of-work consensus first started with Bitcoin then Ethereum and some others joined. Ethereum 2.0 will move to Proof-of-stake soon.
•Proof-of-work relies on the power of the miner’s computing hardware which is determined by hashing power of the computer hardware.
Consensus Protocol
Blockchain consensus protocol ensures synchronization between all nodes in the network. Each consensus aims to answer a specific question…how can we ensure the authenticity of each transaction?
Anyone can submit information and decide to store it on a blockchain. It is therefore essential to be able to review this information and decide by consensus whether it is possible to add it to the network or not.
The term “consensus” means that all nodes in the network must agree on an identical version of the blockchain. Somehow, the consensus mechanism of a blockchain is an internal and automatic audit of its network.
This protocol is therefore essential and has two functions:
- It allows the blockchain to be updated while ensuring that every block in the chain is valid. The people participating in the validation of the blocks (called the “nodes” of the network) must have an incentive to become involved in the security of the network, this incentive generally taking the form of monetary reward.
- It prevents a single entity from controlling the entire network and thus guarantees its decentralization.
Top Cryptocurrencies That Uses The POW Consensus Mechanism
- Bitcoin
- Ethereum
- Litecoin
- Dogecoin
- Bitcoin Cash
- Zcash
- Dash
- Bitcoin SV
- Ethereum Classic
- Emercoin
- Sumokoin
- Stealth
- GridCoin
- And Monero.
Rules Governing the Consensus Protocol
A blockchain consensus follows specific rules. The nodes of the network will have to ensure that each block and each transaction meet a certain number of criteria before they can be validated.
Each data must receive the unanimous acceptance of all the nodes of the network to be validated.
SEE ALSO: What You Should Know About Proof Of History
The main objective of consensus protocols is to be able to prevent attacks that jeopardize network security.
A very common example of an attack is that of double-spending. It consists of issuing two transactions that spend the same credit.
The role of consensus is then to decide which of its two transactions can be considered as validated and which should, conversely, be canceled.
The consensus of a blockchain is defined from its creation by its founders. The most famous and the first of them is the work of proof (Proof-of-Work in English), used by the Bitcoin protocol.
How Proof-of-Work (PoW) Functions
Miners are those who strive to achieve consensus within the network as part of a proof-of-work blockchain. They collect all the transactions transmitted to them by the peer-to-peer network and save them in their mempool (memory pool).
While they collect the incoming transactions, they check if the transactions are valid according to the protocol and add them to the block they are currently working on. At the same time, they are working on solving a computationally expensive puzzle.
The miner who solves the puzzle shows his validated transaction through the PoW mechanism and adds the block to the blockchain. The miner receives a fraction of the coins validated for his work. Bitcoin miners get a reward of 6.25BTC per block. This activity occurs on average every 2.5 minutes, for Bitcoin, it takes an average of every 10 minutes.
The odds of solving a block are directly proportional to the computing power of a miner. If a miner had 10% of the network’s computing power, they would solve, on average, one in ten blocks.
Computing power is the finite resource of a PoW-based blockchain. It takes real-world resources, including mining equipment and electricity, to mine a cryptocurrency.
It is difficult for a single miner to control the majority of the network because there is an external cost linked to maintaining a register in a PoW. It’s a highly competitive environment, in which every miner constantly wants to increase their share of computing power or hash rate.
Miners need computing power because the complex mathematical puzzle they are trying to solve can only be solved by random guesses.
PoW only works because this problem is without optimization and approximation. Without optimization, there is no shortcut to trying out a large number of different solutions until you find a valid solution.
You can’t calculate a solution, you have to find it through a trial and error approach. Without approximation means that it is not possible to have part of the solution or “to be close to solving the problem”. Either you have a solution or you don’t, which makes it a binary situation.
All nodes and miners check the validity of a new block as soon as the block is discovered and broadcast on the network. If so, they delete any transactions that are already recorded on their mempool’s blockchain, which is the storage they use to collect transactions.
Miners start working on the next block to their mempool only containing transactions that have not been mined. This is how the network agrees on a single version of the history of all transactions of a blockchain as proof of work.
Let’s visualize:
Let’s say you know the number of the winning lottery ticket: 351. It would be nice to go to the box office and ask for a ticket with these numbers.
But you can’t, as tickets are randomly issued. All you can do is pay for your ticket and hope you get the lucky number: 351. If not, out of luck. Buy another ticket and try again.
The good news is that you can try as many times as you like. The bad news is that you have to pay for each new ticket.
In the lottery, each player hopes to get the winning number before the others. Likewise, every miner hopes that he can create a ‘winning’ hash before other miners.
If the miner found the correct “answer” first, he receives a reward in the form of blockchain cryptocurrency.
What are the Disadvantages of Proof-of-Work
- The first drawback is environmental damage. Mining consumes a monstrous amount of electricity. Computers wear out quickly, new ones come to replace them, and old ones are thrown away – so there are whole dumps of parts.
- The second drawback is protection. Proof of Work only provides sufficient security when there is a large group of miners competing for block rewards. If the network is small, the possibility remains that a hacker can get a simple majority of the processing power and reorganize the blocks as they please. This is also called a 51% attack.
Frequently Asked Questions (FAQS)
1. Why do we require proof of work?
Proof-of-work is required because it is intended to prevent users from printing additional coins that they did not earn or from double-spending. If users could spend their coins more than once, the money would basically become worthless. This is a simple problem to fix with most digital currencies.
2. Why is proof-of-work preferable to proof-of-stake?
There is an external element in a proof of work system, which is the amount of computing labor required to discover a solution. With proof of stake, there is nothing physically “anchoring” the blockchain in reality; consequently, PoS consensus appears to be more vulnerable to attacks.
Final Thoughts
There are many variations of consensus mechanism methodologies. In any case, the goal of the consensus approach is to secure the system, primarily through financial means.
It should be excessively expensive, making it impossible to attack the system and more profitable to keep it secure. The choice of the required consensus mechanism process should be dependent on the prerequisites of the project.
Read More