Opened 14 months ago
Last modified 14 months ago
#24837 new enhancement
Allow Relay Searches for Additional Flags
Reported by: | teor | Owned by: | metrics-team |
---|---|---|---|
Priority: | Medium | Milestone: | |
Component: | Metrics/Onionoo | Version: | |
Severity: | Normal | Keywords: | |
Cc: | Actual Points: | ||
Parent ID: | Points: | ||
Reviewer: | Sponsor: |
Description
I just tried to search for all the FallbackDirs on Relay Search to find out if they had been updated.
But I didn't get any results with a simple search: "flag:FallbackDir".
And the Advanced Search doesn't have the additional flags as options.
Child Tickets
Change History (5)
comment:1 Changed 14 months ago by
Component: | Metrics/Relay Search → Metrics/Onionoo |
---|
comment:2 Changed 14 months ago by
Type: | defect → enhancement |
---|
comment:3 Changed 14 months ago by
Fallback directories are a special case, because Onionoo doesn't even have this data. We'd have to add the data first before adding this additional flag to search parameters.
The other additional flags would be easier. Would you mind adding a list and precise specification for each of them here?
comment:4 Changed 14 months ago by
I'll add a list and outline a plan for making individual tickets for these.
comment:5 Changed 14 months ago by
The following flags are synthesised by Relay Search:
Flag | Description |
---|---|
NotRecommended | This relay is running a version of tor that is not recommended by the directory authorities |
Unmeasured | This relay has not been measured by at least 3 bwauths |
Hibernating | This relay indicated that it is hibernating in its last known descriptor |
FallbackDir | This relay is listed as a fallback directory in the tor source code |
ReachableIPv6 | This relay has been confirmed as reachable via IPv6 in the consensus |
UnreachableIPv4 | This relay was not reachable on at least one IPv4 address published in the server descriptor |
UnreachableIPv6 | This relay was not reachable on at least one IPv6 address published in the server descriptor |
IPv6 Exit | This relay allows exit connections to IPv6 hosts |
The relevant code in Relay Search is:
/* Synthetic Additional Flags */ var additional_flags = [] if (!((typeof relay.recommended_version !== 'undefined') ? relay.recommended_version : true)) additional_flags.push("Not Recommended"); if (!((typeof relay.measured !== 'undefined') ? relay.measured : true)) additional_flags.push("Unmeasured"); if (((typeof relay.hibernating !== 'undefined') ? relay.hibernating : false)) additional_flags.push("Hibernating"); if (IsFallbackDir(relay.fingerprint)) additional_flags.push("FallbackDir"); if (relay.or_v6_addresses.length > 0) additional_flags.push("ReachableIPv6"); if (relay.unreachable_or_v4_addresses.length > 0) additional_flags.push("UnreachableIPv4"); if (relay.unreachable_or_v6_addresses.length > 0) additional_flags.push("UnreachableIPv6"); if (relay.exit_policy_v6_summary !== null) additional_flags.push("IPv6 Exit");
For the Onionoo protocol, I would prefer it if these flags are kept separate from the dir-spec flags in a new "additional_flags" field, but for searching it would be good to still have "flag:X" work. I don't know if this introduces a lot more complexity in Onionoo though.
Things that would need to be done as I understand it:
- Add a new "additional_flags" field to Onionoo's relay details documents
- Extend the "flag" parameter to also search in this new field, as well as the existing "flags" field
- Synthesise each of the flags:
- NotRecommended, Hibernating and Unmeasured are all based on boolean values already in the document
- ReachableIPv6, UnreachableIPv4 and UnreachableIPv6 will require checking the "or_addresses" and "unreachable_or_addresses" fields
- IPv6 Exit will require checking the exit policies
- FallbackDir will depend on #24436
Currently these are generated by Relay Search. We should move these into Onionoo so that other clients can benefit from them (e.g. metrics-bot) and so that searching works too.