Don't assign a high bandwidth weight to Authorities
tl;dr: dizum has a consensus weight of 18000 right now, which is silly because it means it's overloaded doing non dir auth things, which is in turn making it bad at doing dir auth things.
Background:
In the beginning, we invented the "MaxAdvertisedBandwidth" config option to let relays limit the amount of attention they would get from clients for ordinary circuit roles. Directory authorities used (and still use) this config option to leave most of their bandwidth for their dir auth functions.
But then the bwauth design came along, and suddenly you could get assigned a high consensus weight even if your descriptor claims a low rate limit.
So we put some hack in place to avoid giving high weights to relays with the Authority flag. I don't remember which hack it was -- whether bwauth stopped measuring or expressing opinions about those relays, whether authorities skipped over weights in the bw file if they're for Authorities, or what.
But we seem to have lost that hack now, or maybe I dreamed it and we never had it in the first place. In any case, I think we want one again/now. Here are two ways we could implement it:
- In C-Tor. For example, in routerstatus_format_entry() where we do:
if (format == NS_V3_VOTE && vrs && vrs->has_measured_bw) {
smartlist_add_asprintf(chunks,
" Measured=%d", vrs->measured_bw_kb);
}
we could add "&& !rs->is_authority" to that if.
- In sbws, we avoid measuring relays with the Authority flag, or we measure them but we don't put an opinion into the V3BandwidthsFile, or something similar. [Edit: turns out there's a ticket for that idea! tpo/network-health/onbasca#62]
I would slightly favor doing the check in Tor rather than sbws, (a) so sbws doesn't need to grow more complexity and surface area about what should get measured and what shouldn't, and (b) so I don't open another ticket like this in five years talking about a missing feature in sbws's successor.
See #3023 (closed) for the much bigger issue.