the difficulty adjustment is a statistical interpolation mechanism, there are better ways to change it than the simple ~2week 2106 block cycle - using a PID controller mechanism, but it's easy tho get them wrong - the Verge blockchain, for example, used a continuous adjustment scheme with a time consensus and someone eventually stopped the clock
the one that satoshi chose, a simple proportional adjustment, works, it just undershoots and overshoots, and thus it has a long cycle time to narrow its error rate
i build a simulator for these things back in 2021 and experimented with parameters to find optimal numbers for a P-I based scheme that either moved smoothly or stayed stable against the actual hashpower on the network, but i didn't figure out how to make the derivative parameter work
i was doing some more reading on PID and learned that what you need is a high pass filter, which catches the high frequencies of the derivative parameter and that probably would have narrowed the adjustment down so much it is within about 10% of an accurate measurement of the real hash power at any given moment
Interesting!
Yeah, thermostats can be very stupid and still work, and so does Bitcoin.
overshooting and undershooting a bit is not such a big deal.
What's important is to have a mechanism that eventually will reach the target.
yeah, a slow thermostat works well enough
adding the integral and derivative factors to the computation matter more with a high dynamic range, this is the thing about bitcoin's mining hashrate, the bigger it gets, the slower it changes, so the adjustment error % gets smaller over time
Thread collapsed
Thread collapsed