osmosis-labs / osmosis

The AMM Laboratory
https://app.osmosis.zone
Apache License 2.0
892 stars 593 forks source link

feat: [indexer][v26] optimization - publish token supplies and pool pair data after synced #8761

Closed cryptomatictrader closed 1 month ago

cryptomatictrader commented 1 month ago

This commit:

  1. Promotes the node status checker from sqs level to common level, so that it is used by both sqs and indexer ingesters.
  2. Modifies the fullIndexerBlockProcessStrategy in indexer such that it delays the publishing of token supplies and pool pair data until the node sync finishes (i.e., when catch up is false).
  3. Adds test cases for the full_indexer_block_process_strategy::ProcessBlock function:
    1. When the node has caught up and is no longer syncing:
      • Publishes the correct number of token supplies and offsets.
      • Publishes the correct number of pool pairs, along with the expected number of pools with creation data.
      • Returns an error if it fails to verify the node's syncing status.
    2. When the node is still syncing:
      • Returns an error, and no data should be published.
cryptomatictrader commented 1 month ago

Closed as the one for main branch has been created.