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

Move CIDs to the "multiformats" project #26

Closed
Stebalien opened this issue Nov 19, 2018 · 14 comments
Closed

Move CIDs to the "multiformats" project #26

Stebalien opened this issue Nov 19, 2018 · 14 comments
Assignees

Comments

@Stebalien
Copy link
Member

Stebalien commented Nov 19, 2018

So, when proposing to use CIDs as peer IDs, I got a bit of push-back as CIDs currently imply IPLD and bring in the concept of IPLD formats, links, dags, data-structures, etc. However, that doesn't have to be the case. Really, CIDs are just (codec, content-addr) tuples. That is, they're just "typed pointers".

Proposal: Move the CID spec/concept to multiformats.

This would mean that the codec in <version><codec><mhash> wouldn't necessarily map to a defined IPLD codec. Instead, it would just be some multicodec that may or may not have an IPLD format defined (yet).

Why?

  • People can start using CIDs without thinking about IPLD. Typed pointers are really nice and it would be great to be able to use them everywhere without having to sell all of IPLD.
  • We can retroactively define IPLD formats for these codecs. Then, when projects realize "oh shoot, I wish I had used IPLD", they'll have an easier time upgrading.

Why not?

  • This may encourage users a proliferation of multicodecs/IPLD formats. In IPLD, we use multicodecs to indicate structure not semantics.

Thoughts? Should we just keep CIDs where they are but say "you can use these without the rest of IPLD" (not sure we can really sell that).

@mikeal
Copy link

mikeal commented Nov 19, 2018

Makes sense to me.

At some point, we're going to have to figure out a governance structure that is compatible with standards bodies for the multicodec registry. CID, and the constraints/concerns regarding codec proliferation, should be a part of that discussion.

@mikeal
Copy link

mikeal commented Nov 19, 2018

Also, the spec for CID has moved to ipld/specs, so we'll want to move that along with this repo.

@whyrusleeping
Copy link
Member

Sounds good to me.

@daviddias
Copy link
Member

👍 from me as well.

@mikeal
Copy link

mikeal commented Nov 20, 2018

I'm not admin in both of those orgs so I can't complete a migration :(

@Stebalien
Copy link
Member Author

The migration will take a while anyways. I just wanted to see if there were any objections.

[note: @jbenet's fine with whatever increases adoption]


@tomaka

If CIDs didn't imply IPLD, would you feel better about using them as peer IDs? A CID is really just a (codec, multihash) tuple (see the issue summary). They're really on a layer below IPLD and don't actually need to drag in concepts like DAGs, formats, paths, etc.

Note: This won't really change anything from a technical perspective. The alternative is to just leave CIDs where they are (in IPLD) but say that they can be used independently. Moving them makes it clear that they can be used independent of IPLD, leaving them makes it clear that they're a building-block for IPLD.

@daviddias
Copy link
Member

The JS people can start moving as we have it easier cause we don't use the github urls as import paths. The spec can be moved right away too

@daviddias
Copy link
Member

Opened an issue on all the CID repos to point to this thread ^^

@ianopolous
Copy link
Member

Sounds fine to me. Though you make it sound like the "rest of ipld" is large and complicated. In my opinion it is not. Or at least the minimum to use cids is not - cbor + a special cbor tag for merkle links.

@Stebalien
Copy link
Member Author

Though you make it sound like the "rest of ipld" is large and complicated. In my opinion it is not.

It's not. However, it brings in a bunch of concepts (merkledags, formats, hash-linked data, etc.). Really, we might be better served by improving the documentation.

Basically, I don't want CIDs being a part of IPLD to scare people away from using them. I'd rather leave them here (absent additional motivation) but I'm highly biased towards "IPLD everywhere".

@mikeal
Copy link

mikeal commented Nov 27, 2018

I agree with @Stebalien. CID is an address and can be used in a lot of very simple cases that aren't even linked data.

Once you start using CID's as links (IPLD) you open the floodgates of knowledge and terms that are going to get thrown at you.

If you look at the main topics right now in the project it's mostly second order problems we're already facing working with these data-structures, like replication. Understanding all of that isn't necessary to derive value from CIDs.

@mikeal
Copy link

mikeal commented Nov 29, 2018

It sounds like we have a consensus.

I'm going to move this repo to multiformats and move the current spec from ipld/specs to this repo on Monday December 3rd if there are no objections.

@reardenlife

This comment has been minimized.

@daviddias
Copy link
Member

This has been done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants