Ranked number two in Google’s world news search in 2017, most have heard of Bitcoin (BTC), yet remain puzzled by the concept of Bitcoin mining. Recent headlines illustrate Bitcoin miners hacking computers through YouTube ads, being banned by state governments, and overcharged by electric companies. Yet, it is entirely understandable if you are still asking yourself,
“What the heck is Bitcoin mining?”
The Concept
Bitcoin mining is an activity which adds bitcoin transactions to the blockchain ledger.
The operational significance of mining is that it may just be the foundation of trust within Bitcoin’s ecosystem.
Enthusiasts trust Bitcoin because unlike traditional fiat currencies, which are printed, Bitcoin blocks are mathematically “mined.”
Mining is a part of Bitcoin’s protocol which contains decentralized checks and balances within its code. Mining entails a proof of work system; its purpose is to prevent counterfeit currency, AKA double spending.
The Process
The process of mining verifies and creates hashes to authenticate bitcoin transactions and finalize blocks in the Bitcoin blockchain.
In addition to verifying transactions, miners are also creating new coins. There are currently more than 16.8 million mined BTC. The digital currency has a cap of 21 million BTC.
Once all 21 million coins are mined, no more can be created.
Bitcoin mining, like gold mining, establishes a base value for every coin. On top of creating value, mining ensures transactions are not replicated. In exchange for verifying transactions, miners get block rewards in BTC.
Currently, miners are rewarded with 12.5 BTC, which is worth around $125,000 USD, for each block mined. Initially, the block reward was set at 50 BTC in 2009. This number has been halved twice so far, about once every 4 years, and is configured to decrease again to 6.25 BTC in 2020.
Proof of Work, explained
How do miners create “proof of work?” Unlike traditional mining, which involves explosives and drilling, Bitcoin mining incorporates proof of work by having miners solve mathematical problems: creating hashes. Miners must find a special number that results in a block hash that meets certain parameters. It’s a mathematical puzzle.
Hashes are usually expressed in hexadecimal, a base 16 system. Bitcoin hashes in hexadecimal have 64 digits.
Our normal decimal system, with the Greek prefix deci for ten, uses ten figures: 0–9.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Hexadecimal’s extra prefix, hexa, is Greek for six. Hexadecimal uses 16 figures: 0-f.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f
So “f” is the equivalent of 15 in decimal form, and “10” is the equivalent of 16 in decimal form. “1f” is the equivalent of 31, “20” is the equivalent of 32, “21” is 33, and so on.
Hexadecimal numbers are often preceded by “0x” to signify that they’re not in decimal form.
To prevent duplicate transactions or “double spending,” miners are presented with a target hash. The job of the miner(s) is to come up with a special number to add to each block that makes the block’s hash lower than or equal to the current target hash, which sets the current Bitcoin mining difficulty.
All hashes must contain at least eight zeroes and no more than 63.
Example:
Target hash, with 16 leading zeroes:
0x000000000000000051ABA2000000000000000000000000000000000000000000
Hash for proposed solution #1, also with 16 leading zeroes:
0x000000000000000068ACF200000000Cb0000000000000000000000000000000e
Solution #1 would be considered wrong because the solution hash is a greater number than the target hash.
Hash for proposed solution #2, also with 16 leading zeroes:
0x000000000000000050ABA2340000000000000000000000000000000000000000
Solution #2 qualifies as an acceptable hash, since it is lower than the current target hash, which sets the current difficulty.
Source: ICO Alert