ipfs / ipfs/kubo

Provide way to update the CID prefix of DAG Objects

Open
#4,171 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

There should be a way rehash or update the CID prefix of a DAG Object, both within the files API and outside. Right now #4026 provides adds an `update` command to the `files` command which will update the prefix of the root object of directory objects. This will cause new objects to use the new prefix but existing objects will be left alone.

It would also be useful to recursively update the prefix.

Both operations (updating just the root and the entire DAG) will be useful within the `files` API and standalone. The most logical place for the standalone version will likely be within the `dag` sub-command.

The question is what to call it. Two possibilities come to mind `update` as in update the prefix or `rehash` as in recompute the hash. Since a recursive update can be very expensive (it might even retrieve objects from the network) I propose that recursion is disabled by default or separate commands be used to update just the root, vs a recursive update of the entire dag.

Thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.