Why does Bitcoin adjust the difficulty every 2016 instead of 2048 blocks?

1

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?

sevenever

Posted 2018-01-04T08:36:02.040

Reputation: 113

Answers

1

2016 blocks at an expected interval of 10 minutes are exactly 14 days. Likely the window for the difficulty period and interval were picked first and 2016 resulted from that.

Murch

Posted 2018-01-04T08:36:02.040

Reputation: 41 609

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.

satoshi_ghost

Posted 2018-01-04T08:36:02.040

Reputation: 116