[avalanche] Update the RTT algorithm on november 15
Summary:
The current RTT algorithm uses a 4 windows filter:
- minimum 1x10 minutes over the past 2 blocks
- minimum 4x10 minutes over the past 5 blocks
- minimum 10x10 minutes over the past 11 blocks
- minimum 16x10 minutes over the past 17 blocks
In order to improve the filter efficiency, especially the case where 2 blocks are mined in a row, a new window is added:
- minimum 0,25x10 minutes over the past 1 block
This means that we filter for a target of 150s between consecutive blocks, which result in a higher difficulty for 115s (filter cutoff time) with our K=6 coefficient.
A new header time is returned in the block template so miners that recompute the value need to adjust for the upgrade. Miners using the node computed value (most of them) have nothing to do but update the node.
Test Plan:
ninja all check-all check-upgrade-activated
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18704