DefiantLabs / cosmos-tax-cli

An opensource cosmos tax tool!
https://defiantlabs.net
Apache License 2.0
25 stars 7 forks source link

Improve updating, tracking and indexing in epoch indexer #469

Closed pharr117 closed 1 year ago

pharr117 commented 1 year ago

The epoch indexer is still a bit underdeveloped and requires manual tracking and intervention to get rewards distributions. We want to improve the workflow like so:

  1. Add a new indexed boolean column to the Epochs model, defaulting to false when stored by the update-epochs command
  2. During epoch indexing, as a first step:
    • Get the current epoch from the RPC server
    • Compare to our database
    • Gather epochs that are missing
    • Run the epoch indexer for all epochs where indexed == false
  3. When an epoch finishes indexing, set indexed = true