Skip to content

Commit 7530296

Browse files
feat(connections): clarify state management around supported protocols (#530)
1 parent aac4e1f commit 7530296

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

connections/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and spec status.
3434
- [State Management](#state-management)
3535
- [Peer Metadata Storage](#peer-metadata-storage)
3636
- [Connection Limits](#connection-limits)
37+
- [Supported protocols](#supported-protocols)
3738
- [Connection Lifecycle Events](#connection-lifecycle-events)
3839
- [Hole punching](#hole-punching)
3940
- [Future Work](#future-work)
@@ -325,6 +326,17 @@ Resource allocation, measurement and enforcement policies are all an active area
325326
of discussion in the libp2p community, and implementations are free to develop
326327
whatever prioritization system makes sense.
327328

329+
#### Supported protocols
330+
331+
A libp2p node SHOULD scope its set of supported protocols to the underlying
332+
physical connection to a peer. It MAY only support a protocol based on properties
333+
of a physical connection to e.g. limit the use of bandwidth-heavy protocols over
334+
a relayed or metered connection. A libp2p node MAY offer different sets of protocols
335+
to different peers. It MAY revoke or add the support for a protocol at any time,
336+
for example to only offer certain services after learning its NAT status on a connection.
337+
Therefore, libp2p nodes SHOULD NOT assume that the set of protocols on a connection
338+
is static.
339+
328340
### Connection Lifecycle Events
329341

330342
The establishment of new connections and streams is likely to be a

0 commit comments

Comments
 (0)