Skip to content

Conversation

lidel
Copy link
Member

@lidel lidel commented Sep 9, 2025

This IPIP proposes documenting the 128-byte limit for identity cids in unixfs contexts, with rationale from community discussions and test fixtures.

References

@lidel lidel requested a review from a team as a code owner September 9, 2025 18:12
@lidel lidel force-pushed the doc/identity-cid-size-limit branch 2 times, most recently from ec58da9 to f494ecd Compare September 9, 2025 18:13
Copy link

github-actions bot commented Sep 9, 2025

🚀 Build Preview on IPFS ready

@lidel lidel force-pushed the doc/identity-cid-size-limit branch from f494ecd to 53b3198 Compare September 9, 2025 18:14
documents the 128-byte limit for identity cids in unixfs contexts,
with rationale from community discussions and test fixtures
@lidel lidel force-pushed the doc/identity-cid-size-limit branch from 53b3198 to 59dc0fa Compare September 9, 2025 18:15
lidel added a commit to ipfs/kubo that referenced this pull request Sep 9, 2025
* fix: enforce identity CID size limits

- validate --inline-limit against verifcid.MaxDigestSize
- add error when --hash=identity exceeds size limit
- add tests for identity CID overflow scenarios
- update help text to show maximum inline limit

This prevents creation of unbounded identity CIDs by enforcing
the 128-byte limit defined in ipfs/boxo#1018

Fixes #6011
IPIP: ipfs/specs#512
@github-project-automation github-project-automation bot moved this to Needs Triage in IPIP pipeline Sep 10, 2025
@lidel lidel moved this from Needs Triage to 🔍 Ready for Final Reviews in IPIP pipeline Sep 10, 2025
@lidel lidel changed the title IPIP-0512: Limit Identity CID Size to 128 Bytes in UnixFS Contexts IPIP-512: Limit Identity CID Size to 128 Bytes in UnixFS Contexts Sep 15, 2025
- Most users are unaffected as identity CIDs require explicit opt-in

Implementations upgrading to support this IPIP will need to:
1. Add validation to reject oversized identity CIDs when reading
Copy link
Member

Choose a reason for hiding this comment

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

if users do have identity cids, what is the recommendation for conversion to non-identity-cids if we block on read?

Copy link
Member Author

Choose a reason for hiding this comment

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

These details are left up to implementation, but as an example:

  • Kubo will error if you try to onboard data over limit with explicit --hash=identity
  • In more relaxed context where Kubo does things like autosharding HAMTS, we do similar autoswitch for identity. For eexample, MFS code in fix(verifcid): enforce size limit for identity CIDs boxo#1018 automatically switches from identity to raw or dag-pb once the limit is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔍 Ready for Final Reviews
Development

Successfully merging this pull request may close these issues.

3 participants