So while the title of ticket #8435 (moved) says "Ignore advertised bandwidths for flags once we have enough measured bandwidths", the ChangeLog entry is more accurate:
- Directory authorities that have more than a threshold number of relays with measured bandwidths now treat relays with unmeasured bandwidths as having bandwidth 0. Resolves ticket 8435.
We should at some point actually do the original goal, which is to give Fast to the 7/8s of relays whose consensus weights are highest, and Guard to the 1/2 of relays whose consensus weights are highest and who match the other guard constraints.
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.
One suggestion is to look at the previous consensus, and use the number out of it, if we don't have a measurement of our own.
There are two versions of that idea: one is that we use the consensus weight iff we don't run a bwauth, and the other is that we use the consensus weight if we don't run a bwauth or if we do but haven't measured that relay yet. I'm ok with either, but the former sounds a bit cleaner.
I just pushed some more commits that refactor that function and comment it better. They're in my 'ticket11327' branch.
(I think they are on top of tvdw's latest branch, but somebody should check it to be sure.)
And now that I've refactored it, a question becomes clearer:
if (node->rs && node->rs->bandwidth_kb) {+ /* Case 3: Not running a bwauth, and we know a weight from the+ * consensus. Use that one (so e.g. we won't vote Fast on a relay+ * that the consensus has given very low weight to). */ bw_kb = node->rs->bandwidth_kb; }
Is the 'if' part the right way to check that we have a consensus? It seems like "we have a consensus but it lists this relay's weight as 0" will be mistaken as "no we don't have a consensus". Nick did the ri, rs, etc refactorings long ago, so he is the perfect person to answer/improve this part.
And then once we're set there, I could imagine another refactoring where we take out the bw_kb variable and just do a 'return' for each case.
Trac: Status: needs_review to needs_revision Severity: N/Ato Normal
A while ago someone (I think arma/nickm) mentioned we should look into whether we can simply disable Fast/Guard voting if an authority doesn't have enough measurements yet.
After implementing this thought and testing it it turns out this may not be a good idea: the network would lose all fast/guard flags if there are insufficient bandwidth authorities. Also, Chutney would stop working.
I think this is better handled on a consensus method level, or we could choose to get rid of the Fast flag completely and have the client determine it instead.
In any case, I think having the authorities take data from a previous consensus is not the correct solution to this problem.
Quick update from IRC: we talked about alternatives and one thing that came up is to have the consensus generation process take care of this instead, as only there do we have enough information to make the right call about whether to take from all bandwidth authorities or only the ones with bandwidth scanners.
This would effectively introduce first and second class dirauths: first class dirauths vote for these flags, and the second class dirauths' opinion only counts if there aren't enough voters around.