When you hear the words, cryptocurrency mining, you envision coins being extracted from the ground. But considering that cryptocurrency is hardly of the physical world, why do we actually call it mining?
Because it’s the same as gold mining in the sense that bitcoin is inherent in the protocol’s design (as gold is found underground), but they have yet to be brought out into the light (as gold that has not been dug out). The cryptocurrency protocol dictates that 21 million bitcoin will be in existence at a particular point. Miners get them out gradually and in sets.They are able to do this as a prize for constructing blocks of validated transactions and making them a part of the blockchain.
Cryptocurrency software runs on a unique and dedicated computer known as a node.Because this computer plays a part in the information transfer process, it thus helps keep cryptocurrency running.Certain nodes are mining nodes (also known as miners). They work by grouping outstanding transactions into blocks and adding them to the blockchain.
This is done by solving an intricate mathematical problem which comes with the cryptocurrency program, and attaching the answer in the block. The idea is to discover a number which gives an outcome in a particular range when it is incorporated into the data in the block and goes through a hash function.
Solving the Problem
How can this number be determined? By making random guesses. Predicting the output is impossible because of the hash function. Thus, miners just guess the unknown number, on which the hash function to that number combined with the block data will be applied.
The hash that comes up needs to begin with a preset number of zeroes. It is impossible to know which number will actually work, as results can very widely with any two consecutive integers.On top of that, many nonces may produce the desired result, or there may be none at all.
The miner that first gets a resulting hash in the intended range will tell the rest of the network about its victory. At his point, other miners will instantly stop work on that certain block and begin with the succeeding one.
The victorious miner receives some new cryptocurrency as a reward. With the difficulty of the calculation (the needed number of zeroes at the start of the hash string) is changed from time to time, processing a block is going to take around 10 minutes. This is how long cryptocurrency developers think is needed for a constant and decreasing flow of new coins until the 21 million maximum mark (projected to happen in 2140).