mirror of
https://github.com/torproject/torspec.git
synced 2024-11-27 03:40:47 +00:00
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)
This commit is contained in:
parent
b5e2002983
commit
aab9efe13b
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user