Oddbean new post about | logout
 How do you calculate the hashrate of testnet4? Because what is shown on pools (like testnet.vkbit) and 'getmininginfo' RPC is completely wrong. This is because people mine future blocks with their CPU, so there is a lot of "difficulty 1" blocks, which completely messes up the hashrate calculation.

If you want to calculate the chance of hitting high enough difficulty requirement, you should only use that. e.g. P (probabilty) = 1 / (difficulty * 2^32).

You can get the difficulty from a block that has difficulty > 1 (most blocks on testnet have difficulty "1" because they set the time of the block (nTime) to 'last block + 20 minutes', and then use CPU (or bitaxe or whatever) to immediatly hash that block.