1
Reading the docs on target:
The maximum target used by SHA256 mining devices is:
0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Because Bitcoin stores the target as a floating-point type, this is truncated:
0x00000000FFFF0000000000000000000000000000000000000000000000000000
I know that the purpose is to force miners to generate hashes with a value lower than the target. But the docs are vague, why is this truncation required? And then, why truncate after the first four Fs?
This was really clear, thanks! Just to make sure, setting the trailing bites of the 256-bit version to zero means that when a miner finds a hash with a value which has the correct number of zeros, but it is higher than the target, that hash is invalid? – Paul Razvan Berg – 2018-06-24T12:20:34.693
@PaulRBerg right, we talk about trailing zeros for simple explanation. In the reality we compare two 256-bit integers – Zergatul – 2018-06-24T13:59:25.537