Skip to content

Enhance handling of a failure to reload a more recent indexing status snapshot #1200

@lightwalker-eth

Description

@lightwalker-eth

Issue Report

Multiple times today while testing ENSAdmin I encountered the following issue:

  1. I open the "Latest Indexed Registrations" and they all load successfully. I watch it auto-update every few seconds.
  2. Then I see this error appear:
Image
  1. Then, a few seconds later, I see the "Latest Indexed Registrations" automatically appear again.

Expected Behavior

We recently made big updates to the indexing status API and its associated data model. Please deeply study this well-documented data model here: https://github.com/namehash/ensnode/blob/main/packages/ensnode-sdk/src/ensindexer/indexing-status/types.ts

And deeply study the key function named createRealtimeIndexingStatusProjection that's defined in https://github.com/namehash/ensnode/blob/main/packages/ensnode-sdk/src/ensindexer/indexing-status/projection.ts

In particular, please deeply study the following:

  • RealtimeIndexingStatusProjection
  • CrossChainIndexingStatusSnapshotOmnichain
  • ... and how these relate via createRealtimeIndexingStatusProjection.

The big idea here is that once an ENSNode client (such as ENSAdmin) manages to successfully fetch the indexing status once, the client can store that indexing status snapshot in memory (cached) as a CrossChainIndexingStatusSnapshotOmnichain and then continuously build new RealtimeIndexingStatusProjection on demand as much as the client wants using createRealtimeIndexingStatusProjection.

Therefore, if ENSAdmin successfully fetches the realtime indexing status once, it should be storing the associated CrossChainIndexingStatusSnapshotOmnichain in memory and then asynchronously in the background working to fetch an updated indexing status snapshot from the connected ENSNode. When this asynchronous background fetching is successful at fetching an updated indexing status snapshot it should update the snapshot it has cached. But if the asynchronous background fetching fails for any reason, whatever indexing status snapshot it might have successfully cached previously should be indefinitely retained in its cache until a subsequent indexing status snapshot is successfully fetched.

Please ask if any questions. This is quite an important and priority enhancement to ENSAdmin.

Metadata

Metadata

Assignees

Labels

ensadminENSAdmin related

Type

Projects

Status

On deck

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions