Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
9629a25d
Unverified
Commit
9629a25d
authored
8 years ago
by
teor
Browse files
Options
Downloads
Patches
Plain Diff
Display the fingerprint when downloading consensuses from fallbacks
parent
ced50aff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/fallbacks-201612
+6
-0
6 additions, 0 deletions
changes/fallbacks-201612
scripts/maint/updateFallbackDirs.py
+8
-5
8 additions, 5 deletions
scripts/maint/updateFallbackDirs.py
with
14 additions
and
5 deletions
changes/fallbacks-201612
+
6
−
0
View file @
9629a25d
...
...
@@ -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.
This diff is collapsed.
Click to expand it.
scripts/maint/updateFallbackDirs.py
+
8
−
5
View file @
9629a25d
...
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment