diff options
-rw-r--r-- | changes/fallbacks-201612 | 6 | ||||
-rwxr-xr-x | scripts/maint/updateFallbackDirs.py | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/changes/fallbacks-201612 b/changes/fallbacks-201612 index 0306ad1fa3..e0e412c096 100644 --- a/changes/fallbacks-201612 +++ b/changes/fallbacks-201612 @@ -16,6 +16,12 @@ - Exclude relays affected by 20499 from the fallback list. Exclude known affected versions, and any relay that delivers a stale consensus. Closes ticket 20539. + - Require fallbacks to have flags for 90% of the time (weighted decaying + average), rather than 95%. This allows at least 73% of clients to + bootstrap in the first 5 seconds without contacting an authority. + Part of ticket 18828. + - Display the fingerprint when downloading consensuses from fallbacks. + Closes ticket 20908. o Minor bugfix (fallback directories): - Stop failing when OUTPUT_COMMENTS is True in updateFallbackDirs.py. Closes ticket 20877; bugfix on commit 9998343 in tor-0.2.8.3-alpha. diff --git a/scripts/maint/updateFallbackDirs.py b/scripts/maint/updateFallbackDirs.py index 40b0056987..df5f049e34 100755 --- a/scripts/maint/updateFallbackDirs.py +++ b/scripts/maint/updateFallbackDirs.py @@ -1127,14 +1127,15 @@ class Candidate(object): # log how long it takes to download a consensus from dirip:dirport # returns True if the download failed, False if it succeeded within max_time @staticmethod - def fallback_consensus_download_speed(dirip, dirport, nickname, max_time): + def fallback_consensus_download_speed(dirip, dirport, nickname, fingerprint, + max_time): download_failed = False start = datetime.datetime.utcnow() # some directory mirrors respond to requests in ways that hang python # sockets, which is why we log this line here - logging.info('Initiating %sconsensus download from %s (%s:%d).', + logging.info('Initiating %sconsensus download from %s (%s:%d) %s.', 'microdesc ' if DOWNLOAD_MICRODESC_CONSENSUS else '', - nickname, dirip, dirport) + nickname, dirip, dirport, fingerprint) # there appears to be about 1 second of overhead when comparing stem's # internal trace time and the elapsed time calculated here TIMEOUT_SLOP = 1.0 @@ -1171,9 +1172,9 @@ class Candidate(object): else: status = 'ok' level = logging.DEBUG - logging.log(level, 'Consensus download: %0.1fs %s from %s (%s:%d), ' + + logging.log(level, 'Consensus download: %0.1fs %s from %s (%s:%d) %s, ' + 'max download time %0.1fs.', elapsed, status, nickname, - dirip, dirport, max_time) + dirip, dirport, fingerprint, max_time) return download_failed # does this fallback download the consensus fast enough? @@ -1185,12 +1186,14 @@ class Candidate(object): ipv4_failed = Candidate.fallback_consensus_download_speed(self.dirip, self.dirport, self._data['nickname'], + self._fpr, CONSENSUS_DOWNLOAD_SPEED_MAX) if self.has_ipv6() and PERFORM_IPV6_DIRPORT_CHECKS: # Clients assume the IPv6 DirPort is the same as the IPv4 DirPort ipv6_failed = Candidate.fallback_consensus_download_speed(self.ipv6addr, self.dirport, self._data['nickname'], + self._fpr, CONSENSUS_DOWNLOAD_SPEED_MAX) return ((not ipv4_failed) and (not ipv6_failed)) |