From 02c1032eed02a23f111cd0fdd8de8ebdacf2bb20 Mon Sep 17 00:00:00 2001 From: Dean Eigenmann Date: Wed, 9 Jan 2019 23:27:48 +0100 Subject: [PATCH 1/4] Update eip-1577.md --- EIPS/eip-1577.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/EIPS/eip-1577.md b/EIPS/eip-1577.md index 4a7dafe51ce121..26641af9782291 100644 --- a/EIPS/eip-1577.md +++ b/EIPS/eip-1577.md @@ -30,12 +30,12 @@ The value returned by `contenthash` MUST be represented as a machine-readable [m ``` -protoCodes and their meanings are specified in the [ensdomains/multicodec](https://github.com/ensdomains/multicodec) repository. +protoCodes and their meanings are specified in the [multiformats/multicodec](https://github.com/multiformats/multicodec) repository. -The encoding of the value depends on the content type specified by the protoCode; for instance, types in the range 0x00-0xf0 are encoded using [multihash](https://github.com/multiformats/multihash), meaning their value is formatted as follows: +The encoding of the value depends on the content type specified by the protoCode. Values with protocodes of 0xee and 0xef represent IPFS and Swarm content; these values are encoded as [CIDs](https://github.com/multiformats/cid) without a base prefix, meaning their value is formatted as follows: ``` - + ``` When resolving a `contenthash`, applications MUST use the protocol code to determine what type of address is encoded, and resolve the address appropriately for that protocol, if supported. @@ -43,8 +43,11 @@ When resolving a `contenthash`, applications MUST use the protocol code to deter ### Example Input data: + ``` -storage system: IPFS (0x01) +storage system: IPFS (0xee) +CID version: 1 (0x01) +content type: dag-pb (0x70) hash function: sha2-256 (0x12) hash length: 32 bytes (0x20) hash: 29f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f @@ -53,13 +56,13 @@ hash: 29f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f Binary format: ``` -0x01122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f +0xee0170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f ``` Text format: ``` -/ipfs/QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4 +TBD ``` ### Fallback From dd328931cf6b68c1710c3d92d205dc2022314c6b Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Fri, 11 Jan 2019 08:55:49 +1300 Subject: [PATCH 2/4] Update eip-1577.md --- EIPS/eip-1577.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1577.md b/EIPS/eip-1577.md index 26641af9782291..5fd13f38fc1e08 100644 --- a/EIPS/eip-1577.md +++ b/EIPS/eip-1577.md @@ -62,7 +62,7 @@ Binary format: Text format: ``` -TBD +ipfs://QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4 ``` ### Fallback From 0a729e7ecd34dfc8c3c516c02735e8656fb2fd99 Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Fri, 11 Jan 2019 10:59:18 +1300 Subject: [PATCH 3/4] Update eip-1577.md --- EIPS/eip-1577.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1577.md b/EIPS/eip-1577.md index 5fd13f38fc1e08..be8c5f691425be 100644 --- a/EIPS/eip-1577.md +++ b/EIPS/eip-1577.md @@ -56,7 +56,7 @@ hash: 29f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f Binary format: ``` -0xee0170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f +0xee010170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f ``` Text format: From e13c8386b98361a16ab7d42e63bdc1aa57f35a79 Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Fri, 11 Jan 2019 11:00:05 +1300 Subject: [PATCH 4/4] Update eip-1577.md --- EIPS/eip-1577.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1577.md b/EIPS/eip-1577.md index be8c5f691425be..d2358549e2d740 100644 --- a/EIPS/eip-1577.md +++ b/EIPS/eip-1577.md @@ -32,7 +32,7 @@ The value returned by `contenthash` MUST be represented as a machine-readable [m protoCodes and their meanings are specified in the [multiformats/multicodec](https://github.com/multiformats/multicodec) repository. -The encoding of the value depends on the content type specified by the protoCode. Values with protocodes of 0xee and 0xef represent IPFS and Swarm content; these values are encoded as [CIDs](https://github.com/multiformats/cid) without a base prefix, meaning their value is formatted as follows: +The encoding of the value depends on the content type specified by the protoCode. Values with protocodes of 0xee and 0xef represent IPFS and Swarm content; these values are encoded as v1 [CIDs](https://github.com/multiformats/cid) without a base prefix, meaning their value is formatted as follows: ```