You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following from @D4nte's question in libp2p, it appears libp2p best practice provisions for asymmetrical protocols where peers participating in the same protocol, but in different roles, may choose to differentiate between their roles by:
Sending differentiated protocol IDs in the identify protocol list, or
Excluding that protocol from the identify protocol list
Is this something supported by nim-libp2p? In other words, is it possible to mount a protocol but choose not to include that in the identify protocol list?
The text was updated successfully, but these errors were encountered:
Is this something supported by nim-libp2p? In other words, is it possible to mount a protocol but choose not to include that in the identify protocol list?
Yes, both are supported. If a protocol shouldn't be advertised it is simply not mounted. I would use this two techniques in different situations however.
If a protocol has a pure client/server mode and the client shouldn't handle requests, then don't mount the protocol for the client
if a protocol a node can assume explicit modes of operation, as it is the case of the hop/stop parts in the relay, then I would use the second technique with different protocol strings
Fun fact, the changes suggested for relay v2 was what got originally proposed but rejected with the argument that "libp2p protocol strings aren't REST endpoints" 🤔 - glad to see it come full circle ;-)
Following from @D4nte's question in
libp2p
, it appears libp2p best practice provisions for asymmetrical protocols where peers participating in the same protocol, but in different roles, may choose to differentiate between their roles by:identify
protocol list, oridentify
protocol listSee this comment for examples of the above
Is this something supported by
nim-libp2p
? In other words, is it possible tomount
a protocol but choose not to include that in theidentify
protocol list?The text was updated successfully, but these errors were encountered: