chaingraph icon indicating copy to clipboard operation
chaingraph copied to clipboard

Cleanly identify the first live-accepted block after sync

Open bitjson opened this issue 4 years ago • 0 comments

Right now, Chaingraph's heuristic for determining if a block was received "live" is very rough, and the latest ~12 blocks at sync time will have incorrect acceptance times:

https://github.com/bitauth/chaingraph/blob/cbebedefea908957b0373d77a60ec17fdff2050b/src/agent.ts#L1265-L1279

A better heuristic would be to wait until the initial sync is complete and only start marking block accepted_at times after the latest height block known at that time. (Since the agent will try to download as much as possible before starting indexing, blocks first heard during indexing were almost certainly heard by the node in real-time.)

bitjson avatar Nov 20 '21 02:11 bitjson