Add fields and parameters to Onionoo to search for disappearing or newly joining relays
We should add the information when a relay first joined the Tor network and when it was last seen online. When combined with search parameters, a community manager person could detect any disappearing or newly joining relays and contact relay operators.
Step 1 is to add two new fields
last_seen to details files. They would contain the timestamps of the first/last consensus (bridge status) that contained the relay (bridge). Once we have that, we can look for relays that have been inactive for up to 7 days (after which they drop out of Onionoo's data) or for relays that have been first seen in the past 7 days. Due to the current design of Onionoo's data storage, a relay that disappears for over a week and returns will have
first_seen set to the consensus when it first reappeared.
Step 2 is to extend Onionoo's database to store relays that are inactive for a longer time, too. We'd have to import all the descriptor archives to get the
first_seen field of very old relays right, but that's fine.
Step 3 is to add new parameters
first_seen_days which accept a number or a range. If one passes "-7" to
last_seen_days, that would means "last seen in last 7 days" which is the current default. "7" or "7-" could stand for "last seen 7 days ago or longer", "7-14" for "between 7 and 14 days in the past", etc.
Once we have these fields and parameters, we can extend #6329 (moved) or Atlas to make use of them.