[tor-commits] [torspec/master] Allowing for new 'bandwidth-weights' entries

nickm at torproject.org nickm at torproject.org
Wed May 22 18:38:20 UTC 2013


commit ec3eaca6da9dfc3232eb11865e60b59bd41297e3
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Sep 19 07:34:01 2012 -0700

    Allowing for new 'bandwidth-weights' entries
    
    Mike has expressed on ticket #6872 and irc that he based bandwidth-weights
    after the 'params' entry and would like new bandwidth-weights to be permitted.
    Changing the spec as follows...
    
    - Allowing for unspecified new 'Keyword=Int32' pairs, keeping the 'params'
      requrement that they're sorted.
    
    - Making all values optional, including the current ones. This is a change, but
      will give Mike greater flexability and avoid creating a headache of 'these
      weights are mandatory in consensus-method X and these other are mandatory in
      consensus-method Y'.
---
 dir-spec.txt |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/dir-spec.txt b/dir-spec.txt
index 4427035..3030e12 100644
--- a/dir-spec.txt
+++ b/dir-spec.txt
@@ -1327,7 +1327,7 @@
         enough votes were counted for the consensus for an authoritative
         opinion to have been formed about their status.
 
-    "params" SP [Parameters] NL
+    "params" [SP Parameters] NL
 
         [At most once]
 
@@ -1594,16 +1594,16 @@
    The bandwidths-weights line appears At Most Once for a consensus. It does
    not appear in votes.
 
-    "bandwidth-weights" SP
-       "Wbd=" INT SP "Wbe=" INT SP "Wbg=" INT SP "Wbm=" INT SP
-       "Wdb=" INT SP
-       "Web=" INT SP "Wed=" INT SP "Wee=" INT SP "Weg=" INT SP "Wem=" INT SP
-       "Wgb=" INT SP "Wgd=" INT SP "Wgg=" INT SP "Wgm=" INT SP
-       "Wmb=" INT SP "Wmd=" INT SP "Wme=" INT SP "Wmg=" INT SP "Wmm=" INT NL
+    "bandwidth-weights" [SP Weights] NL
 
-       These values represent the weights to apply to router bandwidths
-       during path selection. Values are divided by the consensus'
-       "bwweightscale" param. Definition of our entries are...
+       Weight ::= Keyword '=' Int32
+       Int32 ::= A decimal integer between -2147483648 and 2147483647.
+       Weights ::= Weight | Weights SP Weight
+
+       List of optional weights to apply to router bandwidths during path
+       selection. They are sorted in lexical order (as ASCII byte strings) and
+       values are divided by the consensus' "bwweightscale" param. Definition
+       of our known entries are...
 
          Wgg - Weight for Guard-flagged nodes in the guard position
          Wgm - Weight for non-flagged nodes in the guard Position





More information about the tor-commits mailing list