[metrics-bugs] #33617 [Core Tor/Tor]: Add a BandwidthStatistics option and consensus parameter

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Mar 20 12:52:38 UTC 2020


#33617: Add a BandwidthStatistics option and consensus parameter
-------------------------------------------+-------------------------------
 Reporter:  teor                           |          Owner:  MrSquanchee
     Type:  enhancement                    |         Status:  needs_review
 Priority:  Medium                         |      Milestone:  Tor:
                                           |  0.4.4.x-final
Component:  Core Tor/Tor                   |        Version:
 Severity:  Normal                         |     Resolution:
 Keywords:  prop313, ipv6, outreachy-ipv6  |  Actual Points:
Parent ID:  #33052                         |         Points:  1
 Reviewer:                                 |        Sponsor:  Sponsor55-can
-------------------------------------------+-------------------------------

Comment (by teor):

 Here's a good example of a function that checks an option and a consensus
 parameter:
 https://github.com/torproject/tor/blob/44f92e8e4278403b9e633668f8be70f197b6e8db/src/core/or/dos.c#L154

 You shouldn't need to worry about when the consensus arrives.
 networkstatus_get_param() handles that for you.

 The tricky part will be turning statistics on and off based on the
 parameter. I suggest you collect the statistics if:
 * the BandwidthStatistics option is on (1), or
 * the BandwidthStatistics option is auto (-1).

 And then you only put the statistics in the extra-info if:
 * the BandwidthStatistics option is on (1), or
 * the BandwidthStatistics option is auto (-1), and the consensus parameter
 is on (1).

 So it looks like you'll need two new functions, one for collecting the
 statistics, and another for submitting them.

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


More information about the metrics-bugs mailing list