To gain a basic explanation of how the Bitcoin protocol works, check here: A Basic Explanation of Bitcoin
If you have been researching Bitcoin you’re likely to have come across the term ‘Bitcoin Mining’ and you may be wondering what it really is. When I first heard of Bitcoin mining, I immediately started thinking of pickaxes and the goldrush and to be honest, if this does come to mind, you aren’t all that far off. Below we will outline the purpose of a Bitcoin miner and how a person accomplishes those and becomes a miner on the Bitcoin network.
Bitcoin miners have multiple purposes:
- To create and issue new bitcoins.
- To confirm and validate previous transactions.
- To enhance security.
How do miners create and issue new Bitcoins?
However, these 21 million bitcoin don’t exist currently. Think of the process of physically mining gold; it exists beneath the ground already, but must be physically mined and ‘brought up into the light’ in order for you to own or use it. Just like gold, bitcoin must be created or ‘mined’. Every bitcoin exists within the Bitcoin protocol design (just like gold exists beneath the ground), but hasn’t yet been fully created (or ‘brought up into the light’ like gold is).
In order for a new bitcoin to be mined or ‘brought up into the light’ like gold, each miner must use their computer to download the Bitcoin software. Once they have done so, they can commit their computer or hardware to become a mining ‘node’ on the network(all of this is free of charge). Mining nodes can then create a new bitcoin, by solving a complex mathematical puzzle which is part of the Bitcoin program. The answer of the puzzle is unique and a hash function is used within the puzzle to ensure that the answer cannot be easily calculated. Instead the miner’s computer or hardware must simply continue trying to solve the puzzle by running through all of the potential answer combinations.
All of the mining nodes will work at the same time to solve the bitcoin block’s puzzle and the first node to solve it correctly and input the answer data into the block will signal to the other mining nodes (around the world) that it has been successful. As a reward, the successful mining node is granted some new bitcoin.
The difficulty of the puzzle solving process is actually adjusted approximately every 2 weeks in order to ensure that each bitcoin block takes approximately 10 minutes to mine, no matter how good or advanced the hardware available to miners becomes.
How do miners confirm and validate previous transactions?
Businesses will usually have their accounting ledgers audited internally and by third parties on a regular basis. However, as Bitcoin is open source and does not seek to rely on third party companies / entities, it must be audited by its own nodes; all of which make up its network.
Each block mined (via the process described above) contains within it details of the transactions sent within the Bitcoin network and during the mining process, each mining node actually checks the transactions to make sure they are not fraudulent before then looking to solve the puzzle to create the next block. Fraudulent transactions are not included within a mined block by the miner and real transactions can only be securely confirmed once they have been included within a mined block; this process embeds the transaction securely into the blockchain and is why transactions often take at least 10 minutes to be verified by exchanges (as the puzzle completed in order to create a new block often takes 10 minutes to complete as above).
How do miners enhance security?
As above, nodes are able to detect fake transactions and prevent these from being embedded onto the blockchain. The only surefire way for an approved transaction to be reversed, is for someone to have more than 51% of the network hash power. This person could then effectively mine a rival chain of blocks, effectively removing the block your transaction was on. There is a lot more to a 51% attack and we will address this in future posts, as well as other potential weaknesses of the Bitcoin network. To keep things simple for the purpose of this blog, a 51% attack is prevented mainly by spreading hash power amongst a large network of miners. Essentially, the more miners who mine; the more secure the network becomes, as it is less likely one of them can own more than 51% of the network hash power.
If you want to learn more about Bitcoin or other cryptocurrencies, feel free to check out the rest of our blog where we regularly post about a number of topics including cryptocurrency.