aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2024-04-16 15:24:39 +0000
committerDavid Goulet <dgoulet@torproject.org>2024-04-16 15:24:39 +0000
commitc0ea56f5095359b0f6af94549250cc129a0d94c3 (patch)
tree42cb7bcf9c278aafd824211a0691dc7fa85121f6
parentdb46703c96a3375d83b2077c8c58579077bb8458 (diff)
parent7b6d90cb37f47878d5d4dbfc1c807d50b2736e1c (diff)
downloadtorspec-main.tar.gz
torspec-main.zip
Merge branch 'prop340-stream-windows' into 'main'HEADmain
prop340: clarify SENDME window accounting See merge request tpo/core/torspec!265
-rw-r--r--proposals/340-packed-and-fragmented.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/proposals/340-packed-and-fragmented.md b/proposals/340-packed-and-fragmented.md
index 8586349..cd98cfd 100644
--- a/proposals/340-packed-and-fragmented.md
+++ b/proposals/340-packed-and-fragmented.md
@@ -301,6 +301,32 @@ Any increase in maximum length for any other message type requires a new
EXTEND2 messages to be 2000 bytes long, we need to add a new proposal
saying so, and reserving a new subprotocol version.)
+### `SENDME` window accounting
+
+`SENDME` windows count relay *cells* rather than relay *messages*.
+
+A cell counts towards the circuit's `SENDME` window if it contains any part of
+any message that would normally count towards `SENDME` windows (currently only
+`DATA`).
+
+A cell counts towards the `SENDME` window of every stream that it contains
+part of a message for, whose command counts towards `SENDME` windows.
+
+Examples:
+
+* A cell containing a `SENDME` message and a `RESOLVE` message currently
+ wouldn't count towards any windows, since neither of those commands currently
+ counts towards windows.
+* A cell containing a `SENDME` message and a `DATA` message would count towards
+ the circuit window and the `DATA` message's stream's window.
+* A cell containing two `DATA` messages, for different streams, would count
+ towards the circuit-level window and both stream-level windows.
+* A cell containing two `DATA` messages for the *same* stream counts
+ *once* towards the circuit-level and stream-level windows.
+* If `DATAGRAM` messages (proposal 339) are implemented, and count towards
+ windows, then every cell containing a fragment of a `DATAGRAM` message counts
+ towards windows.
+
# Appendix: Example cells
Here is an example of the simplest case: one message, sent in one relay cell: