[tor-commits] [tor/master] Twiddle ROUTER_{MAX_COSMETIC_TIME_DIFFERENCE, MAX_AGE_TO_PUBLISH}

arma at torproject.org arma at torproject.org
Tue Apr 24 16:19:28 UTC 2012


commit cc3515780529277a5f9d788e8a256798e5cd144f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Mar 30 15:38:16 2012 -0400

    Twiddle ROUTER_{MAX_COSMETIC_TIME_DIFFERENCE,MAX_AGE_TO_PUBLISH}
    
    This is ticket 2479. Roger's original explanation was:
    
       We have a series of bugs where relays publish a descriptor within
       12 hours of their last descriptor, but the authorities drop it
       because it's not different "enough" from the last one and it's
       too close to the last one.
    
       The original goal of this idea was to a) reduce the number of new
       descriptors authorities accept (and thus have to store) and b)
       reduce the total number of descriptors that clients and mirrors
       fetch. It's a defense against bugs where relays publish a new
       descriptor every minute.
    
       Now that we're putting out one consensus per hour, we're doing
       better at the total damage that can be caused by 'b'.
    
       There are broader-scale design changes that would help here, and
       we've had a trac entry open for years about how relays should
       recognize that they're not in the consensus, or recognize when
       their publish failed, and republish sooner.
    
       In the mean time, I think we should change some of the parameters
       to make the problem less painful.
---
 changes/bug2749     |    8 ++++++++
 src/or/or.h         |    2 +-
 src/or/routerlist.c |    2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/changes/bug2749 b/changes/bug2749
new file mode 100644
index 0000000..964a828
--- /dev/null
+++ b/changes/bug2749
@@ -0,0 +1,8 @@
+  o Changed parameters (authorities):
+    - Authorities are now a little more lenient at accepting older
+      router descriptors, or newer router descriptors that don't make
+      big changes. This should help ameliorate past and future issues
+      where routers think they have uploaded valid descriptors, but the
+      authorities don't think so. Fix for ticket 2479.
+
+
diff --git a/src/or/or.h b/src/or/or.h
index 4996fd3..6053acb 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -187,7 +187,7 @@
 #define ROUTER_MAX_AGE (60*60*48)
 /** How old can a router get before we (as a server) will no longer
  * consider it live? In seconds. */
-#define ROUTER_MAX_AGE_TO_PUBLISH (60*60*20)
+#define ROUTER_MAX_AGE_TO_PUBLISH (60*60*24)
 /** How old do we let a saved descriptor get before force-removing it? */
 #define OLD_ROUTER_DESC_MAX_AGE (60*60*24*5)
 
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 160f340..a64b93f 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5082,7 +5082,7 @@ router_reset_descriptor_download_failures(void)
 
 /** Any changes in a router descriptor's publication time larger than this are
  * automatically non-cosmetic. */
-#define ROUTER_MAX_COSMETIC_TIME_DIFFERENCE (12*60*60)
+#define ROUTER_MAX_COSMETIC_TIME_DIFFERENCE (2*60*60)
 
 /** We allow uptime to vary from how much it ought to be by this much. */
 #define ROUTER_ALLOW_UPTIME_DRIFT (6*60*60)





More information about the tor-commits mailing list