Blockchains are the centerpieces of most decentralized crypto ecosystems, providing the safety, functionality, and spine for each. Proof-of-Work (PoW) is the original, oldest way of securing blockchains, with Bitcoin (BTC) being the most notable example who still utilizes it. Today, we’ll explain everything you need to know about how blockchains with a Proof-of-Work (PoW) consensus mechanism work with all details included.
Let’s begin by taking a quick look at what Proof-of-Work (PoW) really is. Essentially, PoW is a consensus mechanism that bases mutual agreement on computational work performed, which is demonstrated by a certain predetermined outcome. In Bitcoin’s case, this is a so-called hash value that is a 64 bit hexadecimal string of numbers and characters.
To get this, Proof-of-Work validator nodes (computers) often called miners need to place an entire block of transactions, their signatures, the previous block’s hash number, and a randomly guessed multiple-digit number called nonce into a SHA256 cryptographic hash function that transforms all that information into one 64-digit hexadecimal value. In Bitcoin’s case, the goal is to alter the nonce (nine-digit number) only so that the outcome will be a hash number that begins with 00000000000000000009, or less.
This means that there has to be 19 zeros in the beginning of the hash that the function results in, which must be followed by a number lower than, or equal to 9. If, for instance, the 19 zeros are followed by a letter, or there are only 18 zeros in front, as of May 19th, 2022, the hash number is invalid.
It’s important to mention that the hash target algorithmically changes every 2,016 blocks, which is roughly two weeks at today’s pace of block mining. This regular readjustment makes mining easier if the average block mining time was more than 10 minutes, and makes it harder if it took less than 10 minutes. To make it easier to mine, the target is lowered by the precise amount needed to rebalance, while to make it harder, it is raised.
All this requires extreme computational power and places great pressure on all computers, thus miners often use gear especially designed for solving such calculations. The best way to solve SHA256 for the target hash is simply guessing billions of possibilities and checking it with the desired outcome, which is why this is one of the most secure ways of encryption worldwide.
Now that we know what Proof-of-Work is, and how the mechanism actually works, let’s jump to the elements of a PoW blockchain, and their contribution to the bigger picture. First off, let’s state a few facts for the record: the crypto world has numerous blockchains within, most of which do not interact and do not directly connect with each other, they exist separately. Bitcoin has its own blockchain, and so does Ethereum, Cardano, Polkadot, Solana, and the list goes on.
A blockchain is a usually decentralized and publicly viewable database that stores information in a special way, namely immutably, publicly, and within so-called interconnected blocks. Most blockchains don’t run applications and functions, which is contrary to the popular misbelief that these systems are the ones who actually make such programs work. Instead, what most blockchain do is record all kinds of data in an extremely secure manner which, of course, is an inevitable part of every crypto ecosystem and application.
As mentioned before, a blockchain is composed of blocks, most of which connect to two other blocks: the one behind, and the next to it. The only two exemptions are the genesis (first ever) block, which only connects to the one next to it, and the most recent block at all times until the newest block is created.
With that, let's zoom in and take a look at what makes up a block, and what is the role of each element. First off, a block itself is just the frame that contains all the data within. It has a few key components that everyone should know of, namely a list of transactions with a private key signature and time stamp each using Unix time that is the seconds passed since January 1st, 1970 (UTC), the previous block’s hash number, the block’s nonce, and unique ID, and its hash number after completion. Since all blocks contain the hash number of the previous one, all of them are interconnected, which makes them form a chain.
Proof-of-Work secures blockchains by providing blocks with their elements, most importantly the nonce and their hash number. To do so, they solve the SHA256 cryptographic hash function on and on, which is one of the few of the irreversible computational functions we know about. The fascinating fact is that while SHA256 seems fully random, it results in the exact same outcome all the time for the same input.
If a block is connected, nobody can tamper with the previous blocks and any block for that matter, because if any component of any block is altered even by one number, the entire blockchain would need to be changed, as all the hash numbers will become completely different. Let’s say someone wants to tamper with the network and overwrite a transaction from 10 BTC to 100 BTC. By adding that one single digit, he completely will have altered all the nonces and hash numbers of all blocks that follow the selected one, which, of course, would not be accepted by the nodes of the network.
There has to be an incentive in everything to get participants to commit their resources, and that’s no different with nodes in a PoW system. Nodes, or miners, are awarded by the ability to receive monetary tips from the initiators of transactions, and to include a special line at the end of each block that newly mints them a predetermined amount of tokens, in Bitcoin’s case, BTC. Since it’s extremely hard to be the first who validates a block, the prize is also quite attractive; 6.25 BTC for each block as of 2022. This is the only way to newly mint BTC, and when all 21,000,000 were minted, it will no longer be possible either. To make Bitcoin a deflationary asset by design, this reward halves every 210,000 blocks, which occurs roughly every four years. The last halving happened in 2020, when the reward decreased from 12.5 BTC to the current 6.25 BTC. In 2022, we are halfway through until the next such event, which will cut the incentive to 3.125 BTC around 2024.
Proof-of-Work (PoW) blockchains, like Bitcoin, are among the first, yet still most secure decentralized systems out there. Their robust consensus mechanisms prevent most malicious intent from tampering with transactions, and their underlying algorithms ensure that all elements work together like a Swiss watch. Proof-of-Work has received a lot of criticism lately thanks to its relatively high energy needs, and it has also faced problems in terms of scalability. Nonetheless, one thing seems certain: it is securing the world’s biggest cryptocurrency, Bitcoin (BTC), and its network, which makes PoW a fascinating feat of technology that started it all, and changed the way we look at unbiased security forever.
Telif Hakkı 2022 Rain Management WLL