Hacker News new | ask | show | jobs
by tobiaswk 3033 days ago
With bitcoin (not bitcoin cash) the difficulty is adjusted every 2016 blocks. If too many blocks were mined in this period the difficulty will decrease and vice versa. This means that many blocks could be mined faster or slower in this period. Until of course the difficulty adjustment occurs again. You use what is called the nonce in the block header. Each time you do a hash of the block you increment this nonce. If your hash is under or equal to the difficulty the block is valid. The difficulty essentially means how many zeroes are in front of your hash.

What big mining operations do is to slice this nonce into appropriate ranges for each miner. So no miner is hashing with the same nonce. So miner 1 starts at nonce=0 and miner 2 on nonce=2000. The nonce range depends on how many hashes each miner can do in a ten minutes span. By doing this each miner is not doing hashing with the same nonce. That would be wasting hashing operations.

Now bitcoin cash changed the difficulty adjustment algorithm (DAA). Instead of adjusting the difficulty every 2016 blocks this is done after each block has been found. This was done to stabilize the difficulty. So miners stay mining bitcoin cash instead of switching between the most profitable chain (bitcoin or bitcoin cash). This was a problem before the new DAA was implemented for bitcoin cash.

There has been times in recent history were no new block was found for 20 minutes on bitcoin. For bitcoin cash around 2 hours. This was in November 2017. It has been 10 minutes stable ever since.

You can check this yourself on bitinfocharts.com for each blockchain under Block Time.

1 comments

This article is completely independent of difficultly adjustment. The 20 minute average gap is a consequence of bitcoin mining being a Poisson process and the lack of memory property that follows.