Considering a bitcoin mining hardware purchase? Make a more informed decision with our Bitcoin Mining Dashboard.
This is an introduction to the concept of bitcoin mining – the process of verifying transactions on the bitcoin network. I wanted to publish the first series of posts about the current Bitcoin mining environment, but that seems like it would be fairly challenging to do without first doing an overview of what mining is. I’ll try and keep this as short as possible, but it’s definitely the most complex aspect of the bitcoin system.
This is the second part in a 4 part series discussing the current state of bitcoin mining:
- What is bitcoin mining?
- The evolution of mining
- Current ASIC Hardware
- Bitcoin mining – public companies
1. Why do we need mining? (The elevator pitch)
The block chain is a ledger of every bitcoin transaction since the first block was created (“The Genesis Block”). Once every 10 minutes, a miner will find a block, and for this he is rewarded bitcoins. In addition to fairly distributing new coins, this adds to network stability by increasing the difficulty for a malicious miner to be able to affect the network.
2. What is this hashing everyone keeps talking about?
Hashing is an algorithm that takes an arbitrary input, and returns a reproducible fixed-length value. Additionally, the resulting value will be changed completely even with the smallest change to the inputs [Wikipedia]. For example using sha-256:
SHA-256 of “miner” always outputs:
SHA-256 of “minor” is:
3. Why do miners care about hashing?
Miners perform a hash on all available transactions since the last block was created. In order to be accepted, the hash must start with a certain number of zeros which is determined by the difficulty level. In order to keep trying new hashes to meet the difficulty level, miners will add random numbers to the end of the transactions in order to try and find a has that meets the difficulty requirement. When an acceptable hash is found, it’s information is send through each node in the network, and new miners continue the chain working on the next block.
4. Why do we use the blockchain instead of trusting every transaction immediately?
The current block systems prevents double-spend attacks (one person sending the same bitcoins to multiple poeple) in three ways:
- The hash will only match a block of transactions if they remain identical to how they were as they were originally found.
- The 10 minute time between blocks allows breaks for the last set of transactions to transmit through the network. This reduces the ability of a malicious spender being able to send the same transaction to multiple people simultaneously.
- Every new block has exactly one path in the block chain to the genesis block. Therefore each transaction occurs in a serial manner. It is impossible to have two different blocks unaware of each other – spending the same coin – and be in the main block chain.
5. How do we know there will be 10 minutes between each block?
The difficulty in finding a block - how many zeros must be in the beginning of the hash – is adjusted every 2016 blocks. Depending on how long it took to find the preceding set, the difficulty will rise or fall to adjust to the network’s speed ( the actual equation can be found on the wiki here). This means that the faster the network is hashing, the more difficult it becomes to find blocks.
Satoshi’s orinal paper on the Byzantine General’s problem: http://firstname.lastname@example.org/msg09997.html
Bitcoin wiki on mining: https://en.bitcoin.it/wiki/Mining
Reddit discussion on mining: http://www.reddit.com/r/explainlikeimfive/comments/1b689q/eli5_this_bitcoin_mining_thing_again/