/
sipaPosted by sipa
Jun 27, 2025/22:25 UTC
The discussion focuses on developing an accurate method for estimating the unknown but constant hashrate, denoted as $r$, which is crucial in understanding blockchain dynamics, specifically within the context of Bitcoin mining. The hashrate plays a significant role as it represents the computational power per second used for mining and processing transactions on a blockchain network. The approach outlined utilizes the concept of work done in each block, represented by $W_i$, alongside the duration of each block, $t_i$, to construct a mathematical framework for hashrate estimation.
In this framework, the work required for a block ($W_i$) is calculated based on the difficulty target, which adjusts to ensure that the time taken to find a new block remains consistent despite fluctuations in the total mining power of the network. The durations of blocks are treated as observable variables, which, under ideal conditions, allow for the calculation of the hashrate using a geometric or exponential distribution model due to the vast number of trials involved in mining.
A pivotal element of the analysis is the derivation of a maximum-likelihood estimator (MLE) for the hashrate, $\hat{r}_\mathrm{MLE}$, which maximizes the likelihood function derived from the sum of the logarithms of the probability density functions (PDFs) of the observed block times. This estimator is compared with the current formula used (getnetworkhashps
), highlighting that the MLE approach aligns with existing methods when the difficulty level remains constant within the observation window.
However, the investigation doesn't stop at finding the MLE; it further examines the bias inherent in this estimator. Through mathematical derivation, it's shown that $\hat{r}_\mathrm{MLE}$ overestimates the true hashrate by a factor of $\frac{n}{n-1}$. To correct this bias, an adjusted formula is proposed, yielding an unbiased estimator of the hashrate. This correction ensures that the estimated hashrate closely mirrors the true value over repeated sampling, thereby enhancing the accuracy of blockchain analytics.
Furthermore, the analysis touches upon the statistical properties of the unbiased estimator, suggesting it might be both sufficient and complete. These characteristics imply that the estimator not only provides all necessary information about the hashrate without additional data but also does so with minimal variance, making it the most efficient unbiased estimator possible. Through references to statistical theory, namely the Lehmann–Scheffé theorem, the discussion underscores the estimator's potential as the minimum-variance unbiased estimator (MVUE), underscoring its significance in optimizing hashrate estimation practices within the domain of blockchain analysis.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback