1

Can some one explain completely what off by one error is? how is it fixed?

2

In the bitcoin blockchain, the difficulty of mining is adjusted after every 2016 blocks. If the average mining time for the last 2016 blocks was higher than 10 minutes than the difficulty is reduced so that the time readjusts to 10 minutes. While if the time to mine the last 2016 blocks was lower than 10 minutes, then the difficulty is increased.

Although the target calibration happens every 2016 blocks, because of an "off-by-one" error within the Bitcoin Core client, it is based on the total time of the previous 2015 blocks (not 2016 as it should be). Because you are now including the time for the last 2015 blocks but comparing it to 20,160 minutes (2016 x 10 minutes), this results in the target bias upward by ~0.05%.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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