Clients don't use optimistic data to fetch their first consensus, because we told them to ask the consensus whether they should
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 legacy/trac#18809 (moved)).
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.