-
Notifications
You must be signed in to change notification settings - Fork 79
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
Generalize CIDv0 to PeerIDs #12
Comments
/ipfs multiaddrs will migrate to /p2p instead soon, so apart from the hash itself there's not going to be confusion anymore. As for the hash itself I'm not sure that's neccessary. We should discuss whether with the /p2p migration it makes sense to make PeerIDs first class IPLD objects, and generally let the Qm hashes fade out. (cc @whyrusleeping) |
Related: ipfs/kubo#3859 |
In general, I'd like every object to be resolvable as an IPLD object (mumble thin waist). That is, given any More specifically, this issue is related to IPNS, IPRS, and my "policies" note (ipfs/notes#245). Basically, I'd like Note: The same applies to
Yes, that looks related. †Yes, I'm aware that IPRS doesn't really exist yet but I'd like to make the transition as smooth as possible once it does. |
A more pressing concern is that I'm modifying floodsub to use IPLD (for both topic descriptors and messages, it makes a lot of problems simply disappear) and would like to be able to talk about keys as IPLD objects. |
So, a related issue came up. For IPLD selectors, it would be nice if we could bake redefine CIDv0 as ProtoNode + UnixFS. As-is, the unixfs part is a binary blob in the data field which isn't going to be easy to select over without custom functions. Unfortunately, this will likely break some existing DAGs. We will have to think carefully about this. |
Currently, CIDv0 is defined to be a protobuf encoded IPFS node. Unfortunately, we're also using hashes that look like CIDv0s to point to public keys (PeerIDs). It would be nice to be able to treat these keys as IPLD objects.
Luckily, due to the way protobufs are encoded, we can use some ✨ magic numbers ✨ to make this work:
0x0a
or0x12
(1<<3|2
or2<<3|2
).0x08
The text was updated successfully, but these errors were encountered: