Mining, in cryptocurrency and blockchain terms, is the process by which blocks of transactions on the network are verified. Mining computers search for an answer to a cryptographic problem in the hope of gaining a reward. It gets its name from the similarity to digging for valuable minerals, which can involve a long and often fruitless search before the miner finds a reward.
Blockchain technology works because transactions are verified in blocks and each block is then added to the blockchain with a cryptographic hash – a sequence of characters that serves as a kind of digital fingerprint for the data in the block. However, generating these hashes requires computing power, which is provided by the miners.
Not every computer on the network is mining. Some of these network ‘nodes’ simply run the cryptocurrency software, which helps to spread transaction information around the network. However, some nodes are actively involved in verifying transactions – and these are the miners.
Imagine a competition where you have to guess how many peanuts are in a glass jar. Getting the right answer cannot be done by working out – counting the peanuts would be against the rules – so every participant has to guess until one stumbles across the right answer. Everyone can guess as often as they like and the winner gets a prize.
Cryptocurrency mining works in a comparable way. Computers across the network compete to find the cryptographic hash that fulfils certain criteria for the current block. This is not an advanced mathematical problem – more a matter of guesswork that involves the computer constantly generating hashes until it finds one that matches the criteria. This is a process known as ‘proof of work’.
Just as with the peanuts are in the jar, the best approach is to have as many guesses as possible, so miners calculate as many hashes as they can. Whichever miner gets there first gets a reward. In the case of a cryptocurrency this is usually a transaction fee and a small amount of the currency. The currency they get is new to the network, making mining the only way to generate new coins.
It used to be possible to mine Bitcoin using a personal computer at home but as more coins are mined so the difficulty of calculating the hashes has been increased. Increasingly powerful processors were needed, to the point that most miners now use chips that have been specifically designed for mining.
Not only are these setups expensive but they also need to be constantly switched on to maximise the chances of success, and as electricity is an expensive cost and mining operations are getting larger, it is making it even harder for smaller miners to have any success. Because successful mining even with the right equipment is basically a matter of luck, most miners spend their income on covering their costs.
Nevertheless, without their work blockchain-based networks would not function. They act as bookkeepers for the whole network, ensuring that transactions are being processed honestly and that they cannot be changed retrospectively.