From f922a3e4ff6f0166b78c21c3b869279474577d81 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 25 May 2021 17:06:19 +0200 Subject: [PATCH] identify: Document identify behavior for asymetrical protocols (#327) * identify: Document identify behavior for asymetrical protocols > Note on asymmetrical protocols: Assume an asymmetrical request-response style protocol `foo` where some clients only support initiating requests while some servers (only) support responding to requests. To prevent clients from initiating requests to other clients, which given them being clients they fail to respond, clients should not list `foo` in their `protocols` list. Question emerged in https://github.com/libp2p/specs/issues/324. * identify/README: Reword to inbound substreams --- identify/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/identify/README.md b/identify/README.md index e580e7c97..d83a85d05 100644 --- a/identify/README.md +++ b/identify/README.md @@ -120,3 +120,11 @@ observable source address. ### protocols This is a list of protocols supported by the peer. + +A node should only advertise a protocol if it's willing to receive inbound +streams on that protocol. This is relevant for asymmetrical protocols. For +example assume an asymmetrical request-response style protocol `foo` where some +clients only support initiating requests while some servers (only) support +responding to requests. To prevent clients from initiating requests to other +clients, which given them being clients they fail to respond, clients should not +advertise `foo` in their `protocols` list.