safe-client-gateway icon indicating copy to clipboard operation
safe-client-gateway copied to clipboard

Implement method to get indexing status

Open iamacook opened this issue 6 months ago • 0 comments

Description

The Web would like to show the indexing status of the Transaction Service in the UI.

image

Semantically, the information-to-be-shown is:

  1. Is the latest block synced?
  2. How long since the last sync?

Requirements

  1. Investigate implications of including the aforementioned in the Safe info. endpoint or if a new one is better. (The Web is already polling for the Safe info.)
  2. In the decided endpoint, return from the /v1/about/indexing/ endpoint of the Transaction Service:
  • The synced flag
  • The (cached) block timestamp of the oldest synced block (either erc20BlockNumber or masterCopiesBlockNumber), obtained via RPC request.

Note: the Transaction Service already caches the /v1/about/indexing/ endpoint for 15 seconds. On top of this, we need to adjust our blockchain datasource to cache (at least for block timestamp retrieval, to begin with).

Additional information

iamacook avatar Aug 01 '24 12:08 iamacook