[tor-bugs] #18624 [Tor]: Dir auths should only give Guard if Stable and Fast

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Mar 24 18:48:04 UTC 2016


#18624: Dir auths should only give Guard if Stable and Fast
-----------------------------+-----------------
     Reporter:  arma         |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  Medium       |  Milestone:
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |   Reviewer:
      Sponsor:               |
-----------------------------+-----------------
 {{{
 $ grep "^s " cached-consensus |grep Guard|wc -l
 2074
 $ grep "^s " cached-consensus |grep Guard|grep -v Stable|wc -l
 18
 $ grep "^s " cached-consensus |grep Guard|grep -v Fast|wc -l
 0
 }}}

 So right now, out of the 2074 Guards that we have, every one of them has
 the Fast flag, and all but 18 of them have the Stable flag.

 At the same time, we have some complicated logic in
 choose_random_entry_impl() and populate_live_entry_guards() that looks at
 need_uptime (aka Stable) and need_capacity (aka Fast), including ugly code
 like
 {{{
     if (!node && need_uptime) {
       need_uptime = 0; /* try without that requirement */
       goto retry;
     }
     if (!node && need_capacity) {
       /* still no? last attempt, try without requiring capacity */
       need_capacity = 0;
       goto retry;
     }
 }}}

 But worst of all, it produces this weird edge case for the small fraction
 of unlucky clients who picked a non-Stable Guard, since when they build
 circuits that require the Stable flag, they will always use their second
 Guard for those circuits.

 In short, this is complexity that is cheap to get rid of. Let's do it.

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


More information about the tor-bugs mailing list