How Does Bitcoin Mining Work? (PART 2)
Let’s say the Green user wants to buy some goods from the Red user. Green sends 1 bitcoin to Red.
Green’s wallet announces a 1 bitcoin payment to Red’s wallet. This information, known as transaction (and sometimes abbreviated as “ tx”) is broadcast to as many Full Nodes as connect with Green’s wallet – typically 8. A full node is a special, transaction-relaying wallet which maintains a current copy of the entire blockchain.
Full Nodes then check Green’s spend against other pending transactions. If there are no conflicts (e.g. Green didn’t try to cheat by sending the exact same coins to Red and a third user), full nodes broadcast the transaction across the Bitcoin network. At this point, the transaction has not yet entered the Blockchain. Red would be taking a big risk by sending any goods to Green before the transaction is confirmed. So how do transactions get confirmed? This is where Miners enter the picture.
4) Processing by Miners
Miners, like full nodes, maintain a complete copy of the blockchain and monitor the network for newly-announced transactions. Green’s transaction may in fact reach a miner directly, without being relayed through a full node. In either case, a miner then performs work in an attempt to fit all new, valid transactions into the current block.
Miners race each other to complete the work, which is to “package” the current block so that it’s acceptable to the rest of the network. Acceptable blocks include a solution to a Proof of Work computational problem, known as a hash. The more computing power a miner controls, the higher their hashing rate, and the greater their odds of solving the current block.
But why do miners invest in expensive computing hardware and race each other to solve blocks? Because, as a reward for verifying and recording everyone’s transactions, miners receive a substantial Bitcoin reward for every solved block plus the transaction fee users paid to send the transaction!
And what is a hash? Well, try entering all the characters in the above paragraph, from “But” to “block!” into this hashing utility. If you pasted correctly – as a string hash with no spaces after the exclamation mark – the SHA-256 algorithm used in Bitcoin should produce:
If the characters are altered even slightly, the result won’t match. So, a hash is a way to verify any amount of data is accurate. To solve a block, miners modify non-transaction data in the current block such that their hash result begins with a certain number (according to the current Difficulty, covered below) of zeroes. If you manually modify the string until you get a 0… result, you’ll soon see why this is considered “Proof of Work!”
5) Blockchain Confirmation
The first miner to solve the block containing Green’s payment to Red announces the newly-solved block to the network. If other full nodes agree the block is valid, the new block is added to the blockchain and the entire process begins afresh. Once recorded in the blockchain, Green’s payment goes from pending to confirmed status.
Red may now consider sending the goods to Green. However, the more new blocks are layered atop the one containing Green’s payment, the harder to reverse that transaction becomes. For significant sums of money, it’s recommended to wait for at least 6 confirmations. Given new blocks are produced on average every ten minutes; the wait shouldn’t take much longer than an hour.
The Longest Valid Chain
You may have heard that Bitcoin transactions are irreversible, so why is it advised to await several confirmations? The answer is somewhat complex and requires a solid understanding of the above mining process:
Let’s imagine two miners, A in China and B in Iceland, who solve the current block at roughly the same time. A’s block (A1) propagates through the internet from Beijing, reaching nodes in the East. B’s block (B1) is first to reach nodes in the West. There are now two competing versions of the blockchain!
Which blockchain prevails? Quite simply, the longest valid chain becomes the official version of events. So, let’s say the next miner to solve a block adds it to B’s chain, creating B2. If B2 propagates across the entire network before A2 is found, then B’s chain is the clear winner. A loses his mining reward and fees, which only exist on the invalidated A -chain.
Going back to the example of Green’s payment to Red, let’s say this transaction was included by A but rejected by B, who demands a higher fee than was included by Green. If B’s chain wins then Green’s transaction won’t appear in the B chain – it will be as if the funds never left Green’s wallet.
Although such blockchain splits are rare, they’re a credible risk. The more confirmations have passed, the safer a transaction is considered.
A Complete Analysis of the Electricity Use of Bitcoin & Why It’s Not a Waste
In March 2016, Motherboard projected this:
BITCOIN’S ELECTRICITY CONSUMPTION WILL GROW TO RIVAL THAT OF THE NATION OF DENMARK BY 2020.
Whatever the accuracy of Motherboard’s math, there’s no disputing the fact that Bitcoin uses a great deal of energy.
On an industrial level, Bitcoin may be considered a system which converts electricity directly into money.
There are two major camps which object to Bitcoin mining due to its electrical cost:
1) The Eco-conscious
The eco-conscious seek to generally diminish global power consumption.
Given that electricity is, at present, primarily generated through unsustainable methods, eco-activists hold that all energy expenditures must be critically weighed against their (debatable) contribution to climate change.
2) Skeptical Economists
Secondly, there are those dubious economists who doubt Bitcoin’s viability.
This group is best exemplified by Paul Krugman, who argues that Bitcoin (and to a lesser extent, gold) has no real value to society and so represents a waste of resources and labor.
Defending Bitcoin’s Power Usage
While disproving the “economic experts” is as simple as referring them to Bitcoin’s current market price and continued existence, explaining why Bitcoin is worth its electrical cost to the eco-conscious requires a more thoughtful approach.
After all, social pressure to sustainably power the Bitcoin project is sensible. We need to maintain a healthy balance between nature and technology.
That said until advances in green energy diminish or negate Bitcoin’s draw on ecologically-costly energy sources, Bitcoiners must endeavor to defend the expenditure by conveying the importance of this revolutionary peer-to-peer currency!
Here are 9 good reasons which, taken together and in our opinion, completely justify the world’s admittedly high expenditure of electricity on the Bitcoin project:
1) Bitcoin is Backed by Electricity (and Ingenuity)
You mean there isn’t an ounce of gold in the bank for every paper Dollar?
Over the millennia, history has repeatedly shown that prosperity depends on sound money. Whether it was the Roman Empire debasing its coinage or modern central banks inflating the supply of fiat money…
The end result of currency debasement is, tragically and invariably, an economic crisis. Mr. Mike Maloney’s superb series, “The Hidden Secrets of Money,” thoroughly explores this timeless historical lesson in Episode 5.
Simply put, currency with no backing but faith in its controllers tends to be short-lived and ruinous in its hyper-inflationary death throes.
Bitcoin was designed with one monetary goal foremost in mind: avoiding the dismal fate of previous monetary forms by preventing the evils of debasement.
Unlike fiat currency, Bitcoin’s value is also backed by tangible, measurable resources: code running on computing hardware powered by electricity.
Given money’s (over-)importance to our modern world, maintaining a technologically-superior alternative to flawed fiat currencies is certainly worthwhile.
2) Mining is a Profitable and Promising Industry in a Slow Global Economy
Bitcoin’ers are some of the lucky few not regularly revising their economic expectations downwards.
The major determinants of profitability in the fiercely competitive world of Bitcoin mining are low electricity costs, access to cutting-edge ASIC mining hardware, and deep knowledge of Bitcoin and business.
Keen businessmen only need apply for this “license to print money.”
Mining tends to be concentrated in China due to several regional advantages; China produces most of the world’s ASIC hardware and has several provinces that over-invested in power generation.
Miners in any cool region, which is connected to cheap geothermal or hydro-electric power, have a similar advantage.
it’s estimated that at least 50% of miners are Chinese. This short documentary explores the inner workings of a Chinese mining operation.
Mining is a growing industry that provides employment, not only for those who run the machines but those who build them. Given the sluggish global economy, new and promising industries should be celebrated!
3) Protection from Inflation and Avoidance of Capital Controls
Of course it’s your money. I just tell you what it’s worth and what you can do with it.
As alluded to in Reason 1, many rulers are diluting the value of “their” national currencies, either as an economic stimulus (mostly to the net-worth of elites) or as a means to cheapen their tremendous debt.
Such debasement punishes savers in particular, as the value of their stored wealth is eroded. Savers naturally seek to protect their fiat savings by translating them to a more durable form, such as foreign currency or investments.
Rulers often block their citizens’ flight to monetary safety by imposing capital controls. China is known for its particularly strict limitations.
Bitcoin mining represents an excellent, legal way to circumvent such restrictions.
Investing in a mining operation brings a steady stream of bitcoins; a form of money largely beyond the control of the ruling class.
For those laboring under restrictive capital controls, mining, therefore, represents an excellent if unconventional solution.
Given the relative costs and risks of other wealth-preservation measures, it may even be worthwhile to mine Bitcoin at a loss!
Consider one of the popular alternatives, real estate:
Bloomberg estimates that $1 trillion left China in 2015, 7 times more than was offshored in 2014! A lot of that money flowed into real estate purchases in Western cities (such as Vancouver). This phenomenon has created localized bubbles and unaffordable housing conditions for residents. The likely outcome is a disastrous crash that sets the regional economy back by years.
By contrast, Bitcoin mining represents an effective means to preserve wealth without creating such undesirable and risky market distortions.
4) Bitcoin Ultimately Requires Fewer Resources than the Fiat System
“We require more Vespene gas.” -Zerg Overseer
If we take Motherboard’s linear extrapolation that Bitcoin will consume as much power as Denmark by 2020, then add the assumption that Bitcoin will have scaled sufficiently by then to cater to every user of the fiat system… it becomes possible to compare the two systems, in an admittedly rough-and-ready fashion.
Allowing that Bitcoin will replace banks, ATMs, brokers, exchanges, and payment services (like VISA, MasterCard, and PayPal) around the world, we can offset the electricity required by all those services. Considering the combined electric costs for these operations (covering lighting, air-conditioning, data-centers, website hosting, office equipment, and more) the total probably approaches or even exceeds Denmark’s current power usage.
Besides raw electricity, there are many other resources necessary for the continued operation of the fiat system but not to Bitcoin. For example:
- printer paper and other office supplies,
- the armored cars used to transport cash,
- the paper, textiles, ink, and power needed to create that cash,
- the gasoline used by all employees driving to and from work every day,
- the resource cost of building offices,
- and so on, ad infinitum.
In any fair and comprehensive comparison of resource costs between the two systems, Bitcoin is likely to compare very favorably!
5) Mining Generates Subsidised Heat
Excess heat from Bitcoin mining – problem or solution?
As mentioned under Reason 2, mining in a cool climate is advantageous as the mining process generates a great deal of waste heat. However, enterprising Bitcoin miners can capture and use this heat productively!
There are many examples of data centers re-using heat (for example, IBM Switzerland warming a public swimming pool) which Bitcoin miners could follow. Waste heat can even be useful to aquaculture and it’s also possible to harness hot exhaust air for drying processes.
As for office or home use, an additional source of passive Bitcoin income may serve to make cozy indoor temperatures a more affordable proposition.
Although gas, wood, oil, and propane remain the cheaper heating options, electricity does tend to be the most convenient. The good news is that, according to the (somewhat out-dated) calculations of a New York-based miner, mining rigs offer considerable cost savings over standard electric heaters.
As an additional benefit, mining rigs may be precisely controlled via common computing hardware, such that a customized heating schedule or adaptive climate control system may be programmed with relative ease.
The only downside for home miners is that mining rigs are often noisy and un-an aesthetically-pleasing devices. As a result, they tend to be sequestered in the basement or garage for the sake of domestic harmony. A little ingenuity may be called for to pipe their heat to where it’s more needed in the house.
Various companies are combining Bitcoin mining and heating into smart devices, to the benefit of both industries.
6) Bitcoin Mining can support the IoT ( Internet of Things )
Rise of the Digital Autonomous Corporations and other buzzwords!
Continuing the theme of Bitcoin integration with household and industrial devices, this is the precise business model of potentially-disruptive Bitcoin company, 21.co.
21 raised $120 million in venture capital, a record for a Bitcoin company. As their initial product offering, 21.co released a Raspberry Pi-like device with built-in Bitcoin features; mining included.
While such low-powered mining devices earn very little income, even a few hundred Satoshis opens the door to automated micro-payments…
It’s long been known that Bitcoin offers real potential for machine-to-machine payments. This potential is likely to be realized soon™ with the deployment of the first Lightning Network. The results are bound to be interesting; perhaps even the beginning of a profound technological shift in how we conduct our lives and business!
Smart, interconnected devices offer great promise in terms of self-reporting of problems and supply shortages, even the self-calibration and the self-diagnosis of problems. Bitcoin and additional layers are the most likely payment avenues to cater to these new, developing industries. After all, machines don’t have bank accounts or credit cards. How else will machines pay for their own inputs and how better could they charge for their outputs?
Certainly, the possibility of enabling such exciting and potentially transformative technologies is worth the energy cost… particularly given the synergy between smart devices and power saving through increased efficiency.
7) Denmark and Germany Occasionally Struggle with Excess Power
“On Sunday, May 8  Germany produced so much electric power that prices were actually negative. As in, customers got paid to use the electrical system.” – Fortune.com
It was recently reported that Germany’s solar and wind generation nearly overloaded its electric grid over a, particularly sunny and windy day. Power companies paid their customers to use more power so that the energy could be safely dispersed.
Somewhat ironically, considering the Motherboard’s comparison, similar excess power situations are known to occur in nearby Denmark.
This means that if you set up in a location that experiences electricity oversupply from variable green sources, it’s possible to get paid for mining Bitcoin as a public service!
8) Mining Powers Bitcoin’s Tokenized Assets, Secondary Layers and Merge-Mined Coins
Mining Bitcoin isn’t just mining Bitcoin!
If the mining process is the powerful engine driving Bitcoin, then it’s certainly a unique engine in that it loses no efficiency for driving additional processes. Namecoin, the very first altcoin, uses the same SHA-256 Proof of Work algorithm as Bitcoin, which means miners any find solutions to both Bitcoin and Namecoin blocks concurrently. As Namecoin serves a decentralized DNS ( Domain Name Server ), the effect is to bring greater resilience and censorship-resistance to the internet.
Somewhat similar to Namecoin in concept, but more closely tied to Bitcoin, are side-chains. These are essentially separate blockchains that are pegged to Bitcoin’s blockchain. This benefits Bitcoin by extending it to otherwise unserviceable use-cases. It also benefits the side-chain by backing and securing it cryptographically with the huge power of the Bitcoin mining industry.
Tokenized coins are another technology layer with far-reaching implications, which are similarly backed and secured by Bitcoin mining.
By associating particular units of bitcoin with digital, financial, or physical assets, ownership of such assets may be exchanged. This works with everything from stocks to in-game items to land deeds and so on. Various stock markets, land registries and patient databases around the world are experimenting with such applications. Counterparty is an example of a Bitcoin-based platform that enables the tokenization, as famously (?) seen in the Rare Pepe Directory.
9) Mining Efficiency is Constantly Increasing
Finally, it must be noted that the efficiency of Bitcoin mining is constantly improving, so less power is used to provide more cryptographic security.
Since Bitcoin’s release in 2009, mining hardware has evolved from computer CPUs to graphic card GPUs to FPGAs (Field-Programmable Gate Array) and now to ASICs (Application-specific Integrated Circuit). ASIC mining chip architecture and processes are under continuous development, with lucrative rewards on offer to those who bring the latest and greatest innovations to the market.