@im_uname One more thing to ponder. Medians are good when you want to filter out extremes where they would break averages. But here the extremes would be bounded by 10x the median, so maybe a simple moving average would be better because they’d be smoother while the “pull” of extremes would have less impact. Medians can still produce a shock… imagine mining 1,1,1,1,10,10,10,10,10 the max stays at 10 until it suddenly jumps to 100 once 10s outnumber the 1s, and then you start mining 100s to make another 10x jump. Average would’ve lifted it to 90 and it would’ve arrived there smoothly.
Another point is that averages can be accumulated while medians require a bigger state to track and more operations to calculate. To update the average you can do something like new_average = (old_average * (CONSTANT - 1) + new_value) / CONSTANT
, and it can be recorded in coinbase script so you don’t need old blocks to calculate the next average, and so on… so really I think we should look into past work on DAA to find the ideal function, and here we can start talking about what we want from it, like:
- It should rate-limit the max. increase of the cap over the course of a year, 10x / year? This would allow node operators to see increases from a mile away and prepare for it (buy more storage, CPUs, etc…)
- It should remember old maximums, so we don’t have a situation where we fall down from 10 to 1, and then have to work for a year just to bring it back up to 10 when we already know that the network gave the signal that it can handle 10s.
- ??