Skip to content

Universal Resolution#11

Merged
adraffy merged 20 commits intomasterfrom
ensip/universal-resolution
Aug 6, 2025
Merged

Universal Resolution#11
adraffy merged 20 commits intomasterfrom
ensip/universal-resolution

Conversation

@TateB
Copy link
Copy Markdown
Member

@TateB TateB commented Oct 14, 2024

Preview


  • "Universal Resolution" or "Universal Resolver" ?

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Oct 14, 2024

Deploying ensips with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff6e440
Status: ✅  Deploy successful!
Preview URL: https://87a5d48d.ensips.pages.dev
Branch Preview URL: https://ensip-universal-resolution.ensips.pages.dev

View logs

Copy link
Copy Markdown
Member

@Arachnid Arachnid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to explicitly state that callers must handle CCIP-Read reverts.

Comment thread ensips/x.md Outdated
Comment thread ensips/x.md Outdated
@makoto
Copy link
Copy Markdown
Member

makoto commented Jan 16, 2025

Should the ENSIP mention upgrade paths or are they more of the implementation detail? I personally thinks it should be mentioned as A: if it's user initiated upgrade, there must be a public API that initiates the upgrade, B: If it's DAO initiated upgrade, there still needs a API DAO has to call and also the user should aware that the resolution logic is not immutable

Comment thread ensips/x.md Outdated
Co-authored-by: Nick Johnson <arachnid@notdot.net>
@TateB
Copy link
Copy Markdown
Member Author

TateB commented Mar 19, 2025

@Arachnid by "callers", do you mean clients? or UniversalResolver implementations?

@TateB
Copy link
Copy Markdown
Member Author

TateB commented Mar 19, 2025

@makoto i don't think adding implementation detail on upgrade paths is worth it, upgradability is down to each individual implementation and it isn't particularly relevant to universal resolution itself imo

@TateB TateB requested review from Arachnid and makoto March 19, 2025 16:26
Copy link
Copy Markdown
Member

@Arachnid Arachnid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TateB TateB marked this pull request as ready for review March 27, 2025 16:40
@TateB TateB requested a review from Arachnid March 27, 2025 16:40
Comment thread ensips/x.md Outdated
Comment thread ensips/x.md Outdated
Comment thread ensips/x.md Outdated
@adraffy
Copy link
Copy Markdown
Member

adraffy commented May 24, 2025

I think we should include findResolver() in the interface too.

@adraffy
Copy link
Copy Markdown
Member

adraffy commented Jul 28, 2025

I moved a bunch of stuff around and tried to simplify it.

I wanted a pseudocode example for forward resolution, but couldn't come up with anything simple w/o including too many cases, so I just left the Solidity and TypeScript usage examples.

A lot of specific details are covered in other ENSIPs so instead of repeating myself, I link out as much as possible, and focus on the mechanics.

Under "Smart Execution", I mention ENSIP-X as a placeholder for "ENSIP: Resolver Features", which I'm working on right now. Possibly, this explanation could be moved to that ENSIP, as this is (my take on) the best protocol for efficiently calling a resolver.

@adraffy adraffy requested a review from makoto July 31, 2025 23:09
Comment thread ensips/x.md Outdated
Comment thread ensips/x.md Outdated
@adraffy adraffy merged commit 976e781 into master Aug 6, 2025
2 checks passed
Comment thread ensips/x.md
`findResolver()` does not perform any validity checks on the resolver and simply returns the value in the registry. The resolver may not be a contract or a resolver.

#### <a name="resolve-example">Pseudocode Example</a>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took a while to figure out what this Pseudocode Example does. Can you add a sentense like below explaining what the example does?

findResolver() walks up the domain hierarchy from "sub.nick.eth" to find the first parent domain with a resolver set (finds one at "nick.eth"), returning that resolver's address, the namehash of the original full name "sub.nick.eth", and the byte offset (4) indicating where in the DNS-encoded name the resolver was found.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's defined in ENSIP-1. Additionally, this section will need revisited with ENSv2 as the traversal method changes.

Comment thread ensips/x.md

### resolve

This function performs ENS forward resolution using the `resolver` found by [`findResolver()`](#findresolver). It provides a standard interface for interacting [ENSIP-1](./1) and [ENSIP-10](./10) resolvers for onchain and offchain resolution. Provided a DNS-encoded `name` and ABI-encoded `data`, it returns the ABI-encoded resolver `result` and the valid `resolver` address.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like you did at EIP3668(CCIP-Read), worth adding ENSIP-1(ENS Protocol) and ENSIP-10(Wildcard) so that people don't have to click ENSIP to figure out what they actually are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using the policy where I hyperlink the first time I mention something, and then rarely again unless its far away or I link to a specific anchor.

We could change the policy to all ENSIP references are linked, as that's an easy ENSIP-repo wide change, but might be noisy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in new PR, but only mentioned once.

#46

Comment thread ensips/x.md

This function performs ENS forward resolution using the `resolver` found by [`findResolver()`](#findresolver). It provides a standard interface for interacting [ENSIP-1](./1) and [ENSIP-10](./10) resolvers for onchain and offchain resolution. Provided a DNS-encoded `name` and ABI-encoded `data`, it returns the ABI-encoded resolver `result` and the valid `resolver` address.

UR automatically handles wrapping calldata and unwrapping responses when interacting with an [`IExtendedResolver`](./10#pseudocode) and safely interacts with contracts deployed before [EIP-140](https://eips.ethereum.org/EIPS/eip-140).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EIP-140(REVERT instruction)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in new PR.

Comment thread ensips/x.md

## Abstract

This ENSIP standardizes [IUniversalResolver](#specification) (UR), an universal entrypoint for resolving ENS names. UR incorporates onchain algorithms for [ENSIP-10](./10#pseudocode), [ENSIP-19](./19#algorithm), [ENSIP-21](./21), and [ENSIP-22](./22) to reduce ENS integration complexities.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put the title of each ENSIP (eg: ENSIP-10(Wildcard Resolution))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in new PR.

Comment thread ensips/23.md
* If the called function reverted, reverts `ResolverError`.

#### Smart Multicall

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth noting that Smart Multicall allow you to combine multiple calls of one node, not being able to combine calls of multiple nodes? For example you can call addr and text of vitalik.eth in one call, but not combining addr of vitalik.eth and nick.eth even though you have to encode node in each call (for the backward compatibility purpose)

Copy link
Copy Markdown
Member

@adraffy adraffy Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed. I was relying on the existing resolve() interpretation but that should probably be explicitly stated so it's clear.

We also could add this feature to the UR, as its extremely easy to write with the current design.

There also is the following functions not included in the standard interface:

  • requireResolver()
  • resolveWithGateways()
  • reverseWithGateways()
  • resolveWithResolver()

Also, somewhere, we could document the multicall-like reverse primary name lookup that each reverse resolver supports. That could be an appendix of ENSIP-19 or a separate ENSIP. It was mentioned in the comments of this ENSIP above.

@adraffy adraffy deleted the ensip/universal-resolution branch August 6, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants