universal-connectivity icon indicating copy to clipboard operation
universal-connectivity copied to clipboard

rust-peer: Identify Protocol String

Open DougAnderson444 opened this issue 2 years ago • 5 comments

Is this supposed to be ipfs/id/1.0.0 (with /id/ in the middle) as per this page

https://github.com/libp2p/universal-connectivity/blob/4a309e5fa3dc96b7503aff6a3cc5b2ec94bdb899/rust-peer/src/main.rs#L298-L299

DougAnderson444 avatar May 04 '23 11:05 DougAnderson444

Did a bit more digging, perhaps it's more ipfs/0.1.0 needs to be added to that libp2p protocol page?

DougAnderson444 avatar May 04 '23 11:05 DougAnderson444

For the sake of completeness, adding to the latest comment, the referenced /ipfs/0.1.0 is not the libp2p identify multistream-select protool name, but the general libp2p Protocol Version, see https://github.com/libp2p/specs/tree/master/identify#protocolversion.

mxinden avatar May 08 '23 03:05 mxinden

As far as I am aware, universal-connectivity nodes should not interact, nor act as normal IPFS nodes, thus they should like choose a different Protocol Version, e.g. /universal-connectiviy/0.1.0. That said, I am not aware of any code-path that actually acts upon the Protocol Version, thus this would be for humans only.

mxinden avatar May 08 '23 03:05 mxinden

Thank @mxinden, I can appreciate your input here.

I am working on a plugin system idea for libp2p where this protocol name/version would come in handy to find other peers who run the same plugin protocol. Given there is no code path though, and usage seems to be a bit diverse across implementation, what would be the best approach? Could I build on what is already there effectively?

DougAnderson444 avatar Jun 01 '23 12:06 DougAnderson444

So it seems that this is just setting the protocol_version which serves as just metadata and isn't acted on.

Moving forward, we can just change this to a custom string to avoid confusion with identify's multistream-select protocol name.

2color avatar Aug 13 '24 08:08 2color