What is Bitcoin Mining?
Bitcoin was created by using the blockchain protocol, back in 2009, by a person or a group of people with the alias Satoshi Nakamoto. The first block of the chain, or the genesis block, was created when Nakamoto mined it in January 2009.
The bitcoin protocol ordinates that a total of 21 million Bitcoin will come into existence at some point. Nakamoto has brought 1 million of these into the light with the remaining left for the rest of the blockchain community to discover. This process of releasing Bitcoin, into the world, as it were, is called mining. To understand mining requires the understanding of a lot of other concepts related to cryptocurrency.
A node is a powerful computer that participates in Bitcoin transactions and is thus a part of the Bitcoin network. To become a node, you have to download the Bitcoin software which is available for free and let your computer run it, which essentially takes up energy and storage space.
A mining node or a miner is a node that is responsible for securing the Bitcoin network and processing every Bitcoin transaction so as to confirm it. What each miner does is solve a complicated math problem and is paid in Bitcoin as a result.
Why is mining important?
The process of Bitcoin mining serves three purposes:
Issuing of New Bitcoin
With Bitcoin, there is a limited supply of coins, amounting to 21 million BTC, that has to be discovered by the process of mining. To bring these coins to light, the process of mining has to be carried out.
If miners were to stop mining, there would be no more additional Bitcoin in existence.
Validating Bitcoin Transactions
For a Bitcoin payment to be considered valid, it should be verified by other nodes on the Bitcoin network. Only then can it be included on the Bitcoin blockchain.
For the payments to be confirmed,
- One confirmation is enough for a Bitcoin payment of less than $1000
- Three confirmations are enough for Bitcoin payments ranging from a $1000 to $10000.
- Six confirmations are needed for payments between a $10000 and $1000000.
Having six confirmations is the standard for most payments. A payment with zero confirmations can still be reversed.
Validating the transaction means:
- Checking the database of old transactions on the blockchain to ensure that the same Bitcoin has not been already spent on some other transaction.
- Checking the status of the sender of Bitcoin to ensure that they own as much Bitcoin as they claim to possess.
Securing the Bitcoin Network
The Bitcoin network becomes more secure as the number of miners increases. This is because miners are necessary to approve transactions.
This is because hackers and other opponents need to attack at least 51% of all nodes for their illegitimate transactions to be verified.
What is the process involved in mining?
The steps involved in mining are:
- Combine the proposed transactions into a single block.
- Select the header of the most recent block in the blockchain and insert it into the new block as a hash.
- Solve the proof of work problem.
- After finding a solution, the new block is added to the blockchain and sent out into the blockchain network.
Let us take a look at these steps in detail.
All Bitcoin miners run the Bitcoin software on their mining hardware (CPU/GPU/ASIC). This downloads a copy of the Bitcoin blockchain on their computer which keeps getting updated with the most recent transactions.
As new transactions take place, they have to be combined into blocks and then added to the blockchain. A single block can contain up to 2500 new transactions.What a miner does is basically validating the new block. This is done by including the answer to the “proof of work” problem of the previous block into the new block.
Whichever miner solves the problem first, gets rewarded with 12.5 BTC at the time of writing.
The Bitcoin Puzzle
Put simply, each miner has to find a number. This number has to be combined with the data in the block and then passed through a hash function. If the result of this process lies within a certain range, then the problem is considered solved. This number that has to be found is called the nonce or “number used once”. It lies between the integers 0 and 4,294,967,296.
The nonce is found by guessing at random. Each of these guesses is combined with the data in the block and applied to the hash function. If the produced hash is less than the target value, then the proof of work is complete. The Bitcoin algorithm is written such that the difficulty of finding this number keeps getting adjusted so that the problem is only solved once every 10 minutes. The difficulty is altered by changing the number of zeroes required at the beginning of each hash string.
The first miner that finds the nonce which produces the result in the desired range gets rewarded with some Bitcoin. The other miners can then stop working on this block and work on finding the nonce for the next block. At the current rate of a block being processed every 10 minutes, the reserve of 21 million Bitcoin will be entirely diminished by 2140.
The difficulty in mining Bitcoin lies with the amount of processing power required to solve the proof of work problem. In the beginning, when the difficulty of solving a proof of work was low, miners used the processing power of their laptops or desktops for mining Bitcoin.
As the difficulty kept increasing, graphics cards specially designed to mine Bitcoin were used. This is because both processing power required to mine Bitcoin increased as did the heat and electricity needed for mining. As of today ASICs or application-specific integrated circuits are being used for mining Bitcoin. This has made mining a highly-specialized industry where a miner or a group of miners purchase rigs meant especially to mine Bitcoin.
The popularity of Bitcoin is rising at an alarming rate with more of the world being convinced of the ingenious behind this new-age currency. Bitcoin mining has also become a lucrative business with big players earning up to a 75% margin with mining. If you have powerful hardware and funds to pay large electricity bills, then you too can start mining today.