In order to automate Indexer for Explorer CI/CD we want indexer to be able to decide from which block it should start indexing. We already have sync-from-interruption mode but in our case we want to start indexing from N blocks earlier than indexer was interrupted.
To avoid adding unnecessary features on the NEAR Indexer Framework side it was suggested to handle this on the Indexer for Explorer side.
We want to perform a trick if sync-from-interruption mode was passed:
read explorer database to get the height of the latest block we know (LATEST)
calculate START_FROM = LATEST - N
start indexer by replacing sync-from-interruption with sync-from-block --height START_FROM under the hood
This will allow to automate indexer restarting in case of any fails.
In order to automate Indexer for Explorer CI/CD we want indexer to be able to decide from which block it should start indexing. We already have
sync-from-interruption
mode but in our case we want to start indexing from N blocks earlier than indexer was interrupted.To avoid adding unnecessary features on the NEAR Indexer Framework side it was suggested to handle this on the Indexer for Explorer side.
We want to perform a trick if
sync-from-interruption
mode was passed:LATEST
)START_FROM = LATEST - N
sync-from-interruption
withsync-from-block --height START_FROM
under the hoodThis will allow to automate indexer restarting in case of any fails.
/cc @chefsale