Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Canonical name resolver #161

wants to merge 1 commit into from

Conversation

jefflau
Copy link
Member

@jefflau jefflau commented Sep 25, 2023

Adds a standard for a resolver that allows DNS CNAME-like functionality to resolvers.


### 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.
Copy link
Member

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);
Copy link
Member

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){
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants