Skip to content
Open
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8842176
Create ipip-0000.md
mishmosh Apr 3, 2025
4ba68f0
Update and rename ipip-0000.md to ipip-0499.md
mishmosh Apr 3, 2025
6cc64cb
add extra attributes proposed in review
lidel Apr 15, 2025
d8b8389
incorporate kubo#10774
lidel Apr 15, 2025
600d1fc
Merge branch 'main' into patch-1
bumblefudge May 5, 2025
595588c
Update src/ipips/ipip-0499.md
2color Aug 12, 2025
41f9b86
add daniel as editor
2color Aug 12, 2025
229988f
edit summary and motivation
2color Aug 12, 2025
f37e610
edit summary
2color Aug 12, 2025
7a12f0a
edit parameters and design
2color Aug 12, 2025
ff69e56
edit user benefit and compatibility
2color Aug 12, 2025
09baf68
refine parameters and introduce a named profile
2color Aug 12, 2025
cffade8
Apply suggestions from code review
2color Aug 20, 2025
0402c84
edit based on hector's feedback
2color Aug 20, 2025
ec07e30
Apply suggestions from code review
2color Aug 20, 2025
f454912
add multibase encoding
2color Aug 20, 2025
9c621ba
address feedback from rvagg
2color Aug 20, 2025
c109c1a
Update ipip-0499.md
mishmosh Nov 15, 2025
383f9e3
Update src/ipips/ipip-0499.md
mishmosh Nov 20, 2025
e564968
Update src/ipips/ipip-0499.md
mishmosh Nov 20, 2025
bbd547f
Update src/ipips/ipip-0499.md
lidel Nov 20, 2025
70514b9
fix typo (the the)
mishmosh Nov 21, 2025
89c9c62
Merge branch 'main' into patch-1
lidel Dec 12, 2025
92352d7
feat(ipip-0499): add chunking algorithm and align profile tables
lidel Dec 12, 2025
9d0d415
fix(ipip-0499): correct kubo legacy profile
lidel Dec 12, 2025
a3dc7e2
fix(ipip-0499): document legacy profile filtering behavior
lidel Dec 13, 2025
94a1b79
fix(ipip-0499): note that legacy table includes non-UnixFS implementa…
lidel Dec 13, 2025
7a8d6ab
feat(ipip-0499): add implementation versions to legacy profiles table
lidel Dec 13, 2025
a3044d6
fix(ipip-0499): update HAMTDirectory threshold and clean up parameters
lidel Dec 13, 2025
5b19f2b
feat(ipip-0499): document symlink handling in profiles
lidel Dec 13, 2025
3a092a4
fix(ipip-0499): clarify HAMTDirectory threshold calculation methods
lidel Dec 13, 2025
123be3d
fix(ipip-0499): update metadata and add contributors
lidel Dec 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions src/ipips/ipip-0499.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
# IPIP number should match its pull request number. After you open a PR,
# please update title and update the filename to `ipip0000`.
title: "IPIP-0499: CID Profiles"
date: 2025-04-03
ipip: proposal
editors:
- name: Michelle Lee
relatedIssues:
- n/a
order: 0000
tags: ['ipips']
---

## Summary

<!--One paragraph explanation of the IPIP.-->
This proposal introduces profiles for IPFS CIDs. Profiles explicitly define CID version, hash algorithm, chunk size, DAG width, layout, and other parameters.

## Motivation

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. Profiles offer With profiles, following the same profile will produce identical CIDs for identical content, whic makes verification regardless of implementation.

## Detailed design

We introduce a profile naming system,

Each profile must specify the following characteristics:

1. CID version (CIDv0 or CIDv1)
2. Hash algorithm
3. Chunk size
4. DAG width
5. DAG layout
6. Required

Additional profiles can be added at a future date. Profile names may be chosen from the names of any botanical tree with compound leaves.

| | Helia default | Kubo default | Storacha default | "test-cid-v1" profile | DASL |
|-------------|---------------|-----------------------------|------------------|-----------------------|---------------|
| CID version | CIDv1 | CIDv1 | CIDv1 | CIDv1 | CIDv1 |
| Hash Algo | sha-256 | sha-256 | sha-256 | sha-256 | sha-256 |
| Chunk size | 1MiB | 256KiB | 1MiB | 1MiB | not specified |
| DAG width | 1024 | 174 (but it's complicated*) | 1024 | 174 | not specified |
| DAG layout | balanced | balanced | balanced | balanced | not specified |



This would be specified as a table in (forthcoming UnixFS spec).



## Design rationale

The profile names are chosen to be easy to pronounce.

Here is a summary table of current defaults, thanks to input & clarifications from @2color @achingbrain @lidel:

| | Helia default | Kubo default | Storacha default | "test-cid-v1" profile | DASL |
|-------------|---------------|-----------------------------|------------------|-----------------------|---------------|
| CID version | CIDv1 | CIDv1 | CIDv1 | CIDv1 | CIDv1 |
| Hash Algo | sha-256 | sha-256 | sha-256 | sha-256 | sha-256 |
| Chunk size | 1MiB | 256KiB | 1MiB | 1MiB | not specified |
| DAG width | 1024 | 174 (but it's complicated*) | 1024 | 174 | not specified |
| DAG layout | balanced | balanced | balanced | balanced | not specified |

* Kubo has 2 different default DAG widths:
* For HAMT-sharded directories, the `DefaultShardWidth` [here](https://github.com/ipfs/boxo/blob/f1d5312e3be45d151bb9c8f11c9283820687bea3/ipld/unixfs/io/directory.go#L30) is 256.
* For files, `DefaultLinksPerBlock` [here](https://github.com/ipfs/boxo/blob/v0.29.0/ipld/unixfs/importer/helpers/helpers.go#L30) is ~174

See related discussion at https://discuss.ipfs.tech/t/should-we-profile-cids/18507/

### User benefit

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

### Compatibility

Implementations will need to (1) make CID generation settings configurable and (2) support user setting of profiles.

Kubo currently has no CLI / RPC / Config option to control DAG width in Kubo. https://github.com/ipfs/kubo/issues/10751 is the starting point to add that ability.

### Security

TODO

### Alternatives

Another approach could be to name profiles based on the key UnixFS/CID parameters, e.g. v1-sha256-balanced-1mib-1024w-raw. This is longer and more convoluted.

## Test fixtures
Copy link
Member

Choose a reason for hiding this comment

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

Just noting this is (imo) a blocker.

We did not merge UnixFS spec until we had sensible set of fixtures that people could use as reference.

The spec may be incomplete, but a fixture will let people reverse-engineer any details, and then PR improvement to spec.

Without fixtures for each UnixFS node type, we risk unknown unknown silently impacting final CID (e.g. because we did not know that someone may decide to place leaves one level sooner as "optimization" and someone else always at bottom, as "formal consistency")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tracking this in ipfs/kubo#11071

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!


TODO

List relevant CIDs. Describe how implementations can use them to determine
specification compliance. This section can be skipped if IPIP does not deal
with the way IPFS handles content-addressed data, or the modified specification
file already includes this information.

### Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Loading