Quick reads

Proof of work explained

by Blocks99

9 months ago

Proof of work (PoW) is the most prevalent consensus mechanism currently deployed on the top two public blockchains. The method is highly secure and reliable, but consumes vast amounts of energy.

Proof of work was conceived in 1993 to help combat Internet service abuse such as spam, and has been termed proof of work since 1997. However, it remained largely unused until an individual or a group using the pseudonym Satoshi Nakamoto invented Bitcoin, and employed that mechanism to create consensus between peers on the network. PoW proves that a certain amount of work has been done, enabling the responsible party to receive the reward for the effort and securing the blockchain. It is widely used and trusted on the Bitcoin and Ethereum blockchains.

In PoW, cryptocurrency miners compete against each other to solve a complex cryptographic puzzle and create a new block on the blockchain. When these puzzles are solved, the solutions can be quickly verified. Once a crypto mining operation finds the solution to a new block, it can broadcast the details of that block to the network. All other miners will then verify that the solution is correct and, following the verification, the block will be added to the blockchain. The miner who solved the puzzle will get Bitcoin as a reward.

Hashing

To understand the mechanism, we need to understand the concept of “Hashing.” A hash function is simply a function that takes in input value and produces a fixed-sized alphanumeric output, which is called a “hash value.” Bitcoin uses SHA256, with 256 representing the size of the output in bits. SHA-256 will produce a 256-bit (32 byte) output. For example, “Blocks99,” when passed through SHA-256 function, produces the following hash value: d2583428e62daee801e16bc0ac8f03bf387cc699101eb86c6596db20b1328677.

The miner has to fulfill a prerequisite condition to solve the puzzle and arrive at a variable number termed a “nonce,” shorthand for “number only used once.” It is the first number needed for solving a block of the blockchain. The competition between miners is to be the first to find this number. Once the solution is available, other miners will verify the solution using the same “nonce” and the new block will be added to the chain. The solution produced is called a “block hash.” Every block in the blockchain contains its own block hash and the block hash of the previous block, which together form a chain of blocks.

It is this cryptography and the PoW algorithm that make it extremely hard to tamper with blockchains, as tampering one block leads to a change in all blocks and the PoW of each block has to be redone. This is how hashing with consensus ensures security.

Earnings depend on computing power

The probability of the miner being chosen to update the next block is determined by the computing power a miner controls. For example, if a mining operation controls 20% of the network power, the probability of its winning the race is 20%. The more the computing power, the greater the chances of earning a new Bitcoin. Unfortunately, PoW uses massive amounts of electricity due to the vast computational power required by mining units to solve the puzzle. It also requires expensive hardware to run the computations. Miners form mining pools to aggregate their computational power and later distribute their rewards proportionately according to the power supplied. While PoW may not be the most energy- and cost-efficient solution, it is currently the most popular method of reaching consensus in blockchains. A method that uses far less energy and is gaining in popularity is proof of stake (PoS).

Subscribe to our newsletter and follow us on social media – Facebook LinkedIn Twitter Telegram Youtube – to be the first to read the latest and most relevant blockchain and digital asset news in the European and Asian regions, interviews with top industry experts, as well as provocative opinion pieces and brief introductions to key blockchain topics.

ADVERTISE