Browse Source

Modify fallback stability requirements

Increase the fallback stability requirement to 30 days.
When this was at 7 days, we chose far too many unstable fallbacks.

Decrease the guard flag requirement to 0.8.
When this was at 0.9, we lost too many fallbacks due to version upgrades.
(The running and v2dir flags ensure DirPorts are available to clients.)

Partial fixes to #20913.
teor 7 years ago
parent
commit
71b79d6bf3
2 changed files with 13 additions and 2 deletions
  1. 7 0
      changes/bug20913
  2. 6 2
      scripts/maint/updateFallbackDirs.py

+ 7 - 0
changes/bug20913

@@ -0,0 +1,7 @@
+  o Minor bugfixes (fallbacks):
+    - Make sure fallback directory mirrors have the same address, port, and
+      relay identity key for at least 30 days before they are selected.
+      Partial fix to 20913, bugfix on 0.2.8.1-alpha.
+    - Decrease the guard flag average required to be a fallback. This allows
+      us to keep relays that have their guard flag removed when they restart.
+      Partial fix to 20913, bugfix on 0.2.8.1-alpha.

+ 6 - 2
scripts/maint/updateFallbackDirs.py

@@ -154,20 +154,24 @@ MAX_LIST_FILE_SIZE = 1024 * 1024
 ## Eligibility Settings
 
 # Require fallbacks to have the same address and port for a set amount of time
+# We used to have this at 1 week, but that caused many fallback failures, which
+# meant that we had to rebuild the list more often.
 #
 # There was a bug in Tor 0.2.8.1-alpha and earlier where a relay temporarily
 # submits a 0 DirPort when restarted.
 # This causes OnionOO to (correctly) reset its stability timer.
 # Affected relays should upgrade to Tor 0.2.8.7 or later, which has a fix
 # for this issue.
-ADDRESS_AND_PORT_STABLE_DAYS = 7
+ADDRESS_AND_PORT_STABLE_DAYS = 30
 # We ignore relays that have been down for more than this period
 MAX_DOWNTIME_DAYS = 0 if MUST_BE_RUNNING_NOW else 7
 # What time-weighted-fraction of these flags must FallbackDirs
 # Equal or Exceed?
 CUTOFF_RUNNING = .90
 CUTOFF_V2DIR = .90
-CUTOFF_GUARD = .90
+# Tolerate lower guard flag averages, as guard flags are removed for some time
+# after a relay restarts
+CUTOFF_GUARD = .80
 # What time-weighted-fraction of these flags must FallbackDirs
 # Equal or Fall Under?
 # .00 means no bad exits