From d9073a4ab7e850336877120c285f1cdc29ad5382 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 27 Jun 2022 18:57:46 +1000 Subject: [PATCH] unixfs: suggest, but do not strictly mandate unixfs<>dagpb The strict coupling poses some problems for IPLD implementations that: 1. do not retain codec information between the serialization and UnixFS (ADL) reification; and/or 2. do not have a mechanism to strictly mandate that UnixFS data be _only_ encoded in a particular codec. A mandate in the specification that strictly defines the layering on top of the codec makes it difficult to implement it as an ADL, which also presents difficulty for using tooling that builds on IPLD lens-style layering. Ref: https://github.com/ipfs/go-unixfsnode/pull/27 Ref: https://github.com/ipfs/specs/pull/271 Ref: https://github.com/ipld/go-car/pull/304 --- UNIXFS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UNIXFS.md b/UNIXFS.md index d2fddb3a..9e00d88f 100644 --- a/UNIXFS.md +++ b/UNIXFS.md @@ -78,7 +78,7 @@ This `Data` object is used for all non-leaf nodes in Unixfs. For files that are comprised of more than a single block, the 'Type' field will be set to 'File', the 'filesize' field will be set to the total number of bytes in the file (not the graph structure) represented by this node, and 'blocksizes' will contain a list of the filesizes of each child node. -This data is serialized and placed inside the 'Data' field of the outer merkledag protobuf, which also contains the actual links to the child nodes of this object. +This data is serialized and placed inside the 'Data' _Bytes_ node of the containing IPLD block, which also contains the actual links to the child nodes of this object in a 'Links' _List_ node. Typically this is encoded using the [DAG-PB](https://ipld.io/specs/codecs/dag-pb/spec/) codec. An implementations of this UnixFS specification may opt to strictly link DAG-PB to UnixFS for encoding and/or decoding as this is the originally intended layering of this format. For this reason, producers of UnixFS data that do not use DAG-PB as its codec should not expect other implementations of UnixFS to be able to interpret the data. For files comprised of a single block, the 'Type' field will be set to 'File', 'filesize' will be set to the total number of bytes in the file and the file data will be stored in the 'Data' field.