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

[or-cvs] r19305: {tor} Raise the minimum bandwidth to be a relay from 20000 bytes t (in tor/trunk: . src/or)



Author: arma
Date: 2009-04-12 03:56:58 -0400 (Sun, 12 Apr 2009)
New Revision: 19305

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/config.c
   tor/trunk/src/or/dirserv.c
   tor/trunk/src/or/or.h
Log:
Raise the minimum bandwidth to be a relay from 20000 bytes to 20480
bytes (aka 20KB/s), to match our documentation. Also update
directory authorities so they always assign the Fast flag to relays
with 20KB/s of capacity. Now people running relays won't suddenly
find themselves not seeing any use, if the network gets faster
on average.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-04-12 06:45:46 UTC (rev 19304)
+++ tor/trunk/ChangeLog	2009-04-12 07:56:58 UTC (rev 19305)
@@ -1,4 +1,4 @@
-Changes in version 0.2.1.14-rc - 2009-04-11
+Changes in version 0.2.1.14-rc - 2009-04-12
   o Major features:
     - Clients replace entry guards that were chosen more than a few months
       ago. This change should significantly improve client performance,
@@ -30,6 +30,12 @@
     - If the bridge config line doesn't specify a port, assume 443.
       This makes bridge lines a bit smaller and easier for users to
       understand.
+    - Raise the minimum bandwidth to be a relay from 20000 bytes to 20480
+      bytes (aka 20KB/s), to match our documentation. Also update
+      directory authorities so they always assign the Fast flag to relays
+      with 20KB/s of capacity. Now people running relays won't suddenly
+      find themselves not seeing any use, if the network gets faster
+      on average.
 
   o Minor bugfixes:
     - Avoid trying to print raw memory to the logs when we decide to

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2009-04-12 06:45:46 UTC (rev 19304)
+++ tor/trunk/src/or/config.c	2009-04-12 07:56:58 UTC (rev 19305)
@@ -3271,21 +3271,21 @@
     return -1;
 
   if (server_mode(options)) {
-    if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH*2) {
+    if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
       r = tor_snprintf(buf, sizeof(buf),
                        "BandwidthRate is set to %d bytes/second. "
                        "For servers, it must be at least %d.",
                        (int)options->BandwidthRate,
-                       ROUTER_REQUIRED_MIN_BANDWIDTH*2);
+                       ROUTER_REQUIRED_MIN_BANDWIDTH);
       *msg = tor_strdup(r >= 0 ? buf : "internal error");
       return -1;
     } else if (options->MaxAdvertisedBandwidth <
-               ROUTER_REQUIRED_MIN_BANDWIDTH) {
+               ROUTER_REQUIRED_MIN_BANDWIDTH/2) {
       r = tor_snprintf(buf, sizeof(buf),
                        "MaxAdvertisedBandwidth is set to %d bytes/second. "
                        "For servers, it must be at least %d.",
                        (int)options->MaxAdvertisedBandwidth,
-                       ROUTER_REQUIRED_MIN_BANDWIDTH);
+                       ROUTER_REQUIRED_MIN_BANDWIDTH/2);
       *msg = tor_strdup(r >= 0 ? buf : "internal error");
       return -1;
     }

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2009-04-12 06:45:46 UTC (rev 19304)
+++ tor/trunk/src/or/dirserv.c	2009-04-12 07:56:58 UTC (rev 19305)
@@ -1633,7 +1633,7 @@
 #define MTBF_TO_GUARANTEE_STABLE (60*60*24*5)
 /** Similarly, we protect sufficiently fast nodes from being pushed
  * out of the set of Fast nodes. */
-#define BANDWIDTH_TO_GUARANTEE_FAST (100*1024)
+#define BANDWIDTH_TO_GUARANTEE_FAST ROUTER_REQUIRED_MIN_BANDWIDTH
 /** Similarly, every node with sufficient bandwidth can be considered
  * for Guard status. */
 #define BANDWIDTH_TO_GUARANTEE_GUARD (250*1024)
@@ -1814,7 +1814,7 @@
     /* The 12.5th percentile bandwidth is fast. */
     fast_bandwidth = find_nth_uint32(bandwidths, n_active, n_active/8);
     /* (Now bandwidths is sorted.) */
-    if (fast_bandwidth < ROUTER_REQUIRED_MIN_BANDWIDTH)
+    if (fast_bandwidth < ROUTER_REQUIRED_MIN_BANDWIDTH/2)
       fast_bandwidth = bandwidths[n_active/4];
     guard_bandwidth_including_exits = bandwidths[(n_active-1)/2];
     guard_tk = find_nth_long(tks, n_active, n_active/8);

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2009-04-12 06:45:46 UTC (rev 19304)
+++ tor/trunk/src/or/or.h	2009-04-12 07:56:58 UTC (rev 19305)
@@ -4289,7 +4289,7 @@
                                **/
 } trusted_dir_server_t;
 
-#define ROUTER_REQUIRED_MIN_BANDWIDTH 10000
+#define ROUTER_REQUIRED_MIN_BANDWIDTH (20*1024)
 
 #define ROUTER_MAX_DECLARED_BANDWIDTH INT32_MAX