Skip to content

test(unixfs): lock in CID profile behavior (IPIP-550) - #11439

Merged
lidel merged 10 commits into
masterfrom
ipip-550-pbnode-field-ordering
Sep 4, 2026
Merged

test(unixfs): lock in CID profile behavior (IPIP-550)#11439
lidel merged 10 commits into
masterfrom
ipip-550-pbnode-field-ordering

Conversation

@lidel

@lidel lidel commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Kubo decodes both PBNode field orders, but by accident: no test said so, and nothing pinned which order the profiles write. ipfs/specs#550 formalizes both sides.

Fix

Nothing changes by default; reading both orders keeps working as it always has.

lidel added 3 commits August 27, 2026 21:18
Opt-in Data-first PBNode field ordering via the new
unixfs-v1-2026 config profile, per IPIP-550. Defaults and the
preexisting unixfs-v0-2015 and unixfs-v1-2025 profiles are
unchanged and keep their CIDs.

- config: Import.UnixFSPBNodeFieldOrder (links-first default,
  data-first) and the unixfs-v1-2026 profile applying
  unixfs-v1-2025 settings plus data-first
- core/node: wires merkledag.DefaultPBNodeFieldOrder from config
- deps: boxo bump to the ipfs/boxo#1212 encoder commit
- test/cli: byte-exact fixtures from the IPIP-550 table; pinned
  CIDs for existing profiles unchanged

Refs ipfs/specs#550
Temporary pin to the ipfs/gateway-conformance#304 head so the
PBNode field ordering tests run against kubo. Switch back to a
tagged release once one ships.
v0.14.1 shipped the ipfs/gateway-conformance#304 tests, so the
moving v0.14 tag covers them again.
@lidel
lidel marked this pull request as ready for review August 27, 2026 20:04
@lidel
lidel requested a review from a team as a code owner August 27, 2026 20:04
@lidel
lidel marked this pull request as draft August 30, 2026 11:38
@lidel lidel added the status/blocked Unable to be worked further until needs are met label Aug 30, 2026
lidel added 2 commits August 30, 2026 21:51
State what the profile actually changes: every dag-pb node with both
Data and Links gets a new CID, files larger than one chunk included,
and data already in MFS is upgraded to the new order on first read
(plain `ipfs files ls` or `stat` included), a sharded root before its
child shards; the MFS root is re-encoded by any command that starts a
node.

- config/profile.go, docs/config.md: profile description and the
  unixfs-v1-2026 section
- docs/changelogs/v0.43.md: highlight leads with the need (readers get
  the HAMT layout before links) and the upgrade-on-first-use behavior
Pins the ipfs/boxo#1212 branch tip: data-first bytes derive from
dagpb.AppendEncode so link sorting is inherited, unknown field order
values return an error, and pinned end-to-end CIDs cover the profile.
@lidel
lidel marked this pull request as ready for review August 30, 2026 20:05
@lidel lidel removed the status/blocked Unable to be worked further until needs are met label Aug 30, 2026
@lidel lidel changed the title fix: opt-in dag-pb field order control (IPIP-550) test(unixfs): lock in CID profile behavior (IPIP-550) Sep 2, 2026
A dated successor profile invites unintentional adoption and a
de facto new CIDv1 default. Import.UnixFSPBNodeFieldOrder stays
as the documented low-level opt-in; unixfs-v0-2015 and
unixfs-v1-2025 now pin links-first explicitly.

- deps: boxo bump to the ipfs/boxo#1212 commit that drops
  UnixFS_v1_2026
- test/cli: field order exercised via the config knob, same
  IPIP-550 fixture bytes and CIDs

Refs ipfs/specs#550
…ld-ordering

# Conflicts:
#	docs/changelogs/v0.43.md
- tighter CID profile entry; MFS caveat now says re-encode
  happens on rewrite, not read
- deps: boxo pseudo-version with ipfs/boxo#1212,
  gateway-conformance v0.14.1
@lidel
lidel merged commit 9dbaab7 into master Sep 4, 2026
24 checks passed
@lidel
lidel deleted the ipip-550-pbnode-field-ordering branch September 4, 2026 15:26
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.

1 participant