In #2286 (moved) we're going to change directory authorities to say something like "w Bandwidth=100 Capped=1" for relays that don't have enough Measured lines.
Torflow's BWAuthority needs to learn not to get snookered by the 100 into thinking that the relay's peers are all the other "Bandwidth=100" relays.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
aagbsn: The change that needs to happen here is in the ConsensusTracker code. It calculates a consensus to descriptor ratio in _read_routers() for each router. Add some parsing code to pull out the "Capped" flag for routers, and those routers should get a hard-coded ratio of 1.0.
The RatioPercentileRestriction should then handle things as normal, without modifications.
You transform the ratio_r[i] object into an integer 1 for the capped case. This will cause explosions. Better than trying to hack the ratio_rank directly, you should alter the ratio_r sorting to use a Router.get_unmeasured_bw() method to return the NetworkStatus bw value instead of desc_bw if unmeasured is true... Then the ratio will work out to 1 that way.
You transform the ratio_r[i] object into an integer 1 for the capped case. This will cause explosions.
Wait? Do you mean ratio_rank? Isn't that supposed to be an integer? If not, what about TorCtl.py:1647
for i in xrange(len(ratio_r)): ratio_r[i].ratio_rank = i
Better than trying to hack the ratio_rank directly, you should alter the ratio_r sorting to use a Router.get_unmeasured_bw() method to return the NetworkStatus bw value instead of desc_bw if unmeasured is true... Then the ratio will work out to 1 that way.
w.groups(2) doesn't appear to do what you think it does. At least not in my python... I tested your regex in a shell your if statement always ends up true, regardless of if Capped=1 is present or not.
The consensus w keyword is ultimately going to be Unmeasured=1, not Capped=1. You need to update the regex for that, too.
I think this looks good. Merge it and be sure it starts running on a bw auth for a while, and verify those results seem sane?
Karsten has scripts for comparing the bw auth votes in the metrics repo somewhere. Perhaps he can point you at them. In the past, I've found them very useful for ensuring new bandwidth auth changes produced results in line with older code running on other bw auths.
Karsten has scripts for comparing the bw auth votes in the metrics repo somewhere. Perhaps he can point you at them. In the past, I've found them very useful for ensuring new bandwidth auth changes produced results in line with older code running on other bw auths.
Trac: Summary: bwauths learn to recognize Capped=1 in consensus line and treat it differently to bwauths learn to recognize Unmeasured=1 in consensus line and treat it differently