fbpx

How is Bitcoin Mining Performed?

Bitcoins are not printed but rather discovered. Computers worldwide “mine” coins by competing with one another.

Key Takeaways:

  • Bitcoin mining entails discovering new blocks, confirming transactions, and adding them to the network.
  • Each time a new block is discovered, the successful miner is granted permission to add additional transaction data to that block.
  • In exchange for devoting time and resources to this endeavor, successful miners earn a “block reward” of newly minted bitcoin as well as any transaction fees associated with the blocks they create.
  • Only through the process of rewarding successful miners with newly-minted bitcoin do fresh currencies reach circulation.

Why should one mine bitcoin?

There are two basic reasons why an individual or business might desire to mine cryptocurrencies such as bitcoin.

To have a chance at receiving bitcoin block rewards (which, as of 2022, amount to 6.25 bitcoins, or around $210,000 at press time), one must mine blocks. Approximately one new block is discovered every 10 minutes.

To contribute to the protection and maintenance of the decentralized Bitcoin network.

How do miners discover fresh Bitcoin blocks?

Miners must compete using specialized computing equipment to validate and add new transactions to the blockchain. They utilize their technology to generate “hashes,” which are fixed-length codes (see below.) To find the following block, miners must construct a hash with an equal or greater number of leading zeros than the “target hash.”

The target hash is a 64-digit hexadecimal code (consisting of 0-9 and A-F) that all miners are attempting to get below to find the next block.

All miners begin with the “block header” from the previous block, which includes a date, a hash of the previous block’s data, and a space known as a “cryptographic nonce.” The majority of the data in the block header is immutable, except the nonce. A nonce is “a number used just once” and is the portion of the preceding block’s header that miners are permitted to modify. Remember that even a single bit change in the input results in a completely different hash.

The challenge is that hashes are generated at random, making it impossible for miners to predict the hashes before they are formed. It is therefore a matter of trial and error until someone discovers the “golden nonce” — the correct nonce value.

This is why miners must invest in energy-intensive processors, such as application-specific integrated circuit (ASIC) miners capable of generating trillions of hashes every second.

Imagine each new block as a treasure box with a combination lock. This is a simple way to conceptualize bitcoin mining. To acquire the free bitcoin block reward and the opportunity to add new transaction data to it (and pay the related transaction fees), you must keep rotating one of the number wheels on the lock (the nonce) until you figure out the combination (the target hash.)

Here is an example of how a target hash may appear:

0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee

Try making a winning hash with our free online hash generator to determine how difficult it is to build a hash with more zeros at the beginning than the one displayed above. Simply enter any word in the given text field and check to see if it generates a hash with more than 17 zeros at the beginning!

What are hashes?

A hash is a mathematical function used in cryptography to turn any message or data into a fixed-length code. Consider it an encryption technique in which messages are mathematically transformed into a fixed-length string of numbers and letters.

The outputs have fixed lengths to prevent guessing the size of the input. For example, the hash for the word “hello” would be the same length as the hash for the entire Harry Potter book.

These hash functions are irreversible, which means that it is impossible to convert the output back to the original input. The same input will always generate the same letter and number sequence. For a time, the hash of “hello” will always be the same code. Each code created is also fully unique, making it impossible for two distinct inputs to generate the same hash.

In the case of Bitcoin, the blockchain employs Secure Hash Algorithm 256, or SHA 256, to generate an output of 256 bits or 64 characters regardless of the size of the input.

How profitable is mining Bitcoin?

For each new block added to the network, the protocol — a set of rules programmed into Bitcoin — grants the successful miner a preset number of newly generated coins. This block reward method also serves as the Bitcoin distribution mechanism.

As part of Satoshi Nakamoto’s time to gradually reduce the number of bitcoins in circulation, the coins given to miners are halved about every four years, or 210,000 blocks, in a process known as a “Bitcoin Halving.” In 2009, the payout per block was 50 Bitcoin. In 2013, this sum was cut to 25 BTC. In the most recent halving, which occurred in 2020, block rewards decreased from 12.5 BTC to 6.25 BTC.

Note that bitcoin has a maximum supply limit of 21 million coins, and there are already 18.9 million in circulation. When 21 million BTC have been released to the market, block rewards will no longer be distributed. Once this occurs, bitcoin miners will only be able to collect rewards in the form of transaction fees.

Even with the combination of these two revenue streams, not all miners are profitable. To make ends meet, a miner’s revenues must exceed the costs of energy and mining rig upkeep and purchase. In addition, when mining difficulty rises, large mining operations must expand or upgrade their equipment to maintain a competitive advantage. 

There is an opportunity for normal miners who cannot afford to invest in expensive equipment to pool their resources with those of other miners around the world. Each miner commits to sharing rewards proportionally to their inputs. These groups of miners are referred to as “mining pools.”

There are, however, a few occasions in which home-based solo miners have successfully mined blocks.

Bitcoin mining complexity

When Satoshi Nakamoto built the Bitcoin protocol, he coded a goal block discovery time of 10 minutes. This is a crucial fact to know about Bitcoin. This indicates that it should take around 10 minutes for a miner to generate the winning code for the next block.

How then does the network guarantee that fresh blocks are found every 10 minutes?

The Bitcoin protocol can automatically increase or decrease the difficulty of the mining process based on the rate at which blocks are discovered.

The Bitcoin system automatically modifies the target hash every two weeks to make it harder or easier for miners to find blocks. If they are taking too long (more than 10 minutes), the difficulty will decrease; if they are taking less than 10 minutes, the difficulty will increase. The technique will precisely raise or decrease the number of leading zeros. This may not seem like much, but adding a single zero to the target hash makes the code far more difficult to crack, and vice versa.

The Chinese government’s 2021 crackdown on mining activity resulted in the greatest decline in network difficulty in bitcoin’s history. Consequently, the remaining bitcoin miners reported substantial increases in mining revenue.

Why is Bitcoin mining so energy intensive?

Bitcoin’s consumption of a tremendous amount of energy to mine new currencies, validate transactions, and safeguard the network is one of its greatest downsides. At press time, Bitcoin’s hash rate — the amount of computing power allocated to mining new coins – was 183 exahash per second (Eh/s). This means that Bitcoin miners collectively attempt to break the hash of the next block 183 quintillion times per second.

According to the Cambridge Bitcoin Electricity Consumption Index (CBECI), this activity consumes about 131 TeraWatt hours (TWh) of electricity a year – more than Ukraine consumes during the same period.

The primary reason for this excessive consumption is that each time the price of bitcoin rises, it motivates new miners to join the fight for new currencies and compels current operations to buy additional rigs or improve their equipment to remain competitive. When this occurs, the processing power required to mine bitcoin grows (hash rate increases), causing the bitcoin protocol to increase the difficulty so that blocks continue to be discovered at a consistent pace every 10 minutes.

Increased energy consumption is a logical consequence of this increased competition; the greater the number of bitcoin-mining equipment, the greater the collective energy consumption.

Leave a Comment

Scroll to Top