You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The estimated time of a mainnet block that's three to four days out is highly dependent upon sample count, which suggests that block duration is variable by (among other factors) time of day. So rather than querying the N most recent blocks, it would make sense to spread the samples out.
Suggestions:
When estimating the time of a future block, sample durations randomly within a range that goes back a number of blocks equal to the difference between the current height and the height to be estimated (e.g., if the current height is 10000 and the target height is 15000, then times should be sampled from starting heights 5000 to 9999). If the range is not big enough to satisfy the sample count, then expand it backwards to perform complete sampling as in the current implementation.
When estimating the block height of a future datetime, calculate how far in the future it is and then find a block height that is that far in the past (by e.g. extrapolating backwards from the most recent block duration and then using linear estimation) to use as the start of the range (as above, expanding backwards if it is not big enough to cover the requested sample count).
When using statmode "mean", sample only the endpoints.
This tool is intended for near-term estimation, so I think it's fine to fail if a requested block is so far in the past that it has been pruned. But alternatively, that situation could be detected and used to dynamically update the lower bound for block height sampling.
The text was updated successfully, but these errors were encountered:
The estimated time of a mainnet block that's three to four days out is highly dependent upon sample count, which suggests that block duration is variable by (among other factors) time of day. So rather than querying the N most recent blocks, it would make sense to spread the samples out.
Suggestions:
This tool is intended for near-term estimation, so I think it's fine to fail if a requested block is so far in the past that it has been pruned. But alternatively, that situation could be detected and used to dynamically update the lower bound for block height sampling.
The text was updated successfully, but these errors were encountered: