-
Notifications
You must be signed in to change notification settings - Fork 16
Allow ENSIndexer to run ENSDb migrations and populate ENSNode Metadata without waiting for ENSRainbow #1817
Description
Currently, an ENSIndexer instance has a dependency on the related ENSRainbow instace, such that until the ENSRainbow instance is ready to serve HTTP traffic, the ENSIndexer instance:
- Cannot start indexing onchain data.
- Cannot determine the
EnsIndexerPublicConfigobject, which prevents ENSDb Writer Worker from writingEnsIndexerPublicConfigrecord to ENSDb, and as a result, crashes the ENSIndexer instance.
In a cold-start scenario, it might take more than 30 minutes for the ENSRainbow instance to reach the readiness and open its HTTP server.
While the 1st issue remains unadressed, we can and should address the 2nd isssue.
We could make the ensRainbowPublicConfig field on EnsIndexerPublicConfig data model optional. By doing so, the ENSIndexer instance will be able to determine the EnsIndexerPublicConfig object even during the ENSRainbow instance cold-start period. Having EnsIndexerPublicConfig object, ENSDb Writer Worker will be able to populate ENSDb with ENSNode Meetadata (including ENSIndexer Public Config, and Indexing Status where all chains in queued status).
Key points to reflect on while designing the solution for this issue:
- The deeper goal here is we want to make it so that the startup dependencies across our services are softened to improve the experience of operators launching services.
- Fetching the
EnsRainbowPublicConfigobject will require multiple retries. Once the config object was fetched successfully, it should remain cached indefinitely. - When
EnsRainbowPublicConfigobject becomes available in the cache, the ENSDb Writer Worker should update the ENSIndexer Public Config record in ENSNode Metadata table to and update itsensRainbowPublicConfigcolumn fromundefinedto the cachedEnsRainbowPublicConfigobject. - Changing the type of
EnsIndexerPublicConfig['ensRainbowPublicConfig']field fromEnsIndexerPublicConfigtoEnsIndexerPublicConfig | underfinedwill create side effects onEnsIndexerPublicConfigdata model consumers, for example, ENSApi, ENSAdmin. Please make sure to take that into consideration while designing the updates for this issue.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status