How Bitcoin mining works
The Bitcoin mining process always starts with a block that contains a group of transactions. The transactions have already gone through an initial security check by the network to verify that the sender has enough Bitcoin and has provided the correct key to their wallet.
Here’s what occurs next to mine a block:
- The network creates a hash (a string of characters) for the block of transactions. Bitcoin uses an algorithm called SHA-256 to do this, and it always generates hashes with 64 characters.
- Bitcoin miners start generating hashes using mining software. The goal is to generate the target hash– one that’s below or equal to the block’s hash.
- The first miner to generate the target hash gets to attach the block to their copy of the Bitcoin blockchain.
- Other miners and Bitcoin security nodes check that the block is correct. If so, the block is added to the official Bitcoin blockchain.
- The Bitcoin miner then receives block rewards. Blocks offer a set amount of Bitcoin as a reward; the amount is cut in half for every 210,000 blocks that are mined (this is called Bitcoin halving).
This system Bitcoin uses is called proof of work because miners need to prove they expended computing power during the mining process. They do this when they provide the target hash.
One important thing to know about Bitcoin mining is that the network varies the difficulty to maintain an output of one block every 10 minutes. When more miners join, or start using mining devices with more processing power, the mining difficulty increases.