[tor-bugs] #22312 [Core Tor/Tor]: Refactor/Simplify to clarify "we cache dir info" vs "we invite clients to use us as a directory guard"

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat May 20 08:27:48 UTC 2017


#22312: Refactor/Simplify to clarify "we cache dir info" vs "we invite clients to
use us as a directory guard"
------------------------------+--------------------------------
     Reporter:  arma          |      Owner:
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 I was trying to work on #21676, and I got lost in a twisty little maze of
 "router_should_be_directory_server" and "dir_server_mode" and
 "decide_to_advertise_dir_impl" and "decide_to_advertise_begindir" and
 "directory_caches_dir_info" and "directory_permits_begindir_requests" and
 etc.

 I think there are two main concepts here:

 * (1) Do we want to fetch all the directory info that a directory mirror
 would fetch? (If we do, we should cache it, and we might as well serve
 it.)

 * (2) Do we want to invite clients to use us as their directory mirror?
 (Whether clients actually do use us is up to whether the directory
 authorities tell them to.)

 For (1), a lot of relays already do the fetching, e.g. so they can answer
 connection_or_digest_is_known_relay(), so maybe we are really close to
 declaring that the answer for any relay is yes. (See also Proposal 237,
 where we thought we did this step.) That would sure simplify things.

 For (2), we're moving toward a world where only fallback mirrors and
 directory guards get asked these questions, so it's cheap to offer, since
 it's then up to the directory authorities to only take us up on it if they
 think we're a good fit.

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


More information about the tor-bugs mailing list