diff options
author | eta <tor@eta.st> | 2022-08-08 13:14:45 +0100 |
---|---|---|
committer | eta <tor@eta.st> | 2022-08-08 13:16:36 +0100 |
commit | aab9efe13b3162db29e72d9364e30bc2955614ab (patch) | |
tree | 0e971ab9504d4c059e366226e8b7c3b1d0a883ee /proposals/324-rtt-congestion-control.txt | |
parent | b5e2002983fc4682b88fedb73a9101cc8090b053 (diff) | |
download | torspec-aab9efe13b3162db29e72d9364e30bc2955614ab.tar.gz torspec-aab9efe13b3162db29e72d9364e30bc2955614ab.zip |
prop#324: mention rearranged form for N_EWMA smoothing
The formula used for N_EWMA is actually rearranged in the C tor
implementation, in a way that caused the arti reimplementation to be off
by a small rounding error until it was corrected.
In order to ensure other implementations don't have this issue, mention
the rearranged form and add a requirement that it be used.
(background:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/525#note_2807244)
Diffstat (limited to 'proposals/324-rtt-congestion-control.txt')
-rw-r--r-- | proposals/324-rtt-congestion-control.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/proposals/324-rtt-congestion-control.txt b/proposals/324-rtt-congestion-control.txt index 78b6789..c617983 100644 --- a/proposals/324-rtt-congestion-control.txt +++ b/proposals/324-rtt-congestion-control.txt @@ -167,7 +167,11 @@ reduce the effects of packet jitter. This smoothing is performed using N_EWMA[27], which is an Exponential Moving Average with alpha = 2/(N+1): - N_EWMA = BDP*2/(N+1) + N_EWMA_prev*(N-1)/(N+1). + N_EWMA = BDP*2/(N+1) + N_EWMA_prev*(N-1)/(N+1) + = (BDP*2 + N_EWMA_prev*(N-1))/(N+1). + +Note that the second rearranged form MUST be used in order to ensure that +rounding errors are handled in the same manner as other implementations. Flow control rate limiting uses this function |