0

the Bitcoin White Paper states on page 3:

"To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases."

How does the network decentrally compute and consensate on the value of this moving average?

It seems to me like they would have to use some sort of consensus mechanism in order to find consensus on the value of the moving average. That would defy the purpose in itself since the sole need for the value is within the calculation of a consensus. I also note on this regard that I am not aware of any time-stamp or -measurement technique in bitcoin. If so, I would be thankful for a rigorous elaboration.

  • 1
    While the linked answer explains how the difficulty is computed, I think the short part of the answer you're missing is simply that blocks carry the timestamp they were created at. Miners have complete freedom in choosing what timestamp they put in blocks, but (a) setting them too low causes difficulty to go up which reduces their income and (b) nodes don't accept blocks with timestamps more than 2 hours in the future. This is sufficient to get an incentive for low-accuracy timing information, but we don't need more; Bitcoin only adjusts difficulty every 2 weeks; an hour or 2 off is ok. – Pieter Wuille Sep 25 '22 at 21:22

0 Answers0