Skip to content

Support the display record when determining the displayName for a primary name lookup #1502

@lightwalker-eth

Description

@lightwalker-eth

Background

  1. See Return beautified display names #1501. That issue is a prerequisite for the ideas discussed here.
  2. Reference docs about the display record in the following ENSIP: https://docs.ens.domains/ensip/5/

Goals

  1. Fully optimize the value we return for displayName.
  2. Provide yet another advantage we can cite for why use of ENSNode is the best solution for building on ENS.

Requirements

  • During a primary name lookup, when fetching the forward resolution address of the reverse name, also fetch the display text record.
  • If a primary name lookup fails, nothing changes, and any display text record that might have been found is ignored.
  • If a primary name lookup succeeds:
    • If no display record is defined: nothing changes with our logic.
    • If a display record is defined, and normalize(display) !== the primary name: nothing changes with our logic and the display text record is ignored.
    • Else: return the display record as the displayName field.
  • Advice appreciated: Does the additional lookup of the display text record meaningfully impact latency? If so, maybe we make it so that the use of this feature is only activated conditionally based on a param attached to the API request?

Metadata

Metadata

Assignees

Labels

ensapiENSApi related

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions