-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
ERC: Ethereum Name Service #137
Comments
Is that intentionally limited to 256 bit hashes (Swarm)? IPFS hashes can be >256 bits, even the regular SHA256 hash is bigger, because of the Additionally, if only using a SHA256 of an IPFS resource, there's no way to distinguish it from a Swarm resource. |
Good point. I was merely seeking to replicate the existing namereg's 'content()' method, but this could be a good opportunity to rethink it. Any suggestions? |
Just throwing in a couple of ideas taken from BlockchainID to mitigate squatting, which mimic the behaviour of domain names:
|
This is a nice idea. It might also be really convenient to have named Ethereum addresses. These names could be anything, but a really simple idea might be to favor an email address format. If I want to send ETH to 'somebody@somewhere.com', I'd much rather type in their email address (which I have anyway), than a big Ethereum address. Of course, some verification protocol would be needed (confirm by sending an email to the actual email address with a confirmation code and getting a response), otherwise people could register each other's email addresses. But with that in place, voila! Paypal-on-Ethereum. A side benefit could be if the name doesn't resolve, the transfer doesn't get made, so you can't send to a bad address. It might also be nice to add pathnames in a URL format, so: And why not add parameters? So: And while we're dreaming, an address book in Mist for all this. :-) If the Ethereum Foundation ran this as a service, a named address could cost a little extra gas, which could go to development expenses. |
@jph108 email identifiers with path arguments conflates with HTTP Basic Auth (ie: |
Great idea. One of the issues we need to cover is to try to avoid multiple, competing deployments. So we don't end up with situations where I own the domain name in 0xContractA, and you own the same name in 0xContractB. In other words, multiple, competing deployments could undermine the usefulness of the system. Obviously, one of the big factors is price. So while I agree with @JustinDrake 's suggestion, the system should avoid requiring to pay an extra fee, because that would ignite a competition based on price. ("My Registrar Is Cheaper Than Yours!") So the key is either universal or complementary adoption (eg. multiple deployments would still work in the same "namespace"). That does indeed leave us with a potential squatting problem, though. |
@rabbit - Thanks, food for thought. You sent me to Wikipedia :-) It might be worth thinking in terms of having two schemes and not mixing them. The current https scheme for URLs is: In Ethereum's context, does it make sense to support My thought is a different additional scheme to support account & contract addresses only. You wouldn't put this kind of address in a location field in a browser. But if you could send ETH to I would love to be able to send ETH to [EDIT] removed the brackets around |
@JustinDrake I appreciate the need to mitigate squatting, but it would be nice if there was some namespace in ENS that did not require an annual fee. How about a registrar that requires a small deposit (say 1 ETH or some stable coin) and the owner can hold that name indefinitely. When the name is relinquished then the deposit is returned. The top-level name for such a registrar could be ".develop" (something a bit less prestigious than ".com" or ".org") to preserve demand for higher prestige names and mitigate squatting. |
@jpritikin The annual fee also solves the problem of permanent loss of a name. If I register a name but lose the private key, then the name is gone. |
@JustinDrake @jpritikin why not a combination of both ideas? The "fee" is actually a deposit which is automatically returned after a year, at which point another deposit needs to be made within a grace period or else the domain becomes available for anyone to claim. |
I'd very much like to discuss governance, but I'm also trying to separate concerns, so I'd like to keep this EIP entirely about the technical implementation. As written, it's governance-independent, so we can solve the problems independently - and, in fact, we can have multiple TLDs or 2LDs that each have different governance rules. Please do join the name-registry channel on Gitter if you'd like to talk about governance. :) Likewise, URI format for wallet URIs etc is out-of-scope except insofar as it impacts name resolution. Just like DNS, the 'name' part of the URI is handled by ENS and the rest is a layer on top. |
I've been thinking about the problem of how to handle resolvers that don't implement all resource types. Presently, Solidity doesn't guarantee the return value of a call to a contract that doesn't implement the function called, which is problematic. My suggestion is:
This allows the naive case - resolving a name and throwing if it doesn't exist - to proceed without any extra checks or overhead, while still permitting onchain resolvers to handle nonexistent names gracefully if they wish, at a small extra cost in gas. Capability names would be registered in this ERC; users could define 'x-' prefixed names for ad-hoc and pre-standardised extensions. Thoughts? |
As we've discussed on Gitter, I'm trying to figure out a way to support both Swarm and IPFS locations with Mango and the very same issue applies to ENS with the Given that content addressable networks can use different hashing algorithms (and in many cases the actual content is prefixed with a header, thus the hash isn't solely about the submitted content) it seem reasonable to make the One way is to have specific record types for each network, i.e. two record types: Alternatively the content could be a URL, including |
RFC6920 might be worth a read, as it provides an RFC-standardized way to encode hash names. |
@axic Thinking about this further, I think the best approach is probably to have separate record types for Swarm, IPFS, and any other systems as necessary. With that in mind, it's probably sensible to rename |
I have no insight at present about the best way to implement an Ethereum Name Service (ENS), so am agnostic on the particulars at present. I do think it is a very good idea and will benefit the Ethereum ecosphere to have such an ENS in place, and available in such a way as to reduce transaction cost for usage of such names by the broader community, where they might be used in such a way as to reduce systemic inefficiencies. In my view, long-term cybersquatting on unused names while adding no value is economically inefficient to the wider community, so very pleased to see serious thought on how best to implement a decentralized ENS that deals with several of the worst aspects of such squatting. Please keep up the good work. |
I've renamed |
Will it resolve to a single Swarm hash or a hash to a manifest and a path? |
Just to a single swarm manifest hash; much like DNS, I think links and redirects are out of scope for ENS. |
Can it be only a manifest hash or it coulf also return a content hash and it is up to the consumer of ENS to deal with that? |
Yes, it could be either - in a URL, the protocol will tell the browser how to interpret the hash. |
Do you mean the ENS protocol or Swarm? If ENS, does that mean having two types (swarmContent and swarmManifest)? |
I mean the 'protocol' part of the URL - eg, "http://", "bzz://", etc - browsers and other tools use this to determine what do do with the name and path components of the URL. Swarm provides two protocol values, one for raw files, and one for manifests. |
Oh, so your proposed |
No, it just returns the hash. The user enters "bzz://name.eth/foo/bar" or "bzzd://name.eth/"; the browser or other program does a |
Actually, I'm beginning to swing back the other way, in favor of naming it something generic like 'keccak' or 'sha256', because there are many other possible applications for storing a hash in ENS, such as attesting what the hash of your PGP keys is. IPFS support would then be possible either by adding methods for the other hash protocols IPFS supports, or by adding a 'CNAME' type entry that resolves to an address string that IPFS understands. |
To summarise our discussion, perhaps a good idea is to go with Important to note that |
Per discussion on Gitter, I've removed the content-hash resource type from the spec, so we can take our time on standardizing it independently of the main ENS spec. |
Additional thought: Should we add TTLs to the main registry contract? This would remove the need for individual record types to define them, and wouldn't entail much extra complexity. TTLs could default to 0, meaning no caching is allowed, and meaning there's no storage overhead or extra gas costs unless the user chooses to set a TTL. |
Can resolvers be just entries in lookup tables rather than contracts? The fundamental problem with contracts in this context is that they can return different values to different callers thereby defeating the purpose of a consensus naming system in which the same name resolves to the same set of records to everyone. As a practical problem, external contracts depending on conditions upon the content of certain records associated with certain names are rendered meaningless, if the resolver can return different records to different callers. |
There are lots of valuable use-cases for flexible resolvers; think of load balancing and geographically determined IP records in DNS, for instance, or a resolver that allows anyone to update its mappings if they can prove something about the correctness of the new value. At the same time, there's room for more strictured resolvers; for instance, one could deploy a general purpose resolver that simply does table lookups, or even one that's entirely immutable, and the caller can check if the resolver being used for a name is one that is known to enforce this limitation before resolving. You could even create a registrar that keeps ownership of the subdomains and only allows a given approved resolver to be provisioned on them. |
I was under the impression that mapping updates are the responsibility of the registrar, not the resolver; the resolver is the one that generates the mapping from information available to it. AFAIK, load balancing in DNS is typically done by multiple records corresponding to the same name. In general, AFAIK, zone files are not dynamically generated; they are clearly data and not code. But I might be wrong; I do not have extendisve experience with DNS. Having the caller check whether a certain resolver fulfills certain restrictions seems like a leaking abstraction to me. The end-user's concern is to have a certain name resolve to a certain address; with the current design of programmatic resolvers, it cannot be directly contracted. Is the additional flexibility of programmatic resolvers worth the loss of preventing what seems like the most common use case? |
The registrar's job is to update the registry's mapping from name hash to owner. So the process goes something like this:
After the initial deployment, the user only needs to do 4. for each update; there's no involvement from the registrar or registry any longer.
Basic nameservers operate like this, but many are more sophisticated; for instance, if you do an A lookup on google.com, the IP addresses that come back will depend on where in the world you are.
Well, then there's the alternative I mentioned - a registrar that restricts which resolvers may be deployed to subdomains you register through it.
Yes. The whole future-proofing of the system rests on the premise that resolvers can be improved and extended in the future; without it, we're stuck with whatever record types we can think up right now. With flexible resolver contracts, people can define new record types to resolve new resources in future, such as IPFS, IP addresses, cryptographic keys, and so forth, without requiring any changes to registrars or registry. What's the actual threat you're concerned about here? For the most part, my expectation is that any nefariousness an owner can conduct with name resolution, they can do just as easily with a table-driven resolver as they can with a more sophisticated one. |
The decision is to use |
So, after discussion with @chriseth around #165, I want to suggest a change to the resolver specification: Instead of supporting a
This is more general purpose than the current This would also require changing the semantics for records that are supported by the resolver but do not exist to return the default value (eg, 0 for addr) instead of throwing. Thoughts? |
After discussion with @chriseth and others on Gitter, I've updated the spec accordingly. I'll deploy a new resolver to Ropsten that supports both the old |
I've updated the wording of the spec slightly to explicitly prohibit ASCII characters that are invalid in names. I think it's probably worth providing a canonical set of test vectors for names, too - sample names and the byte strings they should convert to - in order for implementers to check their implementations against the standard. |
The sample test vectors in this post do not actually represent the Can we get some up-to-date test vectors here? There is one sample for EDIT: I'm unclear what was agreed on. The readhtedocs say |
I'm a little late to comment but would it make sense to define a "valid" name as the state at the chaintip-300 (or something similar). If you check the state of a recently updated name at the tip it could easily be forked off in a reorg. It's probably even more important to define a depth for light client purposes as they don't validate anything. |
@cpacia I think you make a good point. A good feature for clients to implement might be warning a user that a name has recently changed ownership or the address it resolves to. I'm also thinking now about the |
I've opened a PR for this: #629 |
@FlySwatter Sorry, I just saw your comment. Why do you think the test vectors don't match? They seem fine to me. @cpacia I think that's out of scope for this, since your concern applies to all contract interactions. @maurelian Good point; we should specify a maximum TTL clients should observe, and applications that exchange domains should warn users if the TTL is high. |
This comment was marked as spam.
This comment was marked as spam.
i want to integrate ens domain purchase functionality on my application |
Now at https://eips.ethereum.org/EIPS/eip-137
The text was updated successfully, but these errors were encountered: