8000 IPIP 0499: CID Profiles by mishmosh · Pull Request #499 · ipfs/specs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

IPIP 0499: CID Profiles #499

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

IPIP 0499: CID Profiles #499

wants to merge 5 commits into from

Conversation

mishmosh
Copy link
Contributor
@mishmosh mishmosh commented Apr 3 10000 , 2025

Currently, CIDs can be generated with a variety of settings and optimizations for chunking, DAG width, and more. This means the same file can yield multiple, different CIDs depending on which tools and settings are used, and it is not possible to reliably reproduce or verify the CID.

This proposal introduces profiles for IPFS CIDs. Profiles explicitly define CID version, hash algorithm, chunk size, DAG width, layout, and other parameters. They can be used to verify data across implementations, provide recommended settings depending on retrieval performance goals, and more.

@mishmosh mishmosh requested a review from a team as a code owner April 3, 2025 14:03
@mishmosh mishmosh changed the title Create ipip-0000.md: CID profiles IPIP 0499: CID Profiles Apr 3, 2025
3. Chunk size
4. DAG width
5. DAG layout
6. Required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a word missing here 😅

lidel added a commit to ipfs/kubo that referenced this pull request Apr 15, 2025
lets make the fanout match the max links from files
and rename profile to `-wide`

this will make it easier to discuss in ipfs/specs#499
lidel and others added 2 commits April 15, 2025 23:41
Co-authored-by: Bumblefudge <bumblefudge@learningproof.xyz>
Import.* config params for controlling DAG width were added in:
ipfs/kubo#10774
@lidel
Copy link
Member
lidel commented Apr 15, 2025

Thank you for kicking this off, and filling initial state.

I've incorporated specific "dag width" settings for File, Directory and HAMTDirectory nodes,
and updated the table to reflect state from ipfs/kubo#10774
and profiles that exist in Kubo master branch: legacy-cid-v0, test-cid-v1 and test-cid-v1-wide:

Next:

  • agree what "cid-2025" profile should look like
    • this will be new default in "Kubo v1.0"
    • we have test-cid-v1 and test-cid-v1-wide in Kubo as potential candidates
  • switch to PR from local branch (so we have build preview)
  • figure out how to render the information (currently the table is not supported by https://github.com/ipfs/spec-generator)


#### Empty directories

Decision if empty directories should be included is left out of scope.
Copy link
Member
@2color 2color May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidel I think we should include this, because the goal of this spec is to make UnixFS encoding deterministic when using the profile, and this stands in the way of this, potentially rendering this whole effort futile if not included.

I think the profile should dictate whether empty directories are included. This should also be configurable such that you can adjust to your own needs.

On the same note, we should probably also add mention of hidden files which are also excluded by Storacha, Kubo, and Helia by default.

| `HAMTDirectory` threshold | 256KiB (est) | 256KiB (est:links[name+cid]) | 1000 **links** | 256KiB | **1MiB** | not specified |
| DAG layout | balanced | balanced | balanced | balanced | balanced | not specified |
| Leaves | raw | raw | raw | raw | raw | not specified |
| Empty directories | allowed | allowed | disallowed | allowed | allowed | not specified |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about the default behaviour rather than whether empty dirs are allowed.


### User benefit

Reliable, deterministic CIDs allow independent verification of content across tools and ipmlementations.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Reliable, deterministic CIDs allow independent verification of content across tools and ipmlementations.
Reliable, deterministic CIDs allow independent verification of content across tools and implementations 8000 .

@SethDocherty
Copy link
SethDocherty commented Jun 30, 2025

@jaller94 / @mishmosh, I've noticed a discrepancy in CID generation using the new test-cid-v1-wide profile and the CIDs generated with Singularity. I made a note of this in the following post on discuss.ipfs.tech along with this post outlining how Singularity has set dag-width.

This could be an edge case, as I'd expect the same CID to be generated. If necessary, would either of you be able to point me to a repo within the ipfs umbrella to post this as an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0