Mining is the system of consuming computing power to process transactions, secure the network and keep everybody in the system coexist together. It can be perceived like the Bitcoin data center except that it has been designed to be fully decentralized with miners operating in all countries and no individual having control over the network. This process is called as “mining” as a resemblance to gold mining because it is also a provisional mechanism used to generate new bitcoins. However, Bitcoin mining provides a compensation in exchange for useful services required to operate a secure payment network, which is not the case with gold mining. Mining will still be required after the last bitcoin is issued.
How Does Bitcoin Mining Works?
Anybody can become a Bitcoin miner by using software with specific hardware. Mining software listens for transactions broadcast through the peer-to-peer network and performs required tasks to process and confirm these transactions. Bitcoin miners perform this work because they can earn transaction fees paid by users for quicker transaction processing, and newly created bitcoins issued into existence according to a pre-decided formula.
For new transactions to be confirmed, they need to be included in a block along with a mathematical proof of work. This type of proofs are very hard to generate because there is no way to generate them except by trying billions of calculations per second. This requires miners to perform these calculations before their blocks are accepted by the network and before they are being rewarded. As number of miner’s increases, the difficulty of finding valid blocks is automatically increased by the network to ensure that the average time to find a block remains equal to 10 minutes.
The proof of work is further designed to depend on the previous block to force a chronological order in the blockchain. This makes it greatly difficult to reverse previous transactions because this requires the recalculation of the proofs of work of all the succeeding blocks. When two blocks are found at the same time, miners work on the first block they receive and switch to the longest chain of blocks as soon as the following block is found. This allows mining to secure and maintain a global consensus based on processing power.
Bitcoin miners are neither able to deceive by increasing their own reward nor process fraudulent transactions that could corrupt the Bitcoin network because all Bitcoin nodes would not allow any block that contains invalid data as per the rules of the Bitcoin protocol. Consequently, the network remains secure even if not all Bitcoin miners can be trusted.