A Quick Overview of Bitcoin Testnet Block Generation

One of the strangest peculiarities in the Bitcoin Testnet is the way it generates blocks, to make testing easier on the testnet there’s a special rule in the consensus that if a block isn’t mined in the last 20 minutes the next block is going to reset the difficulty to 1, for reference the current Bitcoin Mainnet difficulty is 5363678461481.

Just like the normal bitcoin network, testnet also readjusts its difficulty every 2016 blocks, however when the block before the retarget (block #2015, #4031, etc) is a difficulty 1 block (as an effect of the 20min rule) the retarget will set the difficulty to 1.0! And because of the fact that a retarget can never be more than 4x the previous difficulty, on the retargets that follow the difficulty goes from 1.0 to 4.0 to 16.0 to 64.0 etc.

This can cause a lot of custom block explorers to get stuck at a certain block for a few hours, as the difficulty retarget will create an unusually high amount of blocks coming to the explorers, miners can also create a huge amount of orphan blocks with chains longer than what we can see on the Bitcoin Mainnet, this means that many different custom implementations are not well equiped to deal with this. This has happened quite a few times in the past and will probably continue to happen in the future, as pointed out recently on bitcoin-dev, and just means more coins for the developers on the testnet!

Support us and the authors of this article by donating to the following address:

3BogCWrLHDdnrB3Fvwv2MowG5Ng5Mx8ihW

Comments powered by Talkyard.