[tor-bugs] #18815 [Tor]: Clients don't use optimistic data to fetch their first consensus, because we told them to ask the consensus whether they should

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 14 02:22:31 UTC 2016


#18815: Clients don't use optimistic data to fetch their first consensus, because
we told them to ask the consensus whether they should
------------------------+--------------------------
     Reporter:  arma    |      Owner:
         Type:  defect  |     Status:  new
     Priority:  Medium  |  Milestone:  Tor: 0.2.???
    Component:  Tor     |    Version:
     Severity:  Normal  |   Keywords:  029-proposed
Actual Points:          |  Parent ID:
       Points:          |   Reviewer:
      Sponsor:          |
------------------------+--------------------------
 {{{
 static int
 optimistic_data_enabled(void)
 {
   const or_options_t *options = get_options();
   if (options->OptimisticData < 0) {
     /* XXX023 consider having auto default to 1 rather than 0 before
      * the 0.2.3 branch goes stable. See bug 3617. -RD */
     const int32_t enabled =
       networkstatus_get_param(NULL, "UseOptimisticData", 0, 0, 1);
     return (int)enabled;
   }
   return options->OptimisticData;
 }
 }}}

 OptimisticData is "auto" by default, aka -1, so we look at
 networkstatus_get_param, but since there *is* no consensus on first boot,
 we pick 0.

 For one, this means we're opting not to save a round-trip on the Tor
 user's first bootstrap (the one where they judge Tor first).

 For another, it would seem that we're telling the directory mirror whether
 this is our first bootstrap, because all the other clients do it
 differently.

 For three, it increases the set of possible behaviors by normal clients
 that we need to consider during bootstrapping, which is how I found it
 (working on #18809).

 We should make it default default to 1 when there's no consensus.

 See https://trac.torproject.org/projects/tor/ticket/3617#comment:8 where
 it seems I looked into the future and saw this bug coming.

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


More information about the tor-bugs mailing list