2

I am reading Bitcoin wiki and it says

over the previous 2016 blocks. Can be further simplified to

D * 2**32 / 600

without much loss of accuracy.

I guess the reason of reducing to 2**32 is for computing convenience (bit operation). However, 0xffffff / 2016 = 32.507440476190474 and 0xffffff / 2048 = 31.99951171875 which is more accurate.

Why was 2016 chosen instead of 2048?

2 Answers 2

2

14 days have 20,160 minutes.

Likely the time window for the difficulty period and the targeted block interval were picked first and then the 2016 blocks resulted from that.

0

For calculating the difficulty retargeting, the equation is:

New Difficulty = Old Difficulty * (Actual Time of Last 2015 Blocks / 20160 minutes)

20,160 minutes is two weeks based upon a desired 10-minute block time; hence the 2016 blocks.

P.S. I actually do mean 2015 blocks. Even though the retargeting itself happens every 2016 blocks, due to an off-by-one error in the original Bitcoin Core client (my bad ;)) it is based on the total time of the previous 2015 blocks only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.