Bitcoin Blockchain

Explaining bitcoin Proof of Work and mining

Bitcoin Proof of Work-min

Proof of Work has its origins in a journal published in 1993 by computer scientists Cynthia Dwork and Moni Naor. It is initially designed to combat email spam and DDOS attacks. The word was first coined in a 1999 research paper by Markus Jakobsson and Ari Juels. However, it was only in 2008 Satoshi came out with a white paper outlining framework of Bitcoin that is based on Proof of Work algorithm.

We always heard that Bitcoins are mined. Mining is a process whereby users who solve complex mathematical problems to build new blocks are rewarded with new bitcoins. Proof of Work as the name suggests is essentially a proof that the said CPU performed given mathematical calculations for it to be eligible to be rewarded with new Bitcoins.

You may like: Public Key and Private Key difference demystified

The idea behind this protocol is that the work (mathematical puzzle) must be hard but feasible on the requester side but easy to check for the service provider. Here in the bitcoin ecosystem, the miner is the requester and the service provider is the bitcoin network.

The bitcoin network uses hash puzzles to achieve proof of work. In order to create a block, a node must propose a list of transactions that needs to be included in the block. A block contains a list of transactions proposed by a node, a hash pointer to the previous block and a nonce.

A nonce is a crucial part of the entire proof of work system of bitcoin network. A nonce is an arbitrary number that can only be used once. A nonce when concatenated with the previous hash, and the list of transactions that comprise that block and take the hash of this whole string, then that hash output should be a number that falls into a target space that is quite small in relation to the much larger output space of that hash function.

A target is a 256-bit number that all bitcoin clients share. Every hash generates a random number between 0 and a maximum of a 256-bit number. Now when a node solves a given nonce and finds the hash which is below the target space, it gets a chance to propose a block in the blockchain. In this way, all the nodes independently compete to solve the hash puzzles all the time.

The difficulty level to find a probable hash changes every 2016 blocks which is every two weeks which is further equal to a new block every 10 minutes. Now if several miners deploy sophisticated hardware and the number of new blocks in a two-week span is higher than 2016, the difficulty is adjusted to bring the number of blocks mined to 2016 blocks in a two-week span.

The reward for finding a new block is currently 12.5 bitcoins which halves every 4 years (or 210,000 blocks). In the early years of bitcoin, the reward was 50 bitcoins which was later halved to 25 bitcoins and now presently at 12.5 bitcoins. The reward is a geometric series which leads to finite bitcoin number of 21 million. The first reward halving took place on November 28, 2012 at the height of 210,000 blocks, the second in 2016 and the third halving is expected in 2020. At the given geometric series, the estimate for all the block rewards to be mined is the year 2140.