Skip to content

Commit 37c662a

Browse files
committed
CR fixes
1 parent 74bc794 commit 37c662a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

merkledag/ipld.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ For example, suppose we have this _merkle-path_:
3333
```
3434
/ipfs/QmUmg7BZC1YP1ca66rRtWKxpXp77WgVHrnv263JtDuvs2k/a/b/c/d
3535
```
36+
3637
Where:
3738
- `ipfs` is a protocol namespace (to allow the computer to discern what to do)
3839
- `QmUmg7BZC1YP1ca66rRtWKxpXp77WgVHrnv263JtDuvs2k` is a cryptographic hash.
3940
- `a/b/c/d` is a path _traversal_, as in unix.
4041
- this link traverses five objects.
4142

43+
Suppose also that this path points to the object `{ "hello": "world" }`.
44+
4245
Resolving it involves looking up each object and attaining a hash value, then traversing to the next.
4346

4447
```
@@ -82,7 +85,7 @@ Some Constraints:
8285
- Given the wide success of JSON, a huge number of systems present JSON interfaces. IPLD MUST be able to import and export to JSON trivially.
8386
- The JSON data model is also very simple and easy to use. IPLD MUST be just as easy to use.
8487
- Definining new datastructures MUST be trivially easy. It should not be cumbersome -- or require much knowledge -- to experiment with new definitions on top of IPLD.
85-
- IPLD MUST be compatible with RDF and the proper W3C Semantic Web / Linked Data standards. We can achieve this easily through JSON-LD.
88+
- Since IPLD is based on the JSON data model, it is fully compatible with RDF and Linked Data standards through JSON-LD.
8689
- IPLD Serialized Formats (on disk and on the wire) MUST be fast and space efficient. (should not use JSON as the storage format, and instead use CBOR or similar formats)
8790
- IPLD cryptographic hashes MUST be upgradeable (use [multihash](https://github.com/jbenet/multihash))
8891

@@ -162,17 +165,12 @@ Suppose this hashes to the multihash value `QmBBB...BBB`. This node links the _s
162165

163166
> ipld cat --json QmBBB...BBB/author
164167
{
165-
"title": "As We May Think",
166-
"author": {
167-
"mlink": "QmAAA...AAA" // links to the node above.
168-
}
168+
"name": "Vannevar Bush"
169169
}
170170

171171
> ipld cat --yml QmBBB...BBB/author
172172
---
173-
title: As We May Think
174-
author:
175-
mlink: QmAAA...AAA
173+
name: "Vannevar Bush"
176174

177175
> ipld cat --json QmBBB...BBB/author/name
178176
"Vannevar Bush"
@@ -302,11 +300,11 @@ On the subject of integers, there exist a variety of formats which represent int
302300

303301
## Serialized Data Formats
304302

305-
IPLD supports a variety of serialized data formats trough [multicodec](https://github.com/jbenet/multicodec). These can be used however is idiomatic to the format, for example in `CBOR`, we can use `CBOR` type tags to represent the merkle-link, and avoid writing out the full string key `mlink`. Users are encouraged to use the formats to their fullest, and to store and transmit IPLD data in whatever format makes the most sense. The only requirement **is that there MUST be a well-defined one-to-one mapping with the IPLD Canonical format.** This is so that data can be transformed from one format to another, and back, without changing its meaning nor its cryptographic hashes.
303+
IPLD supports a variety of serialized data formats through [multicodec](https://github.com/jbenet/multicodec). These can be used however is idiomatic to the format, for example in `CBOR`, we can use `CBOR` type tags to represent the merkle-link, and avoid writing out the full string key `mlink`. Users are encouraged to use the formats to their fullest, and to store and transmit IPLD data in whatever format makes the most sense. The only requirement **is that there MUST be a well-defined one-to-one mapping with the IPLD Canonical format.** This is so that data can be transformed from one format to another, and back, without changing its meaning nor its cryptographic hashes.
306304

307305
### Canonical Format
308306

309-
In order to preserve merkle-linking's power, we muste ensure that there is a single **_canonical_** serialized representation of an IPLD document. This ensures that applications arrive at the same cryptographic hashes. It should be noted --though-- that this is a system-wide parameter. Future systems might change it to evolve representations. However we estimate this would need to be done no more than once per decade.
307+
In order to preserve merkle-linking's power, we must ensure that there is a single **_canonical_** serialized representation of an IPLD document. This ensures that applications arrive at the same cryptographic hashes. It should be noted --though-- that this is a system-wide parameter. Future systems might change it to evolve representations. However we estimate this would need to be done no more than once per decade.
310308

311309
**The IPLD Canonical format is _canonicalized CBOR_.**
312310

0 commit comments

Comments
 (0)