Post
Topic
Board Pools
Re: [6600Th] Eligius: 0% Fee BTC, 105% PPS NMC, No registration, CPPSRB (New Thread)
by
un_ordinateur
on 22/07/2014, 15:02:58 UTC
i've also noticed does the diff rate only go like 256 512 1024? so there is no middle ground? like 720?

Difficulty is a power of 2.

Difficulty indirectly represents the number of zeroes a the binary representation of a block hash must begin with to be considered a valid share.

The formula is :
Number of zeros necessary = 32 + log2(difficulty).

So a diff1 share begins with: 0000 0000 0000 0000 0000 0000 0000 0000 XXXX XXXX....

A diff2 share adds one 0: 0000 0000 0000 0000 0000 0000 0000 0000 0XXX XXXX....
Since it cuts in half the number of valid shares, the "difficulty" of finding a valid share is doubled.

A diff4 share adds another 0:  0000 0000 0000 0000 0000 0000 0000 0000 00XX XXXX....
The number of valid share is again cut in half, so the amount of work necessary to finding a valid share, relative to a diff1 share, is 4 times.

You can see, then, how and why the difficulty is constrained to powers of two. Furthermore, putting a non-power of two in the above formula would result in a non-integer amount of zeros necessary, which is impossible.

At the protocol level, the most meaningful value is the number of 0s, but difficulty is more useful and meaningful reprensentation for us humans, since we are mostly interested in the amount of work we'll need to do, and not what a correct answer looks like.