Post
Topic
Board Pools
Re: [2000 GH] Eligius: Decntrlzd, ASIC-rdy, 0Fee CPPSRB, 0reg, BTC, 877 # support
by
Luke-Jr
on 03/05/2013, 05:40:35 UTC
https://en.bitcoin.it/wiki/Difficulty

Pools "often do" pdiff, but it seems bdiff is what bitcoin actually does internally. Wouldn't that make bdiff the defacto standard? Since pdiff ends up slightly higher, there's no harm done. Anything hitting the pdiff target also meets the bdiff target. But isn't bdiff the true standard?
There's two different standards, but bdiff only makes sense in the context of Bitcoin because of its floating-point block target.
Pdiff makes more sense for pools, miners, and blockchain-independent difficulty measurements, especially since it can be easily compressed down to a single byte (by counting the number of zero bits).
I am not fully comprehending the difference you suggest between a Pdiff of some number close to 1 (but technically under it) vs. 1 vs. bdiff  What difference does having Pdiff less than one vs. not? There must be some reason you'd want to do it that way, so out with it in layman's terms please.  Grin

Pdiff 1 = target 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, or 32 zero-bits
Pdiff 2 = target 0x000000007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, or 33 zero-bits
Pdiff 4 = target 0x000000003FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, or 34 zero-bits
etc

But Bitcoin stores the target in a floating-point number type with 23 bits of precision, so it truncates them:

Bdiff 1 = target 0x00000000FFFF0000000000000000000000000000000000000000000000000000
Bdiff 2 = target 0x000000007FFF0000000000000000000000000000000000000000000000000000
Bdiff 4 = target 0x000000003FFF0000000000000000000000000000000000000000000000000000
etc