Bitcoin’s mining puzzle

The computational puzzle is in the form of a hashing algorithm called SHA256. This isn’t unique to Bitcoin, but is an external cryptographic standard, developed by the NSA.

A hash is a unique one-way identifier for a digital record that enables privacy and security. Think of it as a randomising engine. You provide any input, like a password and the algorithm produces a random string of text and numbers (the hash) of uniform length. Change one letter of the input and you get a different hash and you cannot work back from the hash to know the password, but a unique input will always generate the same hash value.

SHA256 – used for Bitcoin Mining – produces a hash that is 64 characters long, regardless of the size of the input; each character represents four bytes of data 64*4=256.

Bitcoin mining is often described as a lottery because the task that Miners complete to show Proof of Work is arbitrary – it is just a clever way of regulating new block production and bitcoin issuance.

The aim of the game is to hash specific details from the new block and previous block, to produce a separate numeric hash value that is less than or equal to something called the Target – given our Lottery analogy this is the winning number.

The hashed block details are: version number, a timestamp, the hash from the previous block, the hash of something called the Merkle Root, a random number called a nonce, and a target hash.

Given the potential number range that a 256 bit algorithm can generate it will take a lot of guesses to find the Target, so all Miners do is run the algorithm as often as possible.

In the early days, Bitcoin could be mined using the GPU – Graphics Processing Unit  – in an ordinary home computer, originally designed to speed up the rendering of graphics, especially in PC gaming. 

Today, Miners use specialist hardware, known as mining rigs, that use application-specific integrated circuits, or ASICs. These are computer processors that have been optimised to solve the maths problem that is at the heart of bitcoin mining. One of the most popular is the Antman S19j Pro Miner 100 TH/s made by Bitmain. 

Mining facilities will run as many rigs as they can financially support and cool to find solve the puzzle before another Miner, somewhere else in the world, does. 

Once the Target is found, the block – and its transactions – are added to the blockchain, which syncs with all Full Nodes and Miners, and the process starts again..

We highlighted above how Full Nodes adjust to regulate block creation, this accounts for any increase or decrease in the collective Mining capacity. That will logically vary in relation to the price of bitcoin, as that determines the value of the incentive for participating – the coinbase reward plus fees. 

Bitcoin Price, the known difficulty rate, the collective hashrate and the cost of running a Mining operation (energy/cooling/overheads) can be used to work out the viability of participating.

Hash rate is a proxy for the strength of the Bitcoin network, as a bad actor would need to control 51% of the collective hash rate to stand any chance of being able to decide which transactions are added to new blocks and double spending coins.

It should also be obvious why Bitcoin Mining is so energy intensive given mining rigs are running 24/7/365 to find the Target, which gets harder as the aggregate hashing power goes up. This creates a virtuous loop with price, which tends to increase as hashrate increases, in turn attracting more Miners.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *