[metrics-team] bridge count: metrics.tpo vs. onionoo.tpo

Karsten Loesing karsten at torproject.org
Mon Sep 11 18:18:45 UTC 2017


Hi nusenu,

On 2017-09-11 19:42, nusenu wrote:
> Hi Karsten,
> 
> Karsten Loesing:
>> By default, Onionoo includes bridges that are not currently running but
>> that have been running in the past week. The idea is that relay/bridge
>> operators should be able to find their relay/bridge even when it's
>> offline for a short moment.
> 
> 
> yes I was also filtering for running bridges only (after parsing the
> entire details file), but it gets even more exciting here:
> 
> https://onionoo.torproject.org/details?type=bridge&running=true&limit=0
> 
> {"version":"4.1",
> "relays_published":"2017-09-11 16:00:00",
> "relays":[
> ],
> "bridges_published":"2017-09-11 14:43:34",
> "bridges":[
> ],
> "bridges_truncated":3650}
> 
> --> 3650 running.
> 
> my python script says 5462 are running (mismatch 5462 vs 3650)
> so I cross checked this with a very simple grep:
> 
> 
> Download _all_ bridge entries (no running filter):
> 
> https://onionoo.torproject.org/details?type=bridge
> 
> 
> grep  ',"running":true,"' details.json |wc -l
> 5462
> 
> (note: the json file contains only briges 0 relays, otherwise this grep
> would give you incorrect results due to relay entries also matching)
> 
> also: downloading all running bridges (no limit parameter) records gives
> you 3647 (not 3650) bridges.
> 
> Is there anything wrong with that simple grep (and my python) or is
> onionoo's running=true wrong?

Huh, I think you found a bug.

It might be that we're using two different definitions for "running":

 - The "running=false" parameter checks whether a bridge is contained in
the latest known status *and* has the "Running" flag assigned.

https://gitweb.torproject.org/onionoo.git/tree/src/main/java/org/torproject/onionoo/writer/SummaryDocumentWriter.java#n83

 - The "running" field in details documents only checks whether a bridge
is contained in the latest known status but ignores whether it got the
"Running" flag there or not.

https://gitweb.torproject.org/onionoo.git/tree/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java#n866

We should probably use the first definition and also require the
"Running" flag before calling a bridge "running".

Let's move this issue to Trac.

Good catch!

All the best,
Karsten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/metrics-team/attachments/20170911/4bdd457b/attachment.sig>


More information about the metrics-team mailing list