[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torspec] 02/04: prop#324: mention rearranged form for N_EWMA smoothing



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository torspec.

commit aab9efe13b3162db29e72d9364e30bc2955614ab
Author: eta <tor@xxxxxx>
AuthorDate: Mon Aug 8 13:14:45 2022 +0100

    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)
---
 proposals/324-rtt-congestion-control.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits