kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a stable version at the initial rollout phases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. 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.
  2. [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):

  1. always keeping indexes in sync, even while node is not processing.

Against:

  1. slightly longer sync times
  2. potentially extra Db read and write costs while syncing.