[tor-bugs] #8273 [Tor]: Set flag thresholds and flags based on measured bandwidth

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 28 04:01:00 UTC 2013


#8273: Set flag thresholds and flags based on measured bandwidth
----------------------+-----------------------------------------------------
 Reporter:  nickm     |          Owner:                    
     Type:  defect    |         Status:  needs_revision    
 Priority:  critical  |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor       |        Version:                    
 Keywords:  tor-auth  |         Parent:                    
   Points:            |   Actualpoints:                    
----------------------+-----------------------------------------------------
Changes (by nickm):

  * status:  needs_review => needs_revision


Comment:

 Quick notes:
   * The "/* Check if we cleared the whole thing and free if so */" seems
 unnecessary.  dirserv_clear_measured_bw_cache will free this eventually,
 right?
   * In case time is unsigned, the expiry check should be something like
 "e->as_of < now - MX_MEASUREMENT_TIME". This might also help the compiler
 raise the computation. (Not that it matters.)
   * We should be calling dirserv_clear_measured_bw_cache from
 dirserv_free_all.
   * Would DIGESTMAP_FOREACH_MODIFY and DIGESTMAP_FOREACH_MODIFY_END make
 the expiry function easier to write?
   * The node_id argument for dirserv_query_measured_bw_cache should
 probably be const.  The documentation for that function should explain
 what the return value means, and what exactly happens to the *_out
 variables.
   * dirserv_get_bandwidth_for_router should take a const routerinfo
   * I think dirserv_cache_measured_bw should take a const parsed_line.

 And an issue of medium trickiness:
   * It would be cool to have some unit tests for the new machinery here.

 And a trickier issue:
   * When we have a sufficient number/fraction of nodes with measured
 bandwidth, I think we should stop believing nodes' advertised bandwidths.
 That is, if the number/fraction of measured nodes is high enough, then we
 should *never* call unmeasured nodes Fast, or Guard, or HSDir, or anything
 else that depends on bandwidth.  (Plausible?)

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


More information about the tor-bugs mailing list