Correcting the error in getnetworkhashrateps

Posted by zawy

Jun 28, 2025/07:49 UTC

The email discusses an innovative approach to calculating the hashrate of a blockchain network, emphasizing the use of a fixed time window rather than a fixed number of blocks. This method is highlighted for its relevance at the exact moment the query is run, allowing for more accurate estimations of hashrates at specific times, such as daily estimates at midnight. The technique accounts for minor discrepancies in timestamps, which usually do not significantly impact the results. A key point is the estimation method that calculates the hashrate based on the midpoint of the time range or heights from which work is summed, suggesting an adjustment to the formula by incorporating the current time of the query instead of the most recent timestamp. This adjustment aims to compensate for the expected duration since the last block, effectively extending the timespan by one block length and enabling hashrate estimation even for a single new block, which would otherwise result in a division by zero error.

Further exploration in the email reveals an alternative method for estimating the total chain work without needing knowledge of difficulty or timestamps. This method relies on the Nth lowest hashes observed, with the total chain work approximated through a mathematical formula that considers the quantity of blocks and the lowest hash values. An interesting aspect is the inclusion of all orphans in the chain work calculation, underlining the method's comprehensiveness. However, this approach also hints at significant variability in the standard deviation of the error, especially when only the lowest hash is considered, suggesting a potential 5000% standard deviation in error under those circumstances.

In summary, the email introduces a nuanced perspective on blockchain hashrate and chain work estimation, proposing methodologies that refine accuracy by adjusting for real-time conditions and leveraging statistical properties of the lowest observed hashes. These methods offer insights into more precise and flexible ways of understanding blockchain network performance and security, underscoring the importance of adaptive techniques in the continuously evolving landscape of blockchain technology.

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