|Mining is the act of creating Bitcoins. Think of it like mining for gold without the dirt and pickaxes.|
Anyone can mine Bitcoin, but it is pretty hard to do and there's no guarantee you'll make money doing it.
Bitcoins get created via mining on average every 10 minutes.
Mining is the act of creating a block on the blockchain that is verified by the other Bitcoin nodes.
Mining does two things
- It records new Bitcoin transactions in the blockchain
- It rewards the miner with bitcoin, 6.25 bitcoins (around $350,000) at the time of this writing
The process goes something like this
- People send their bitcoin transactions to the bitcoin network
- All the miners try to complete a block
- Completing a block is taking a number of transactions with fees and combining them into a block of data
- Then add a number called a nonce that is guessed at
- Add a coinbase transaction that will send 6.25 bitcoins (block reward) to the miner's bitcoin address
- Calculate a hash (numerical algorithm) of the transactions plus coinbase transaction plus hash of the previous block that results in a value with a certain number of leading 0's based on the current difficulty
- When the calculation doesn't result in the proper number of leading 0's you try another nonce (random number)
- This goes on until the hash of the block meets the proper number of leading 0's
- The miner sends out the block to the bitcoin network
- The bitcoin network verifies the block which is easy to do but extremely hard to create the block
This process is also known as Proof-of-work and takes a lot of electricity and very powerful computers to create the blocks.
The difficulty changes every 2016 blocks (2 weeks) based on the time it took to mine the previous 2016 blocks as miners join or leave the network. The more miners the more difficult the problem becomes by automatically adjusting the difficulty.
- How do people send their transactions to the network?
- What does it mean to complete a block
- How do you know that the transactions being sent are valid and don't change between the time they're gathered and the block is completed?
- What is a hash?
- Why does it take powerful computers to do this?