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

DNS resolver profile for ENS #1185

Merged
merged 7 commits into from
Oct 19, 2018
Merged

DNS resolver profile for ENS #1185

merged 7 commits into from
Oct 19, 2018

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented Jun 26, 2018

Added an EIP that defines the DNS resolver profile for ENS resolvers.

EIPS/eip-1185.md Show resolved Hide resolved
EIPS/eip-1185.md Outdated

Traditionally, DNS is a zone-based system in that all of the records for a zone are kept together in the same file. This has the benefit of simplicity and atomicity of zone updates, but when transposed to ENS can result in significant gas costs for simple changes. As a result, the resolver provides the ability to store either zone-based or record-based DNS information for a given domain, each with their own set of functions for managing the information.

The primary reason that a user might choose to use the zone-based functions is if the zone uses information that spans multiple records and requires strict ordering (for example DNSSEC with NSSEC/NSSEC3 records), so an unordered record-based storage system is not possible. If this is not a consideration then record-based storage is generally cheaper and more flexible.
Copy link
Contributor

Choose a reason for hiding this comment

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

DNSSEC doesn't require this; as long as you can fetch the relevant records, they can be sorted by the verifier.

EIPS/eip-1185.md Outdated

The resolver profile to support DNS on ENS builds on the standalone resolver as defined in #137.

Traditionally, DNS is a zone-based system in that all of the records for a zone are kept together in the same file. This has the benefit of simplicity and atomicity of zone updates, but when transposed to ENS can result in significant gas costs for simple changes. As a result, the resolver provides the ability to store either zone-based or record-based DNS information for a given domain, each with their own set of functions for managing the information.
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think offering both options is a mistake; it complicates use for everyone.

EIPS/eip-1185.md Outdated Show resolved Hide resolved
EIPS/eip-1185.md Outdated

The function returns all matching records in DNS wire format. If there are no records present the function will return nothing.

### hasDNSRecords(bytes32 node, bytes32 name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be simpler to just call dnsRecord to check if it returns an empty string?

EIPS/eip-1185.md Outdated
- node: the nodehash of the fully-qualified domain in ENS for which to set the records. Node hashes are defined in #137
- data: 1 or more DNS records in DNS wire format.

### dnsRecord(bytes32 node, bytes32 name, uint16 resource)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be called dnsRecords? It also needs to specify a return type.

EIPS/eip-1185.md Outdated

The function returns the entire zone in DNS wire format. If there is no zone present the function will return nothing.

### clearDNSZone(bytes32 node)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just call setDNSZone with an empty string?

EIPS/eip-1185.md Show resolved Hide resolved
EIPS/eip-1185.md Outdated Show resolved Hide resolved
EIPS/eip-1185.md Outdated Show resolved Hide resolved

### setDNSRecords(bytes32 node, bytes data)

`setDNSRecords()` sets, updates or clears 1 or more DNS records for a given node. It has function signature `0x0af179d7`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this say "a DNS RRset", rather than "1 or more DNS records"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The data can contain multiple RRsets; we could change this to "1 or more DNS RRsets".

EIPS/eip-1185.md Outdated Show resolved Hide resolved
EIPS/eip-1185.md Show resolved Hide resolved

The DNS resolver interface consists of two functions to set DNS information and two functions to query DNS information.

### setDNSRecords(bytes32 node, bytes data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not have this take the name and RRType as well? Then the resolver doesn't have the overhead of having to parse records etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows setDNSRecords() to take multiple RRsets in a single update.

EIPS/eip-1185.md Show resolved Hide resolved
@Arachnid Arachnid merged commit 379438b into ethereum:master Oct 19, 2018
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.

2 participants