8000 ipfs add: parameter to control the width of created UnixFS DAG · Issue #10751 · ipfs/kubo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ipfs add: parameter to control the width of created UnixFS DAG #10751
Closed
@lidel

Description

@lidel

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:

ability to pass a static dag width for files could be exposed via ipfs add --help the same way as --chunker and --hash are, but it requires PR against boxo and kubo.

Proposed design

  • Add CLI/RPC parameter dag-width ipfs add --dag-width=N with default being defined in config at Import.UnixFSDAGWidth, similar to Import.UnixFSChunker.
  • Make default in legacy-cid-v0 profile match current default (174?)
  • Consider going with higher value in test-cid-v1 – perhaps 1024, matching Storacha
  • This very likely requires changes to boxo to expose ability to override mentioned Default..

Acceptance criteria / caveats

  • keep current defaults if possible.
  • setting legacy-cid-v0 profile should ensure current behavior does not change
    • we may need separate Import.UnixFSDAGWidth and Import.UnixFSHAMTWidth just to make this profile possible.
  • confirm HAMT-directories continue to work with legacy software
    • confirm custom dag width is compatible with HAMT-directories, namely, what is the relation between dag width parameter here and the fanout of HAMTShard UnixFS node type. if 256 is a hard requirement, keep it. If not, make Import.UnixFSHAMTWidth follow Import.UnixFSDAGWidth unless both are set to different values by the user

Related work

Metadata

Metadata

Assignees

Labels

P2Medium: Good to have, but can wait until someone steps upkind/enhancementA net-new feature or improvement to an existing featuretopic/UnixFSTopic UnixFStopic/filesTopic filestopic/rpc-apiIssues related to Kubo RPC API at /api/v0

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0