Skip to content
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

Should format exist in leaves? #230

Closed
btc opened this issue Oct 29, 2014 · 8 comments
Closed

Should format exist in leaves? #230

btc opened this issue Oct 29, 2014 · 8 comments
Assignees
Labels
topic/docs-ipfs Topic docs-ipfs topic/merkledag Topic merkledag

Comments

@btc
Copy link
Contributor

btc commented Oct 29, 2014

ipfs block put problem

@jbenet

@whyrusleeping
Copy link
Member

Could you elaborate a little more on this? I worked on most of the formatting stuff (unixfs) and could probably provide some insight

@btc
Copy link
Contributor Author

btc commented Oct 29, 2014

@jbenet can elaborate

@jbenet
Copy link
Member

jbenet commented Oct 29, 2014

This is just a note to myself to figure out whether leaves in the merkledag should be allowed without a format. We discussed before and opted for forcing format. The issue that emerged is this:

anyone could publish a block on ipfs that doesnt follow the merkledag format

Even if most nodes check it and discard non-properly-formatted blocks, we want to be able to store encrypted blocks, which would dispense with the format.

  1. if we keep forcing the format, we'd have to setup encryption such that the link table and data are encrypted separately and the format is visible. This leaks information about the file. bad.
  2. force the format for in-the-clear nodes and deal with it if nodes store non-formatted encrypted blocks.
  3. dispense with the format entirely, allowing merkledag leaves (they'd have to be leaves) to be any opaque data.

I don't like 3. because it breaks self-description. We might be able to contrive a format -- if we do define our own format, and not protobuf, for the merkledag node -- where the link table is optional, but recognizable. if parsing fails on the link table part, implementations assume it's a leaf with no links.

@whyrusleeping
Copy link
Member

👍

@jbenet jbenet added the topic/merkledag Topic merkledag label Mar 28, 2015
@daviddias
Copy link
Member

Let's bring this discussion to the IPLD thread ipfs/specs#37.

@daviddias daviddias added topic/docs-ipfs Topic docs-ipfs and removed backlog labels Jan 1, 2016
@whyrusleeping
Copy link
Member

This should be resolved by CIDv1

Ref #3059

@whyrusleeping
Copy link
Member

progress #3307

@whyrusleeping
Copy link
Member

We now have the ability to create files that have no formatting in the leaves via ipfs add --raw-leaves. This option may be made the default at some point in the future.

@aschmahmann aschmahmann mentioned this issue Dec 1, 2021
80 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docs-ipfs Topic docs-ipfs topic/merkledag Topic merkledag
Projects
None yet
Development

No branches or pull requests

5 participants