libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.54k stars 274 forks source link

Detach protocol identifiers from IPFS #45

Open tomaka opened 6 years ago

tomaka commented 6 years ago

Right now the identify protocol is /ipfs/id/1.0.0, the kademlia protocol is /ipfs/kad/1.0.0, and the ping protocol is /ipfs/ping/1.0.0. If libp2p is to become independant from IPFS, it would be nice to change these identifiers to something like /p2p/id/1.0.0, /p2p/kad/1.0.0 and /p2p/ping/1.0.0 instead.

Maybe these are other protocols which I can't think of that have the same issue.

daviddias commented 6 years ago

@tomaka 💯 agree. This is actually very easy to migrate over given that we can just use the same handler for 2 protocols. @whyrusleeping what do you think?

whyrusleeping commented 6 years ago

Oh yeah, totally. Same with the /ipfs/QmFoo in the multiaddrs. Lets migrate that stuff asap

victorb commented 6 years ago

This is not the first time I see the p2p identifier in our protocols, but I'm wondering why for example /p2p/ping/1.0.0 would be preferred over /libp2p/ping/1.0.0, as in the end it's part of libp2p right?

whyrusleeping commented 6 years ago

@VictorBjelkholm gotta save bytes!

ShadowJonathan commented 4 years ago

I just had a discussion about this because I started confusing /ipfs/id as a ipfs-network-specific identity protocol, and not a general-purpose identity protocol.

Swapping everything in the next versions to p2p or libp2p (possibly lp2p) could help ease confusion and make it clear which protocols are specific to which applications.

Stebalien commented 4 years ago

We're migrating /ipfs multiaddrs to /p2p in the next version. We should also migrate these protocols but, unfortunately, our current protocol negotiation protocol costs us a round-trip per protocol it checks (we're working on a better one).