In our previous, we examined what Consensus Algorithm is, how it works, how it is applied and the different types in the blockchain space. In this chapter, we are going to be looking at the Consensus Mechanism(algorithm) deployed on the Ethereum Blockchain which is Proof of Work(PoW)
According to Ethereum, Proof of Work is the mechanism that allows the decentralized Ethereum network to come to consensus, or agree on things like account balances and the order of transactions. This prevents users from “double spending” their coins and ensures that the Ethereum chain is tremendously difficult to attack or manipulate.
Proof-of-work is the underlying algorithm that sets the difficulty and rules for the work miners do. Mining is the “work” itself. It’s the act of adding valid blocks to the chain. This is important because the chain’s length helps the network follow the correct Ethereum chain and understand Ethereum’s current state. The more “work” done, the longer the chain, and the higher the block number, the more certain the network can be of the current state of things.
How Ethereum’s Proof of Work(PoW) Works
Ethereum transactions are processed into blocks. Each block has a:
Block Difficulty – for example: 3,324,092,183,262,715
MixHash – for example: 0x44bca881b07a6a09f83b130798072441705d9a665c5ac8bdf2f39a3cdf3bee29
Nonce – for example: 0xd3ee432b4fb3d26b
The proof-of-work protocol, Ethash, requires miners to go through an intense race of trial and error to find the nonce for a block. Only blocks with a valid nonce can be added to the chain. When racing to create a block, a miner will repeatedly put a dataset, that you can only get from downloading and running the full chain (as a miner does), through a mathematical function. The dataset gets used to generate a mixHash below a target nonce, as dictated by the block difficulty. The best way to do this is through trial and error.
The difficulty determines the target for the hash. The lower the target, the smaller the set of valid hashes. Once generated, this is incredibly easy for other miners and clients to verify. Even if one transaction were to change, the hash would be completely different, signalling fraud. Hashing makes fraud easy to spot. But proof-of-work as a process is also a big deterrent to attacking the chain.
Quite technical, isn’t it? You can go over it again for better comprehension.
Miners are incentivized to do this work on the main Ethereum chain. There is little incentive for a subset of miners to start their own chain – it undermines the system. Blockchains rely on having a single state as a source of truth. And users will always choose the longest or “heaviest” chain.
The objective of proof-of-work is to extend the chain. The longest chain is most believable as the valid one because it has had the most computational work done. Within Ethereum’s PoW system, it’s nearly impossible to create new blocks that erase transactions, create fake ones, or maintain a second chain. That’s because a malicious miner would need to always solve the block nonce faster than everyone else.
To consistently create malicious yet valid blocks, you’d need over 51% of the network mining power to beat everyone else. You’d need a lot of computing power to be able to do this amount of “work”. And the energy spent might even outweigh the gains you’d make in an attack.
What do you think of this article ? Let’s hear from you in the comment section!
Latest Episode on Inside Blockchain
Crypto News Update
Blue Chip NFTs: What are they and Why are they Popular?
NFTs came into the global market after the frenzy of cryptocurrencies with earlier projects like CryptoPunk in 2017. By 2021,...
Court Orders Liquidation of Three Arrows Capital
Three Arrows Capital has been ordered to be liquidated by a British Virgin Islands court. The liquidation of Three Arrows...
Iran to Roll Out Test Version of its CBDC; Crypto Rial
The Tehran government set to release crypto rial; Iran’s new digital currency. The test stage is slated to begin within...
The Harmony Horizon’s Bridge Feared Hacked for $100 Million
The Harmony network’s Horizon Bridge has been halted as it is suspected of being hacked for up to $100 million...
Move-to-earn: Get Rewarded For Your Everyday Activity on Actifit
Technology is transforming our daily lives; innovative technological solutions are having an impact on many aspects of life and living....