Author

Topic: bitcoin wiki: target calculation mistake? (Read 144 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
February 07, 2018, 08:01:13 PM
#2
0xFFFF0000 is a compact representation of the target. The target is a 256 bit integer, but is compacted into a 32 bit form that can be stored in blocks. What that format is is described here: https://bitcoin.org/en/developer-reference#target-nbits.
newbie
Activity: 2
Merit: 1
February 07, 2018, 07:02:58 PM
#1
Hi all, new to bitcoin so just been doing a bunch of reading lately, mainly on the bitcoin wiki.

I'm confused about the description here
https://en.bitcoin.it/wiki/Hashcash#Work.2C_difficulty_.26_cryptographic_security

The page contains the equation

difficulty = target / 0xFFFF0000

which implies that at difficulty = 1 the target would be 0xFFFF0000. But in fact at difficulty 1 the target is (https://en.bitcoin.it/wiki/Target#What_is_the_maximum_target.3F)

0x00000000FFFF0000000000000000000000000000000000000000000000000000
or
0x00000000FFFF*2^208 ~= 2^224

I think the contributor is confusing the value of the target with the amount of work required to find a hash below the target. I think the equation above should instead be
D = target / (2^256 / 0xFFFF0000) ~= target / 2^224

Can anyone comment on this? Sorry if I'm misinterpreting the syntax or some other mistake on my part. Cheers.
Jump to: