miscellaneous indexer improvements: 2) Resync only when required.
D-Stacks opened this issue · comments
Under certain circumstances indexers may resync from scratch, even if there is no need, as we can expect the node to resync from scratch anyway.
Potential routes:
-
find a possibility to identify that the node is in a state where we expect a full resync of consensus on start-up
- this may include virtual daa score / checks for genesis hash / checking config if node is archival.
-
[preferred] resync the indexes at some point when the node itself knows it will only preform a catch-up idb and not a full resync.
Arguments for (keeping the current implementation):
- always keeping indexes in sync, even while node is not processing.
Against:
- slightly longer sync times
- potentially extra Db read and write costs while syncing.