Mining More Detailed. 1. Introduction
For an ordinary Internet user, “mining” is one of the most familiar cryptocurrency terms. Unfortunately, not everyone realizes all the complexity and versatility of this process, and even less people understand the purpose of mining and how important it is for the development of blockchain technology.
As a rule, mining is considered as a process of cryptocurrency extraction. Yet, this definition is incomplete. More than that, it is partially wrong in a sense. Let’s examine this process from the perspective of a calculating device. The starting point is the activity of every full node in blockchain. A full node is any crypto wallet that contains the full record of entire blockchain, hence only full nodes have the ability to mine.
Basically, mining is the process of the complex calculation of a hash-function. The whole content of a new potential block is used as an argument of this function. It includes all the records that are to be placed in blockchain in the future, time, a version, etc. Because of the complexity of the block content, all nodes in the network will not calculate the hash of the same values.
The process of calculation will repeat itself until the node receives the result that satisfies the complexity criteria. As soon as this happens, the node adds the calculated hash in a received block and shares the block with all other users.
Not every full node is a miner. Mining is a resource-demanding process, and the node owner might choose not to make all these calculations on their computer. In this case, the owner retransmits data received from other nodes.
A full node, that discovers a new block, has to wait for its verification. If the result satisfies the complexity criteria, the network participants agree with the node and add the new block to their blockchains. In fact, the final result is the correct hash-code of the new block that can be interpreted by the Bitcoin protocol.
The positive result interpretation is directly related to a reward, but in fact it is not the one. If the correct code is received, it means that the node has closed the block. When the block is closed, the Bitcoin systems interprets this as a performed work which must be rewarded.
However, there are some difficulties with the reward. Closing of new blocks gives nodes a different amount of bitcoins that depends on transaction fees and the total number of already closed blocks. The reward for each new block halves every 210 thousand blocks. According to the statistics, it usually takes around 10 minutes to close a block, and the reward is reduced once per four years. This is defined by the procedure of the target block value reduction used for the calculation of a hash-function. It allows to change the complexity every 2016 blocks by increasing (as a rule) or decreasing (rarely) it.
The initial reward was 50 BTC but these days a miner receives only 12,5 BTC for a single block. Fees within transactions are assigned by the sources of these transactions. A miner, who closes the block, cannot regulate the fees, but can choose the transactions that involve higher fees.
Every new block includes a special transaction (it is placed first) that guarantees that the miner, who closed the block, will be rewarded. All nodes automatically agree with this rule by checking a hash and approving its success.
In summary, mining is originally intended to close new blocks. At the same time, a possible reward is supposed to motivate users to proceed with calculations that are necessary to close the block.