-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
ipfs add: parameter to control the width of created UnixFS DAG #10751
Copy link
Copy link
Closed
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upkind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featuretopic/UnixFSTopic UnixFSTopic UnixFStopic/filesTopic filesTopic filestopic/rpc-apiIssues related to Kubo RPC API at /api/v0Issues related to Kubo RPC API at /api/v0
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upkind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featuretopic/UnixFSTopic UnixFSTopic UnixFStopic/filesTopic filesTopic filestopic/rpc-apiIssues related to Kubo RPC API at /api/v0Issues related to Kubo RPC API at /api/v0
TLDR
There is no CLI / RPC / Config option to control max DAG width in Kubo when creating a UnixFS DAG.
Users who want to fully control the final CID need to be able to control this.
Details
and iiuc the implicit defaults are different for files and directories:
DefaultShardWidthhere is 256fanoutfrom Unixfs spec but has to be confirmed – see Caveats section belowDefaultLinksPerBlockhere is ~174ability to pass a static dag width for files could be exposed via
ipfs add --helpthe same way as--chunkerand--hashare, but it requires PR against boxo and kubo.Proposed design
dag-widthipfs add --dag-width=Nwith default being defined in config atImport.UnixFSDAGWidth, similar to Import.UnixFSChunker.legacy-cid-v0profile match current default (174?)test-cid-v1– perhaps 1024, matching Storachaboxoto expose ability to override mentionedDefault..Acceptance criteria / caveats
legacy-cid-v0profile should ensure current behavior does not changeImport.UnixFSDAGWidthandImport.UnixFSHAMTWidthjust to make this profile possible.fanoutofHAMTShardUnixFS node type. if 256 is a hard requirement, keep it. If not, makeImport.UnixFSHAMTWidthfollowImport.UnixFSDAGWidthunless both are set to different values by the userRelated work
ipfs addandImportoptions for controling UnixFS DAG Width #10774