[tor-bugs] #27135 [Core Tor/sbws]: Write descriptor bandwidths average in raw results

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 16 01:04:27 UTC 2018


#27135: Write descriptor bandwidths average in raw results
---------------------------+-------------------------------------
 Reporter:  juga           |          Owner:  juga
     Type:  defect         |         Status:  assigned
 Priority:  Medium         |      Milestone:  sbws 1.0 (MVP must)
Component:  Core Tor/sbws  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:  #27108         |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+-------------------------------------

Comment (by teor):

 Replying to [comment:2 juga]:
 > i'm not sure we should get it every hour, i haven't find yet how
 frequently torflow does.
 > Teor, do you know it?

 We need to design sbws timings to match the Tor network.
 (If torflow gets it wrong, or is outdated, we want to get it right.)

 Relays running recent Tor releases (with #23856) update their descriptor
 bandwidths every 3-18 hours. After #24104 merges, most relays will update
 their descriptor bandwidths every 12-18 hours, but new relays will update
 every 3-18 hours.

 {{{
    ORs SHOULD generate a new server descriptor and a new extra-info
    document whenever any of the following events have occurred:

       ...

       - Its uptime is less than 24h and bandwidth has changed by a factor
 of 2
         from the last time a descriptor was generated, and at least a
 given
         interval of time (3 hours by default) has passed since then.

       ...

    ORs SHOULD NOT publish a new server descriptor or extra-info document
    if none of the above events have occurred and not much time has passed
    (12 hours by default).
 }}}

 https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n354

 Once a relay uploads its descriptor, the authorities include it in the
 next consensus. Descriptor updates in the consensus can take 10 minutes
 (the voting period) to 18 hours (the descriptor expiry period for the last
 descriptor).

 The consensus is produced every 30 minutes or 1 hour. Then clients
 download the consensus from directory mirrors, which download from
 authorities.

 Each consensus may include some new descriptors. When a client gets a
 consensus with unknown descriptors, it can take a few minutes for it to
 download those descriptors from one of its directory mirrors.

 So sbws can update descriptors:
 * as descriptors arrive, via control events (as starlight says, that's how
 torflow does it), or
 * a few minutes after every consensus arrives, or
 * every 30 minutes to 1 hour, at a randomly chosen time.

 Do whatever is easiest. Using an old descriptor is ok here.

 Replying to [comment:5 pastly]:
 > I downloaded your sbws datadir and wrote a little script to print how
 often a relay has a list of saved `relay_average_bandwidth` containing
 more than one unique element.
 >
 > It found that 1868/7999 relays had `relay_average_bandwidth` values that
 weren't all the same (118/7326 if you only look at success results). I'm
 guessing relays don't update this value in their descriptors very often.

 I don't know the period covered by juga's sbws datadir. But these figures
 seem reasonable for a few hours' consensuses: 1/18 * 7999 = 444.

 If the datadir covers days, maybe sbws is losing descriptor updates?

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


More information about the tor-bugs mailing list