Commit 8be50ca3 authored by David Goulet's avatar David Goulet 🐼 Committed by Nick Mathewson
Browse files

relay: Change bandwidth stats interval to 24 hours

Going from 4 hours to 24 hours in order to try reduce the efficiency of guard
discovery attacks.

Closes #23856

Signed-off-by: David Goulet's avatarDavid Goulet <>
parent 831d3b79
o Minor feature (relay statistics):
- Change relay bandwidth reporting stats interval from 4 hours to 24 hours
in order to reduce the efficiency of guard discovery attacks. Fixes
ticket 23856.
......@@ -1131,9 +1131,9 @@ rep_hist_load_mtbf_data(time_t now)
* totals? */
/** How large are the intervals for which we track and report bandwidth use? */
#define NUM_SECS_BW_SUM_INTERVAL (4*60*60)
#define NUM_SECS_BW_SUM_INTERVAL (24*60*60)
/** How far in the past do we remember and publish bandwidth use? */
#define NUM_SECS_BW_SUM_IS_VALID (24*60*60)
#define NUM_SECS_BW_SUM_IS_VALID (5*24*60*60)
/** How many bandwidth usage intervals do we remember? (derived) */
......@@ -2064,7 +2064,7 @@ mark_my_descriptor_dirty(const char *reason)
/** How frequently will we republish our descriptor because of large (factor
* of 2) shifts in estimated bandwidth? */
/** Check whether bandwidth has changed a lot since the last time we announced
* bandwidth. If so, mark our descriptor dirty. */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment