2

The call bitcoin-cli getmininginfo returns a metric networkhashps among others. It shows how many hashes the entire Bitcoin network generates per second.

This metric however, is not directly stored within the Blockchain, resp. it is not communicated over the gossip network. Consequently it must be derived; I assume that it takes the difficulty and also checks the time it took between blocks.

But how does the algorithm behind this exactly look like?

1

The hashing power is estimated from the number of blocks being mined in the last 24h and the current block difficulty. More specifically, given the average time T between mined blocks and a difficulty D, the estimated hash rate per second H is given by the formula H = 2exp32 D / T

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.