[or-cvs] r11868: Document minimal values for voting times. Use a macro instea (in tor/trunk: . doc/spec src/or)

nickm at seul.org nickm at seul.org
Thu Oct 11 16:06:42 UTC 2007


Author: nickm
Date: 2007-10-11 12:06:42 -0400 (Thu, 11 Oct 2007)
New Revision: 11868

Modified:
   tor/trunk/
   tor/trunk/doc/spec/dir-spec.txt
   tor/trunk/src/or/config.c
   tor/trunk/src/or/or.h
Log:
 r14885 at Kushana:  nickm | 2007-10-11 10:36:16 -0400
 Document minimal values for voting times.  Use a macro instead of a magic number.  Remove an "enforce this" xxxx020 that was already enforced.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14885] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/doc/spec/dir-spec.txt
===================================================================
--- tor/trunk/doc/spec/dir-spec.txt	2007-10-11 16:06:37 UTC (rev 11867)
+++ tor/trunk/doc/spec/dir-spec.txt	2007-10-11 16:06:42 UTC (rev 11868)
@@ -309,17 +309,28 @@
 
    VA-DistSeconds-VoteSeconds: The authorities exchange votes.
 
+   VA-DistSeconds-VoteSeconds/2: The authorities try to download any
+   votes they don't have.
+
    VA-DistSeconds: The authorities calculate the consensus and exchange
    signatures.
 
+   VA-DistSeconds/2: The authorities try to download any signatures
+   they don't have.
+
    VA: All authorities have a multiply signed consensus.
 
    VA ... FU: Caches download the consensus.
 
    FU: The consensus is no long the freshest consensus.
 
+   FU ... VU: Clients download the consensus.
+
    VU: The consensus is no longer valid.
 
+   VoteSeconds and DistSeconds MUST each be at least 20 seconds; FU-VA and
+   VU-FU MUST each be at least 5 minutes.
+
 2. Router operation and formats
 
    ORs SHOULD generate a new router descriptor and a new extra-info

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-10-11 16:06:37 UTC (rev 11867)
+++ tor/trunk/src/or/config.c	2007-10-11 16:06:42 UTC (rev 11868)
@@ -3025,7 +3025,7 @@
   if (options->V3AuthNIntervalsValid < 2)
     REJECT("V3AuthNIntervalsValid must be at least 2.");
 
-  if (options->V3AuthVotingInterval < 300) {
+  if (options->V3AuthVotingInterval < MIN_VOTE_INTERVAL) {
     REJECT("V3AuthVotingInterval is insanely low.");
   } else if (options->V3AuthVotingInterval > 24*60*60) {
     REJECT("V3AuthVotingInterval is insanely high.");

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2007-10-11 16:06:37 UTC (rev 11867)
+++ tor/trunk/src/or/or.h	2007-10-11 16:06:42 UTC (rev 11868)
@@ -2886,11 +2886,11 @@
 
 /********************************* dirvote.c ************************/
 
-/* XXXX020 enforce */
-/* XXXX020 document in dir-spec.txt */
-/*DOCDOC*/
+/** Lowest allowable value for VoteSeconds. /*
 #define MIN_VOTE_SECONDS 20
+/** Lowest allowable value for DistSeconds. */
 #define MIN_DIST_SECONDS 20
+/** Smallest allowable voting interval. */
 #define MIN_VOTE_INTERVAL 300
 
 void dirvote_free_all(void);



More information about the tor-commits mailing list