-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(config): ipfs add
and Import
options for controling UnixFS DAG Width
#10774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2563b31
to
a0628f2
Compare
This introduces support for setting DAG-shaping options that control the maximum number of links in that a DAG node can have. It is supported in two ways: first, via `Import` configuration options; second, via `--max-links` and `--max-hamt-fanout` options `ipfs add`. The resulting DAGs will respect MaxLinks (for files and basic directories) and MaxHAMTFanout for HAMT directories. When options are unset, the previous Kubo defaults will apply.
21cc49d
to
b015c71
Compare
Based on ipfs/boxo#906. It needs some sharness tests I guess. I have tested manually at it seems to work, and I have ensured that not setting the new options does not break anything in terms of previous behaviour. |
ipfs add
and Import
options for controling UnixFS DAG Width
moved `Internal.UnixFSShardingSizeThreshold` to `Import.UnixFSHAMTDirectorySizeThreshold` and included it in profiles
placeholder name based on year and kubo release
Looking good, noting remaining work for me next week:
|
basic smoke test confirming UnixFSFileMaxLinks sets to 'ipfs add' defaults and informs the DAG shape
keeping old name to minimize noise, just document pre-existing defaults
lets make the fanout match the max links from files and rename profile to `-wide` this will make it easier to discuss in ipfs/specs#499
thr 8000 eshold exists only as a global flag, so it was already set, but we were missing fanout. this applies both, for global consistency
d01209d
to
104ede9
Compare
if cfg.Internal.UnixFSShardingSizeThreshold is set and cfg.Import.UnixFSHAMTDirectorySizeThreshold is not, assign old value to new field and print ERROR urging user to migrate this way we wont break any existing CI etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hsanjuan
- added tests to
./test/cli/add_test.go
, looking good - moved preexisting
Internal.UnixFSShardingSizeThreshold
toImport.UnixFSHAMTDirectorySizeThreshold
Merging to test it over Easter, if no issues we will ship this in Kubo 0.35.0-rc1
I'll document these in ipfs/specs#499
Import.* config params for controlling DAG width were added in: ipfs/kubo#10774
This introduces support for setting DAG-shaping options that control the maximum number
of links in that a DAG node can have.
It is supported in two ways: first, via
Import
configuration options; second, via--max-links
and--max-hamt-fanout
optionsipfs add
.The resulting DAGs will respect MaxLinks (for files and basic directories) and
MaxHAMTFanout for HAMT directories. When options are unset, the previous Kubo
defaults will apply.