Sirwin
Sirwin
Bitcoin Mining and Difficulty Adjustment

Bitcoin mining & The Difficulty Adjustment

By Cryptoray | CryptoSpace | 14 Dec 2023


Let's start with the basics of mining on Bitcoin, and nothing better than the creator's explain.

This is what is described on the Bitcoin Whitepaper by the creator, Satoshi Nakamoto:


"To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proofof-work system similar to Adam Back's Hashcash, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block's hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it."

Bitcoin PoW


"The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases. "

And now, with the basics exposed we can start to understand what is the difficulty adjustment. Our mind is prepared for the next, let me explain to you.

The difficulty adjustment on the Bitcoin Network


The difficulty adjustment is what Bitcoin uses to make mining blocks easier or harder to ensure that on average blocks are mined every 10 minutes. Every 2016 blocks mined, about two weeks if there are no major changes in the computation of hashes, this difficulty is adjusted to reflect what happened in that last 2016 block period. This means, if in the last period mining has been slower because there has been less computing capacity dedicated to it (less hashing power), the following period mining will be easier. And vice versa.

In fact, we can know live how many blocks are remaining to the new adjustment here but I will made a snapshot for clarity. On the following image below, we can see three sets of data related to Bitcoin's mining difficulty.

  1. At square one, we can see the remaining blocks to be adjusted (or not) depending on the current average time to mine one block. The current estimation and how many blocks are remaining to the next halving (when mining block rewards are divided by 2).
  2. At square two, we can see the current Hashrate (Network's global aggregated mining power) and the current difficulty.
  3. The last box shows the most recent difficulty adjustments. Including in which block they occurred, how many days ago, the difficulty value to which it was adjusted and the corresponding % change.

 

Mining and difficulty


I hope you enjoyed this lecture, not everybody knows this and is important to spread the details behind the scenes on Bitcoin (The King on the cryptospace). Have a nice day guys, and if you are miner, have good hashes.

Sources:

 

How do you rate this article?

10


Cryptoray
Cryptoray Verified Member

I am an enthusiast of cryptocurrencies and new technologies. Proud to be Ambassador at Syntropy Network. Visit cryptospace.website


CryptoSpace
CryptoSpace

Content creation about Crypto & Blockchain tech

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.