From 23e34cce9f663cfc8af7347090ac3a59d16f991d Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 26 Jul 2022 17:40:53 +0200 Subject: [PATCH 1/3] docs(cli): clarify CAR format in dag export|import --- core/commands/dag/dag.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 1661c3818b0..77c9ee4b590 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -197,7 +197,8 @@ Note: currently present in the blockstore does not represent a complete DAG, pinning of that individual root will fail. -Maximum supported CAR version: 1 +Maximum supported CAR version: 2 +Specification of CAR formats: https://ipld.io/specs/transport/car/ `, }, Arguments: []cmds.Argument{ @@ -265,6 +266,7 @@ var DagExportCmd = &cmds.Command{ 'ipfs dag export' fetches a DAG and streams it out as a well-formed .car file. Note that at present only single root selections / .car files are supported. The output of blocks happens in strict DAG-traversal, first-seen, order. +CAR file follows the CARv1 format: https://ipld.io/specs/transport/car/carv1/ `, }, Arguments: []cmds.Argument{ From 339285fb133dd8222cde0755b7eebe7b44559671 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 20 Jul 2022 14:19:51 +0200 Subject: [PATCH 2/3] docs(cli): clarify CID determinism in add command Better 'ipfs add --help' docs, based on feedback from https://discuss.ipfs.io/t/ipfs-for-publishing-research-data-car-files/14748 --- core/commands/add.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/commands/add.go b/core/commands/add.go index c2d73f8deee..30e6b912507 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -107,10 +107,16 @@ You can now check what blocks have been created by: QmerURi9k4XzKCaaPbsK6BL5pMEjF7PGphjDvkkjDtsVf3 868 QmQB28iwSriSUSMqG2nXDTLtdPHgWb4rebBrU7Q1j4vxPv 338 -Finally, a note on hash determinism. While not guaranteed, adding the same -file/directory with the same flags will almost always result in the same output -hash. However, almost all of the flags provided by this command (other than pin, -only-hash, and progress/status related flags) will change the final hash. +Finally, a note on hash (CID) determinism and 'ipfs add' command. + +Almost all the flags provided by this command will change the final CID, and +new flags may be added in the future. It is not guaranteed for the implicit +defaults of 'ipfs add' to remain the same in future Kubo releases, or for other +IPFS software to use the same import parameters as Kubo. + +If you need to back up or transport content-addressed data using a non-IPFS +medium, CID can be preserved with CAR files. +See 'ipfs dag export' and 'dag import' for more information. `, }, From 5690d7807f18c98f9195125087d2eee7676feee5 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 17 Aug 2022 05:08:01 +0200 Subject: [PATCH 3/3] docs(add): skip binary name in helptext Co-authored-by: Jorropo --- core/commands/add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commands/add.go b/core/commands/add.go index 30e6b912507..fb8ee8a3145 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -116,7 +116,7 @@ IPFS software to use the same import parameters as Kubo. If you need to back up or transport content-addressed data using a non-IPFS medium, CID can be preserved with CAR files. -See 'ipfs dag export' and 'dag import' for more information. +See 'dag export' and 'dag import' for more information. `, },