A Bridge Authority does not output its flag thresholds at any point, but this information is useful for debugging and general understanding. We can log these values, but then we will rely on direct access to the server, if this information is included in the network status, then it will be accessible to the people who need it. Credit goes to arma for the idea.
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.
I didn't see that a bridge auth took any code paths that called dirserv_compute_performance_thresholds(), so possibly not, which may actually be the cause of #1117 (moved), but I'll look into this further and confirm this is the case.
Please see bug9859_rebased in my public repo. This branch should actually solve #1117 (moved), also. The problem is that the bridge auth never computes the flag thresholds, so all bridges are at least as good as zero, unless they aren't good at all.
I successfully ran this overnight on a test bridge auth with a single test bridge uploading to it, but it can use more testing. Is this a good candidate for Chutney?
It looks plausible, except that we're trying to avoid the "x = tor_malloc(n); tor_snprintf(x, n, ...)" pattern in new code. Instead, use "tor_asprintf(&x, ...)".
Is this a good candidate for Chutney?
It could be, but you'd need to make your own torrc templates to do so. Linus or I can walk you through that if it isn't apparent how from the source and the readme.
Thanks for the comments! tor_asprintf is much better for this, I made that change. I also decided that the patch wasn't exactly what we want. It yielded the correct results, but it also changes the resulting output to the control port, which is less than ideal.
I pushed bug9859_rebased_2, which I think it a better patch.
Regarding Chutney, I hacked it a bit so it would do what I wanted, but overall it was a success.
I'm sorry, I'm running out of time before the weekend (7pm here, real life calling). I need to update metrics-db and test the changes a bit, or it might do unexpected things. I can do this on Monday. Please hold back this change until Tuesday or Wednesday. Will let you know here when metric-db is ready.
The bridgedb parser will happily ignore this, so that won't be an issue.
Karsten, would it be better if we moved the threshold line to the end? There's no rush to merge this immediately (it looks like Tonga is running -rc, so we probably won't be able to start collecting this info for a few months).
Karsten, would it be better if we moved the threshold line to the end?
No, at the start is fine.
There's no rush to merge this immediately (it looks like Tonga is running -rc, so we probably won't be able to start collecting this info for a few months).
Understood. Though I'd want to prepare metrics-db now, rather than being surprised by Tonga upgrading. But preparing metrics-db shouldn't be hard, I just need to sit down for a moment to think about any potential problems.
And here's one such problem: your new line should start with "flag-thresholds ", or we'll have a hard time parsing it once we decide to add more lines, or when we decide we want to remove the "stable-uptime" part. Can you add that keyword? Like:
Oh, and just to be sure: there is nothing sensitive in that line, so that it can be copied as is into sanitized descriptors, right?
We should also ask atagar for his thoughts on the new line, because he'll have to extend stem to support this new line in sanitized bridge network statuses. atagar, do you see any problems with this new line, or do you have suggestions for making it easier to parse (in addition to my suggestion to prefix the line with a keyword)?
This absolutely should have a prefix keyword, like everything else in consensus (otherwise this line will require special handling). Would you mind making the spec addition first? I'm not entirely clear from this backlog what precisely you're adding but it sounds akin to the 'params' keyword (but with string rather than numeric values). Parsers need a formal definition of what both the keys and values can include.
atagar, sorry, I might not have given you enough context. This is an addition to bridge network statuses, not consensuses. Also note that this line is very similar to the flag-thresholds line in votes which has a spec definition.
I just wrote "very similar to", because I didn't check in detail before. Just checked that it's "exactly the same as" once the line starts with "flag-thresholds".
Bridge network status documents are not part of dir-spec.txt. They are like v2 network statuses (or even v3 consensuses?) but without header and footer. I added the "published" part to the start of sanitized bridge network statuses to make them easier to handle, but that part is not contained in the non-sanitized statuses.
They are like v2 network statuses (or even v3 consensuses?)
This actually seems like an important detail since it determines the type of router status entry. Presently stem treats them as v2.
I added the "published" part to the start of sanitized bridge network statuses to make them easier to handle, but that part is not contained in the non-sanitized statuses.
I treated 'published' as a mandatory field since the metrics page is the closest thing we have to a spec (and it says it's included). If this is a more generic descriptor type then it should probably be part of the dir-spec, otherwise my perception is that this is a metrics-specific type of descriptor.
They are like v2 network statuses (or even v3 consensuses?)
This actually seems like an important detail since it determines the type of router status entry. Presently stem treats them as v2.
What's the difference between v2 and v3 router status entries?
I added the "published" part to the start of sanitized bridge network statuses to make them easier to handle, but that part is not contained in the non-sanitized statuses.
I treated 'published' as a mandatory field since the metrics page is the closest thing we have to a spec (and it says it's included). If this is a more generic descriptor type then it should probably be part of the dir-spec, otherwise my perception is that this is a metrics-specific type of descriptor.
Fine to perceive this as metrics-specific type of descriptor.
But regardless of dir-spec or not, it seems that we're on the safe side by adding the "flag-thresholds" keyword to make the new line exactly the same as in v3 votes.
sysrqb, can you add that keyword? And do you agree that this line can be copied as is into sanitized bridge network statuses?
What's the difference between v2 and v3 router status entries?
V3 adds the or-address, bandwidth, measured, flag to indicate if unmeasured, microdescriptor hashes, and (most important) the relay's microdescriptor exit policy. Maybe none of those are especially important for bridges.
But regardless of dir-spec or not, it seems that we're on the safe side by adding the "flag-thresholds" keyword to make the new line exactly the same as in v3 votes.
sysrqb, can you add that keyword?
Yeah, adding this sounds like a good plan. I admit I hadn't thought about this, but I'll add the prefix.
And do you agree that this line can be copied as is into sanitized bridge network statuses?
I'm hesitant to say this should be public, but I want arma's and nick's input on this. BridgeDB doesn't really take advantage of the status flags, except for supplying stable bridges, so it shouldn't affect bridge distribution now. I'm less certain this will be true in the future or if public availability could have negative consequences. otoh, this info will be good for metrics, so we should maintain an archive...so maybe they should remain unsanitized.
What's the difference between v2 and v3 router status entries?
V3 adds the or-address, bandwidth, measured, flag to indicate if unmeasured, microdescriptor hashes, and (most important) the relay's microdescriptor exit policy. Maybe none of those are especially important for bridges.
Yeah, none of those are included in this Bridge networkstatus. Right now, it is exactly the same as the output returned from a NEWCONSENSUS event or NS event. This patch will simply prepend an additional line with the flag threshold values for bridges (but only when this networkstatus is created by the Bridge Auth).
And do you agree that this line can be copied as is into sanitized bridge network statuses?
I'm hesitant to say this should be public, but I want arma's and nick's input on this. BridgeDB doesn't really take advantage of the status flags, except for supplying stable bridges, so it shouldn't affect bridge distribution now. I'm less certain this will be true in the future or if public availability could have negative consequences. otoh, this info will be good for metrics, so we should maintain an archive...so maybe they should remain unsanitized.
There's also the rule of thumb that we shouldn't use data that we don't make public. If something is too sensitive to publish, we shouldn't collect it.
But I don't see a reason for redacting these lines. The only thing that we're trying to hide from the public is bridge IP addresses. I don't see how flag thresholds would make it any easier to find bridge IP addresses.
There's also the rule of thumb that we shouldn't use data that we don't make public. If something is too sensitive to publish, we shouldn't collect it.
Ok, I agree. That's a good rule and we should follow it for this.
But I don't see a reason for redacting these lines. The only thing that we're trying to hide from the public is bridge IP addresses. I don't see how flag thresholds would make it any easier to find bridge IP addresses.
True, I only worried that, in the future, these threshold values will allow an operator to manipulate or game BridgeDB or one of the distributors, but I agree that preventing this via obscurity is not a way to solve this problem.
Pushed bug9859_5 based on master, which adds the keyword.
Any other thoughts?
Isis, sorry to bring you into this so late.
Trac: Status: needs_revision to needs_review Cc: arma, karsten, atagar to arma, karsten, atagar, isis