Skip to content

Commit f2638c1

Browse files
authored
Add caveat about CID determinism
1 parent 065e4b7 commit f2638c1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/quickstart/pin-cli.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,22 @@ Each method will return a **CID** (Content Identifier) for your uploaded file. S
122122

123123
## CIDs explained
124124

125-
In IPFS, every file and directory is identified with a Content Identifier ([CID](../concepts/content-addressing.md)). The CID serves as the **permanent address** of the file and can be used by anyone to find it on the IPFS network.
125+
In IPFS, every file and directory is identified with a Content Identifier ([CID](../concepts/content-addressing.md)), a unique hash derived from the file's contents. The CID serves as the **permanent address** of the file and can be used by anyone to find it on any IPFS network or system.
126126

127-
When a file is first added to an IPFS node (like the image used in this guide), it's first transformed into a content-addressable representation in which the file is split into smaller chunks (if above ~1MB) which are linked together and hashed to produce the CID.
127+
When you add a file to IPFS, the system generates its CID by hashing the contents. Larger files (above ~1MB) are split into smaller chunks, linked together, and hashed.
128128

129-
For example, a CID might look like:
129+
The resulting CID might look like this:
130130

131131
```plaintext
132132
bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4
133133
```
134134

135-
You can now share the CID with anyone and they can fetch the file using IPFS.
135+
Once you have a CID, you can share it with anyone and they can fetch the file using IPFS.
136136

137-
To dive deeper into the anatomy of the CID, check out the [CID inspector](https://cid.ipfs.tech/#bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4).
137+
To see what's in the anatomy of a CID, check out the [CID inspector](https://cid.ipfs.tech/#bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4).
138138

139139
:::callout
140-
The transformation into a content-addressable representation is a local operation that doesn't require any network connectivity. Many CLI tools perform this transformation locally before uploading.
140+
**Important caveat:** Two identical files can produce different CIDs. The CID reflects the contents *and* how the file is processed: chunk size, DAG layout, hash algorithm, CID version, and other [UnixFS](https://specs.ipfs.tech/unixfs/) parameters. The same file processed with different parameters will produce different CIDs. Work is underway on [CID profiles](https://github.com/ipfs/specs/pull/499), which aims to address this by defining standard parameter sets to make CIDs reproducible and verifiable.
141141
:::
142142

143143
## Retrieving with a gateway
@@ -192,4 +192,4 @@ Possible next steps include:
192192
- [Storacha CLI documentation](https://docs.storacha.network/cli/)
193193
- [Pinata API documentation](https://docs.pinata.cloud/)
194194
- [Filebase S3 API guide](https://docs.filebase.com/api-documentation/s3-compatible-api)
195-
- [Filebase IPFS RPC API](https://docs.filebase.com/api-documentation/ipfs-rpc-api)
195+
- [Filebase IPFS RPC API](https://docs.filebase.com/api-documentation/ipfs-rpc-api)

0 commit comments

Comments
 (0)