-
Notifications
You must be signed in to change notification settings - Fork 15
ENSIP-X: Custom Errors for ENSIP-10 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Contrary to the original design, I made it clear in the spec that Explicit ordering is not required but it seems like a nice property to have as it enables the ERC-165-like behavior. However, this ordering causes my hacky idea above about It seems reasonable to assume that almost all resolvers implement Possibly, the proposal should state that It's unclear if we should have an explicit resolver profile for existence checking. Since zero resolvers implement this today, probably not. But if so, this would be the right time to define one. |
A few thoughts:
Whilst theres obviously value in more clearly surfacing this information would a separate function definition similar to 165 not be more appropriate rather than potentially reducing implementor flexibility in their |
You are correct that There is also a desire to expose some other resolver behaviors via The main objective of this ENSIP is to clarify the expected behavior so frontends can disambiguate null results (name exists, value doesn't) from results that don't exist, ie. a resolver should not return null when they don't understand a request or when the results are null because name doesn't exist (isn't registered). As I mentioned above, it might be better to do this explicitly via a resolver profile, but that's also a big change, whereas this proposal just says these cases should be (known) reverts and not null responses. Any revert is better than no revert:
It might be too ambitious to say this enables existence checks if |
|
||
## Abstract | ||
|
||
This standard establishes [custom errors](https://docs.soliditylang.org/en/latest/contracts.html#custom-errors) for [ENSIP-10](./10.md) `resolve()` to improve the resolution experience and disambiguate the following situations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This standard establishes [custom errors](https://docs.soliditylang.org/en/latest/contracts.html#custom-errors) for [ENSIP-10](./10.md) `resolve()` to improve the resolution experience and disambiguate the following situations: | |
This standard establishes [custom errors](https://docs.soliditylang.org/en/latest/contracts.html#custom-errors) for [ENSIP-10](https://docs.ens.domains/ensip/10) `resolve()` to improve the resolution experience and disambiguate the following situations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative links break on the ENSIP docs site.
This proposal seems fine for resolvers and name services that all exist entirely on L1. However, I'm a bit confused about the implementation described as it applies to a CCIP-read enabled resolver. An L1 Resolver which implements ENSIP-10 and enables CCIP-Read often has no context about what exists off chain. For example:
As far as I can tell, the only reasonable way that the ENSIP-10 resolver contract on L1 can glean the information necessary to throw this ENSIP's errors is to:
Number two above is unrealistic and requires too much overhead to expect adoption. One is interesting but, given that the response relies on CCIP-Read in the first place, it makes more sense to me that this ENSIP's errors are instead thrown by the offchain gateway. For example, status codes on the CCIP-read request could instead convey the errors described in this proposal. How do you expect that this ENSIP plays with CCIP-Read enabled resolvers? |
The main objective is just to separate errors from nulls. Correct, the offchain implementation of
As stated in Backwards Compatibility, the gateway itself can also revert any error (or ideally, these new errors since no contract needs modified) if the profile isn't supported or the name doesn't exist. I think the only place where I would raise an issue would be an offchain gateway failing for a null record of a name that exists for a profile it supports. General purpose gateways (like Unruggable) cannot revert at the gateway-level with a specific resolution error as they're general crosschain state fetchers. Even in the situation where the request "failed", the gateway has to prove to the resolver that it has failed, which is ultimately a successful gateway request, that results in a revert. This ENSIP as-is is kinda stuck as I'm not sure if |
Co-authored-by: katzman <[email protected]>
Proposal
Original design: