Correcting the error in getnetworkhashrateps

Posted by sipa

Aug 7, 2025/21:56 UTC

The email discusses a method for estimating the amount of computational work involved in blockchain mining using statistical models based on hash values. The discussion begins with the concept that the k'th lowest hash value, normalized between 0 and 1, can be used to estimate the total amount of work done. This is based on the assumption that each hash attempt represents a uniformly random sample from a continuous uniform distribution between 0 and 1.

The mathematical model suggests that the k'th lowest hash follows a Beta distribution, specifically (H_{(k)} \sim \mathrm{Beta}(k, n+k-1)), where (n) is the number of samples or attempts. From this distribution, the expected value and variance of the work estimate can be calculated. The formulas provided indicate that the accuracy of the work estimate improves with higher values of (k), but even at small constant values of (k), the variance remains proportional to (n^2), indicating a high level of estimation uncertainty.

To achieve a more precise estimate, the discussion shifts towards using the number of blocks seen ((b)) as a basis for estimation, coupled with the expected amount of work per block ((w)), which is determined by the mining difficulty target. The relationship between the number of blocks, the work per block, and the total work is modeled using Poisson distribution, resulting in an estimation formula with significantly reduced variance, specifically (\mathcal{O}(n)). This approach suggests that basing the work estimate on the number of observed blocks leads to a much more stable and accurate measure of the computational effort expended in the mining process.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback