[tor-bugs] #14881 [Tor]: incorrect defaults when producing bandwidth-weights line in directory footer

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 12 22:05:08 UTC 2015


#14881: incorrect defaults when producing bandwidth-weights line in directory
footer
------------------------+----------------------------------
 Reporter:  robgjansen  |          Owner:
     Type:  defect      |         Status:  new
 Priority:  normal      |      Milestone:
Component:  Tor         |        Version:  Tor: unspecified
 Keywords:              |  Actual Points:
Parent ID:              |         Points:
------------------------+----------------------------------
 When running Tor in small testing networks, much of the time the
 bandwidth-weights line does not appear in the directory-footer in the
 consensus files. The log file shows messages like this:

 {{{
 Consensus with empty bandwidth: G=852123 M=0 E=0 D=569253 T=1421376
 }}}

 The code that counts up these bandwidth values is in
 `networkstatus_compute_consensus` in `dirvote.c`, specifically around
 [https://gitweb.torproject.org/tor.git/tree/src/or/dirvote.c#n1590 line
 1590 in Tor master as of now].

 The code that prints this error is in
 `networkstatus_compute_bw_weights_v10` in `dirvote.c`.

 I believe that it is an error not to produce bandwidth-weights in the
 event that we have no knowledge of bandwidth for a given position. For
 example, if D is zero because there are no nodes that serve as
 exits+guards, shouldn't we just adjust the weights accordingly? We may
 still have functional guards and functional exits just because we have no
 node that serves as both.

 Since this is for weighting purposes, why are T, D, E, G, and M all
 initialized to 0 instead of 1? I think the default weight should be 1,
 meaning all positions are selected equally, and any bandwidth above 1
 should be used to increase the weight. Does this sound right?

 If that is not desired, then I request that we at least initialize these
 values to one for testing networks. One patch is attached for each of
 these options.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14881>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list