Jump to conversation
Unresolved conversations (1)
@aschmahmann aschmahmann Jul 20, 2022
Given that this is not the first time we've clarified this it might be better to be even more explicit that `ipfs add` across versions resulting in the same CID is not supported behavior. For example, say there's a new flag we find ourselves adding in the future that isn't represented now. As an example, say we added support for UnixFS v1.5 and added support for metadata via `ipfs add` by default (IMO a bad idea, but beside the point here). There is currently no flag for `--disable-metadata` because that feature doesn't exist. Therefore, even though I diligently wrote down "To Self: Always use `ipfs add --chunker=buzhash --cid-version=1 --raw-leaves --hash=sha3-256 --inline=true --inline-limit=37 --trickle -r`" it's still insufficient because I didn't realize to add `--disable-metadata=true` because that flag didn't exist yet. I'd be clear here and say something like `ipfs add` will generate the same CID for the same data on the same version of Kubo "only", and that while the parameters of this function do not tend to change frequently or significantly the Kubo developers reserve the right to change various defaults so as to give users a better experience. If you insist on being able to record the exact parameters you should also include the version of Kubo used to do the import. Then nudge people towards CAR files (or pinning DAGs on other nodes or backing up the repo) for backups.
Outdated
core/commands/add.go
@lidel @Jorropo @bronger
Resolved conversations (3)
@Jorropo Jorropo Aug 17, 2022
```suggestion See 'dag export' and 'dag import' for more information. ``` If you want to put the binary name something else I guess it should be `os.Args[0]` (or `getprocname`)
Outdated
core/commands/add.go
@Jorropo Jorropo Jul 22, 2022
Nit picking but the car changes should be an other commit from the add ones.
core/commands/dag/dag.go
@hsanjuan hsanjuan Jul 20, 2022
I was under the impression that the "almost always" was there as a caveat for things like auto-HAMT when adding big folders. That is an example where something was done and the same input, same add parameters would have resulted in a different CID in a way that the user could do nothing about it (other than downgrade). So perhaps it is worth saying "Given the same input, same add parameters **and Kubo version**". There are some internal defaults (folder size estimation for auto-HAMT, rabin/buzhash implementations etc.) which, who knows, might change. I am not sure it is reasonable to make the promise that same options will produce same results in future Kubo versions, though they almost always will. :-)
Outdated
core/commands/add.go