-
Notifications
You must be signed in to change notification settings - Fork 215
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
Canonical name resolver #161
base: master
Are you sure you want to change the base?
Conversation
|
||
### Specification | ||
|
||
If a cname is found on a name, all records that are unset will be expected to proxy through the specified cname's records. Records that are already set on the resolver will ignore the cname. |
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 should clarify that it's the resolver's reponsibility to implement CNAME functionality, not the client.
```solidity | ||
interface ICnameResolver { | ||
event CNameChanged(bytes32 indexed node, string name); | ||
function cname(bytes32 node) external view returns (string memory); |
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.
I think we need to make a decision here: Either cname takes a node and doesn't implement CCIP-Read and wildcards (so only onchain names can be CNAMEd to), or it takes a DNS-encoded name and does implement CCIP-Read and wildcards. The latter is the more future-proof option, but this implementation requirement needs to be called out.
function addr(bytes32 node, uint256 coinType){ | ||
bytes memory currentAddr = versionable_addresses[recordVersions[node]][node][coinType]; | ||
|
||
if(currentAddr.length == 0 && cname.length != 0){ |
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 will have to be a lot more complex to support CCIP Read and wildcards.
Perhaps we should just implement a canonical CNAME resolver mixin instead of writing a spec?
Adds a standard for a resolver that allows DNS CNAME-like functionality to resolvers.