Distribution of nonces and hashes

From Bitcoin Wiki
Revision as of 02:08, 14 March 2015 by Geremia (talk | contribs) (→‎Distribution of Nonces: added more explanation about why the nonce distribution is skewed toward lower nonce values)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here we analyze the nonce values and hashes for all the valid blocks in the blockchain:[1]

Time Evolution

Nonces vs Hashes (y-axis logarithmic, x-axis linear)

This plot readily shows that the distribution of nonces that produce valid hashes is uniform.
verba alia

Nonces vs Hashes (log-log scale)

Nonces vs Hashes (log-log scale)

In the animated version of this last plot,[2] you can really visualize the change in the difficulty and even see where the difficulty was decreased.


Distribution of Nonces

The nonces found are skewed toward 0 because this is a selection effect: most everyone starts searching for nonces starting at 0, so the lower nonces are found first, even though there may be also higher nonces that could produce a winning block:
histogram of nonces

Distribution of Hashes

Although the distribution of hashes is not uniform, this does not matter; all that matters is that the distribution of nonces is uniform (which they are, minus the selection effect of starting at 0):
histogram of hashes

2-D Distribution of Nonces & Hashes

2-D histogram of hashes and nonces (logarithmic color scale):
Density Plot (log colorscale)
This also illustrates very well that the distribution of nonces is uniform.


This page is a stub. Help by expanding it.