You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the spec read consistently end to end: every grammar block now uses
one vocabulary for the CID fields, and the narrative prose is trimmed for
clarity.
- unify binary grammar tokens across all sections
- replace the inaccurate "ipld entries" note with a worked hex example
- copyedit prose for concision and active voice
- drop the "Variant - " heading prefix
- repoint the IPIP template link to ipip-template.md
<cidv1> ::= <`0x01`, the code for `CIDv1`><another code from `ipld` entries in multicodec table that signals content type of data being addressed><multihash of addressed data>
# 01: cidv1 | 55: raw | 12 20: sha2-256, 32 bytes | 2cf2...: sha2-256 digest of "hello"
73
76
```
74
77
75
78
Where
@@ -78,15 +81,15 @@ Where
78
81
-`<multicodec-content-type>` is a [multicodec](https://github.com/multiformats/multicodec) code representing the content type or format of the data being addressed.
79
82
-`<multihash-content-address>` is a [multihash](https://github.com/multiformats/multihash) value, which uses a registry of hash function abbreviations to prefix a cryptographic hash of the content being addressed, thus making it self-describing.
80
83
81
-
## Variant - Stringified Form
84
+
## Stringified Form
82
85
83
-
Since CIDs have many applications outside of binary-only contexts, a given CID may need to be base-encoded for different consumers or transports.
86
+
Since CIDs have many applications outside binary-only contexts, a CID may need to be base-encoded for different consumers or transports.
84
87
In such applications, CIDs are expressed as a Unicode *string* with a [multibase](https://github.com/multiformats/multibase) prefix.
85
-
The multibase prefix identifies the string encoding but is not part of the CID itself -- the same binary CID may be represented in different bases depending on context and needs such as string length and case-sensitivity.
88
+
The multibase prefix identifies the string encoding but is not part of the CID itself; the same binary CID can appear in different bases depending on context and needs such as string length and case-sensitivity.
@@ -97,9 +100,9 @@ IPFS implementations SHOULD support at minimum `base58btc` (`z`), `base32` (`b`)
97
100
98
101
## Design Considerations
99
102
100
-
CIDs design takes into account many difficult tradeoffs encountered while building [IPFS](https://ipfs.tech). These are mostly coming from the multiformats project.
103
+
The design of CIDs takes into account many difficult tradeoffs encountered while building [IPFS](https://ipfs.tech). Most of these come from the multiformats project.
101
104
102
-
- Compactness: CIDs are binary in nature to ensure these are as compact as possible, as they're meant to be part of longer path identifiers or URIs.
105
+
- Compactness: CIDs are binary to keep them as compact as possible, since they're meant to be part of longer path identifiers or URIs.
103
106
- Transport friendliness (or "copy-pastability"): CIDs are encoded with multibase to allow choosing the best base for transporting. For example, CIDs can be encoded into base58btc to yield shorter and easily-copy-pastable hashes.
104
107
- Versatility: CIDs are meant to be able to represent values of any format with any cryptographic hash.
105
108
- Avoid Lock-in: CIDs prevent lock-in to old, potentially-outdated decisions.
@@ -209,7 +212,7 @@ The history of this format is documented at: https://github.com/ipfs/specs/issue
209
212
> **Q. Is the use of multicodec similar to file extensions?**
210
213
211
214
Yes. Like a file extension, the multicodec in a CID tells consumers how to interpret the bytes.
212
-
And just like file extensions, most users will never change it, but it is technically possible to swap the codec to change how the same bytes behind a CID are parsed.
215
+
And just like file extensions, most users will never change it, but you can swap the codec to change how the same bytes are parsed.
213
216
214
217
> **Q. What formats (multicodec codes) does CID support?**
215
218
@@ -220,9 +223,9 @@ In practice, IPFS primarily uses [`dag-pb`](https://web.archive.org/web/20260305
220
223
221
224
CIDs are a well established standard.
222
225
IPFS uses CIDs for content-addressing and IPNS.
223
-
Making changes to such key protocol requires a careful review which should include feedback from implementers and stakeholders across ecosystem.
226
+
Changing such a core protocol requires careful review, including feedback from implementers and stakeholders across the ecosystem.
224
227
225
-
Due to this, changes to CID specification MUST be submitted as an improvement proposal to [ipfs/specs](https://github.com/ipfs/specs/tree/main/IPIP) repository (PR with [IPIP document](https://github.com/ipfs/specs/blob/main/IPIP/0000-template.md)), and follow the IPIP process described there.
228
+
For this reason, changes to the CID specification MUST be submitted as an improvement proposal to [ipfs/specs](https://github.com/ipfs/specs/tree/main/IPIP) repository (PR with [IPIP document](https://github.com/ipfs/specs/blob/main/ipip-template.md)), and follow the IPIP process described there.
0 commit comments