Skip to content

Commit 6634ca7

Browse files
achingbrainmxindenp-shahi
authored
circuitv2: clarify what to do when data limit is reached (#526)
This documents the rust-libp2p behaviour when more data than is allowed is transferred over a relayed connection. js-libp2p will take the same approach. go-libp2p may need to be updated. --------- Co-authored-by: Max Inden <[email protected]> Co-authored-by: Prithvi Shahi <[email protected]>
1 parent 7530296 commit 6634ca7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

relay/circuit-v2.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the version 2 of the libp2p Circuit Relay protocol.
44

55
| Lifecycle Stage | Maturity | Status | Latest Revision |
66
| --------------- | -------------- | ------ | --------------- |
7-
| 3A | Recommendation | Active | r2, 2023-01-31 |
7+
| 3A | Recommendation | Active | r3, 2023-02-28 |
88

99
Authors: [@vyzo]
1010

@@ -255,6 +255,16 @@ accidental termination according to its connection management policy.
255255
If a relay server becomes overloaded however, it may still drop a
256256
connection with reservations in order to maintain its resource quotas.
257257

258+
If more data than the limit specified in the `data` field is transferred
259+
over the relayed connection, or the relayed connection has been open for
260+
longer than `duration`, the relay should reset the stream to the source
261+
and the stream to the destination.
262+
263+
If the reservation for the connection has expired then the relay may
264+
apply any connection management policy to the connection as normal otherwise
265+
it should retain the connection, unless doing so would prevent it from
266+
maintaining its resource quotas.
267+
258268
***Note: Implementations _should not_ accept reservations over already relayed connections.***
259269

260270
#### Connection Initiation

0 commit comments

Comments
 (0)