Skip to content

Commit 5b39572

Browse files
Dean EigenmannArachnid
Dean Eigenmann
authored andcommitted
Multiaddr support for ENS (#1577)
* Create eip-1577.md * Update eip-1577.md * Update eip-1577.md
1 parent a720c36 commit 5b39572

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

EIPS/eip-1577.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
eip: 1577
3+
title: Multiaddr support for ENS
4+
author: Dean Eigenmann <[email protected]>, Nick Johnson <[email protected]>
5+
type: Standards Track
6+
category: ERC
7+
status: Draft
8+
created: 2018-11-13
9+
discussion-to: https://github.com/ethereum/EIPs/pull/1577
10+
---
11+
12+
## Abstract
13+
14+
This EIP introduces the new `multiaddr` field for ENS resolvers, allowing for a better defined system of mapping names to network and content addresses. Additionally the `content` and `multihash` fields are deprecated.
15+
16+
## Motivation
17+
18+
Multiple applications including [Metamask](https://metamask.io/) and mobile wallets such as [Status](https://status.im) have begun resolving ENS names to content hosted on distributed systems such as [IPFS](https://ipfs.io/) and [Swarm](https://swarm-guide.readthedocs.io). Due to the various ways content can be stored and addressed, a standard is required so these applications know how to resolve names and that domain owners know how their content will be resolved.
19+
20+
The `multiaddr` field allows for easy specification of network and content addresses in ENS.
21+
22+
## Specification
23+
24+
The field `multiaddr` is introduced, which permits a wide range of protocols to be supported by ENS names. Resolvers supporting this field MUST return `true` when the `supportsInterface` function is called with argument `0x4cb7724c`.
25+
26+
The fields `content` and `multihash` are deprecated.
27+
28+
Addresses MUST be represented as a machine-readable [multiaddr](https://github.com/multiformats/multiaddr). The format is specified as follows:
29+
30+
```
31+
<protoCode uvarint><value []byte>
32+
```
33+
34+
When resolving a multiaddr, applications MUST use the protocol code to determine what type of address is encoded, and resolve the address appropriately for that protocol, if supported.
35+
36+
### Example
37+
38+
Text format:
39+
40+
```
41+
/p2p/QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4
42+
```
43+
44+
Binary format:
45+
46+
```
47+
a50322122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f
48+
```
49+
50+
### Fallback
51+
52+
In order to support names that have an IPFS or Swarm hash in their `content` field, a grace period MUST be implemented offering those name holders time to update their names. If a resolver does not support the `multiaddr` interface, it MUST be checked whether they support the `content` interface. If they do, the value of that field SHOULD be treated in a context dependent fashion and resolved. This condition MUST be enforced until December 31st, 2018.
53+
54+
### Implementation
55+
56+
To support `multiaddr`, a new resolver has been developed and can be found [here](https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol).
57+
58+
## Copyright
59+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)