]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Raise guard threshold to top 25% or 2000 kilounits
authorRoger Dingledine <arma@torproject.org>
Thu, 24 Jul 2014 04:35:47 +0000 (00:35 -0400)
committerRoger Dingledine <arma@torproject.org>
Thu, 24 Jul 2014 20:24:17 +0000 (16:24 -0400)
Authorities now assign the Guard flag to the fastest 25% of the
network (it used to be the fastest 50%). Also raise the consensus
weight that guarantees the Guard flag from 250 to 2000. For the
current network, this results in about 1100 guards, down from 2500.
This step paves the way for moving the number of entry guards
down to 1 (proposal 236) while still providing reasonable expected
performance for most users.

Implements ticket 12690.

changes/ticket12690 [new file with mode: 0644]
src/or/config.c
src/or/dirserv.c

diff --git a/changes/ticket12690 b/changes/ticket12690
new file mode 100644 (file)
index 0000000..5091883
--- /dev/null
@@ -0,0 +1,9 @@
+  o Minor features:
+    - Authorities now assign the Guard flag to the fastest 25% of the
+      network (it used to be the fastest 50%). Also raise the consensus
+      weight that guarantees the Guard flag from 250 to 2000. For the
+      current network, this results in about 1100 guards, down from 2500.
+      This step paves the way for moving the number of entry guards
+      down to 1 (proposal 236) while still providing reasonable expected
+      performance for most users. Implements ticket 12690.
+
index 4182411354c12096f50d43d4326fc64a24257297..2661ce3b73551427df1456d10c727c08568f1b4e 100644 (file)
@@ -147,7 +147,7 @@ static config_var_t option_vars_[] = {
   V(AuthDirInvalid,              LINELIST, NULL),
   V(AuthDirInvalidCCs,           CSV,      ""),
   V(AuthDirFastGuarantee,        MEMUNIT,  "100 KB"),
-  V(AuthDirGuardBWGuarantee,     MEMUNIT,  "250 KB"),
+  V(AuthDirGuardBWGuarantee,     MEMUNIT,  "2 MB"),
   V(AuthDirReject,               LINELIST, NULL),
   V(AuthDirRejectCCs,            CSV,      ""),
   V(AuthDirRejectUnlisted,       BOOL,     "0"),
index aedd0925223c3c46299780e7244f54b20aa9fca0..49fafafab2b7ef0aebe03dca03f9aef4a5869911 100644 (file)
@@ -1588,7 +1588,7 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
     /* (Now bandwidths is sorted.) */
     if (fast_bandwidth_kb < ROUTER_REQUIRED_MIN_BANDWIDTH/(2 * 1000))
       fast_bandwidth_kb = bandwidths_kb[n_active/4];
-    guard_bandwidth_including_exits_kb = bandwidths_kb[(n_active-1)/2];
+    guard_bandwidth_including_exits_kb = bandwidths_kb[n_active*3/4];
     guard_tk = find_nth_long(tks, n_active, n_active/8);
   }
 
@@ -1646,7 +1646,8 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
 
   if (n_active_nonexit) {
     guard_bandwidth_excluding_exits_kb =
-      median_uint32(bandwidths_excluding_exits_kb, n_active_nonexit);
+      find_nth_uint32(bandwidths_excluding_exits_kb,
+                      n_active_nonexit, n_active_nonexit*3/4);
   }
 
   log_info(LD_DIRSERV,