Context
There has been a proliferation of cross-chain subdomain services and the reliance on CCIP-read to achieve resolution. Today, when a resolution request fails to return data, it isn’t clear whether this is due to lack of resolver support, lack of name data or some other error.
@raffy has attempted to reconcile this by way of a draft ENSIP which uses new custom errors emitted by resolvers for each failure class. However, this approach requires redeploying contracts to include these new errors AND relies on a new error code type to be returned in the callback to the originating L1 contract for parsing and handling.
Although this solution would work, the added complexity and operational burden would likely mean slow adoption by existing subdomain services and lengthy migration periods where users are still relying on outdated resolvers.
Error types
There are two explicit resolver errors suggested in the draft ENSIP for custom ESNIP-10 errors.
- UnsupportedResolverProfile for signaling that a resolver does not support a specific resolver profile.
- UnreachableName for signaling that the name does not exist, cannot be parsed, or is otherwise incorrectly encoded.
Alternative Approach
There is an ABI Resolver profile included in a majority of existing public resolvers which allows a named contract to store its abi data. By naming resolver contracts and then associating the resolver ABI data with the resolver’s name, clients and gateways have an avenue for checking the functionalities of a resolver before querying it. This completely solves the class of errors that precipitated the need for UnsupportedResolverProfile. By eliminating one of the two error classes, we can then implicitly throw UnreachableName if the queried resolver does support the expected profile.
The implementation of this in practice requires a few changes:
- That resolvers are consistently named and assigned ABI data
- That the generic gateway and clients that do not use the Universal Resolver are enabled to query for this ABI data and then ingest it to determine whether an UnsupportedResolverProfile error should be thrown
- That the UniversalResolver is upgraded to consume this error from the Gateway/Client
Seeking feedback
- Does this need to be an ENSIP requiring that resolvers are assigned names + abi resolver data?
- Am I missing any high level implementation cases?
- Any reasons to avoid this solution?