-
Notifications
You must be signed in to change notification settings - Fork 461
Add caveat about CID determinism #2217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🚀 Build Preview on IPFS ready
|
- add "Why the hashes differ" section explaining root block hashing - document when CID hash equals file hash (raw codec, single block) - list factors affecting CID: chunk size, DAG layout, codec, version, hash - explain flexibility as feature with tradeoffs for different use cases - add DAG Explorer link alongside CID Inspector in quickstart - link quickstart caveat to detailed explanation in concepts - add public gateways link to public-utilities page
947b103 to
549ce0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. See changes i pushed to avoid duplicating content
If no concerns, feel free to merge, or I will merge next week.
|
|
||
| :::callout | ||
| 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. | ||
| **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. See [CIDs are not file hashes](../concepts/content-addressing.md#cids-are-not-file-hashes) for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ we already had "CIDs are not file hashes" content elsewhere, so adjusted this to link there + expanded there
|
|
||
| As we can see, the hash included in the CID does NOT match the hash of the input file `ubuntu-20.04.1-desktop-amd64.iso`. | ||
|
|
||
| ### Why the hashes differ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mishmosh @aschmahmann does this extra explainer sound good?
The main point I want to make here is that this is a feature, not a limitation. And at the end we mention community-provided profiles for cases where specific preset is required.
549ce0a to
9c8406c
Compare
Per discussion with @aschmahmann