1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-05 23:10:03 +00:00

Addressing errata 151323

This commit is contained in:
Andreas M. Antonopoulos 2015-02-23 19:21:27 -05:00
parent 068be7d7ce
commit a62f0f3736

View File

@ -678,6 +678,12 @@ if (bnNew > Params().ProofOfWorkLimit())
----
====
[NOTE]
====
While the difficulty calibration happens every 2,016 blocks, because of an off-by-one error in the original Bitcoin Core client it is based on the total time of the previous 2,015 blocks (not 2,016 as it should be), resulting in a retargeting bias towards higher difficulty by 0.05%.
====
The parameters Interval (2,016 blocks) and TargetTimespan (two weeks as 1,209,600 seconds) are defined in _chainparams.cpp_.
To avoid extreme volatility in the difficulty, the retargeting adjustment must be less than a factor of four (4) per cycle. If the required difficulty adjustment is greater than a factor of four, it will be adjusted by the maximum and not more. Any further adjustment will be accomplished in the next retargeting period because the imbalance will persist through the next 2,016 blocks. Therefore, large discrepancies between hashing power and difficulty might take several 2,016 block cycles to balance out.