Skip to content

Update ENSIndexer version info to fully cover ENSRainbow version info #1166

@tk-o

Description

@tk-o

Creating an object of ENSIndexerVersionInfo type should fully cover the value returned from ENSRainbow /version endpoint.

In other words, for ENSIndexerVersionInfo type fields:

  1. The type of ensRainbow here should be the type of an EnsRainbowVersionInfo and contain nested fields inside of itself.
  2. The ensRainbowSchema field should be removed at this level. It already lives inside EnsRainbowVersionInfo.

Originally posted by @lightwalker-eth in #1157 (comment)

Edit: ENSIndexer should also verify invariants match between the EnsRainbowVersionInfo and the EnsIndexerVersionInfo. For example: The client and server label sets need to be compatible. When ENSIndexer dynamically fetches EnsRainbowVersionInfo from ENSRainbow to build its own EnsIndexerVersionInfo if this invariant check fails then ENSIndexer should throw an error such that ultimately the API call to get the config of the ENSIndexer instance should trigger a HTTP 500 error. The cause of this error should be written to error logs to help ENSNode operators figure out they have a misconfiguration between their ENSIndexer and ENSRainbow instances.

Edit: ENSRainbow should stop exposing its schema version through its API. It's schema version is an internal implementation detail that shouldn't be exposed via API. @lightwalker-eth is advancing a PR now that will remove the display of this field from the ENSAdmin UI, but this field still needs to be removed from the ENSRainbow API and also from the ENSIndexer config API.

Image

Edit: We likely shouldn't create any EnsRainbowVersionInfo type / interface. Instead we should be creating an EnsRainbowConfig (or related public variant). Here we should:

  • Apply all the same design patterns for building a config in ENSRainbow that we implemented in ENSIndexer.
    • Therefore, ENSRainbow should build and validate its config from environment variables on startup and then make use of the fully validated config across its code.
    • ENSRainbow should offer its public config via a /config API.
    • The ENSRainbow public config object should include within it fields that are NOT set via environment variables but that are relevant for consumers of the /config API. For example, it should include a field for the count of rainbow records it is managing.
  • We should update the UI in ENSAdmin so that we show this new count of rainbow records field in the "ENSRainbow" panel when displaying the details of the active connection.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions