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 most recent blocks are not automatically the most representative of the future performance of the chain. In the case of the agoric mainnet chain for example, we're seeing somewhat cyclic performance degradation with a primary interval of 7.2 days (and a secondary interval of 1.6 days).
The primary use case is to estimate the expected time of a future block.
The existing -height command line option would accept an -offset argument that would be parsed as a date/time offset (e.g. 7d). In that case the tool should estimate the time of the requested block (breq) based on the timings of the blocks starting at the given offest:
query the chain's current block (bcur) height and time.
search for the first block (bz) with a time >= bcur.time - offset.
Unfortunately it seems that block.time is not indexed because the block_search RPC endpoint does not return any value for query="block.time >= TIME 2024-12-31T01:40:00Z", which should the right syntax so we may need to do a binary search (likely weighted by the calculated average block time between intermediate results of the search)
Let range = breq.height - bcur.height
If bcur.height - bz.height < range, update bz info with block query for height = bcur.height - range
Query bt block info from height = bz.height + range
Let time_delta = bt.time - bz.time
The estimated breq.time = bcur.time + time_delta
The text was updated successfully, but these errors were encountered:
The most recent blocks are not automatically the most representative of the future performance of the chain. In the case of the agoric mainnet chain for example, we're seeing somewhat cyclic performance degradation with a primary interval of 7.2 days (and a secondary interval of 1.6 days).
The primary use case is to estimate the expected time of a future block.
The existing
-height
command line option would accept an-offset
argument that would be parsed as a date/time offset (e.g.7d
). In that case the tool should estimate the time of the requested block (breq
) based on the timings of the blocks starting at the givenoffest
:bcur
) height and time.bz
) with atime >= bcur.time - offset
.block.time
is not indexed because theblock_search
RPC endpoint does not return any value forquery="block.time >= TIME 2024-12-31T01:40:00Z"
, which should the right syntax so we may need to do a binary search (likely weighted by the calculated average block time between intermediate results of the search)range = breq.height - bcur.height
bcur.height - bz.height < range
, updatebz
info with block query forheight = bcur.height - range
bt
block info fromheight = bz.height + range
time_delta = bt.time - bz.time
The estimated
breq.time = bcur.time + time_delta
The text was updated successfully, but these errors were encountered: