Open stwiname opened 2 months ago
The ability to find the nearest blocks to a timestamp. Some chains provide a RPC method for this, otherwise a binary search could be used to find the block.
My concern is currently indexing for multi chain also didn't following a timestamp order (there is no order), we can add an additional field indexing_order_id
to record the indexing order, and we can find the record match network height, remove any record beyond this id
Background
Currently historical indexing works by having a hidden column on tables with the block height range. This doesn't work for multichain where each chains blocks are produced independently. In order to support historical with multichain we can use a timestamp instead
Requirements
Database changes
Rewind support
This will be more complex as currently each indexer runs independently.
Other considerations/unknowns
Future
Enabling historical indexing for multichain is a step towards enabling more features that are already supported with single chain indexing