[tor-commits] [doctor/master] Opt into descriptor validation

atagar at torproject.org atagar at torproject.org
Sun Jan 25 23:17:33 UTC 2015


commit 3799fe75858d4cfcd444100bad7a5c81614758a9
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Jan 25 15:20:07 2015 -0800

    Opt into descriptor validation
    
    For most things performance trumps validation, but for DocTor checking for
    errors is kinda the whole point.
---
 consensus_health_checker.py |    2 ++
 descriptor_checker.py       |    2 ++
 sybil_checker.py            |    2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index a7dc67f..e7e2ca0 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -724,6 +724,7 @@ def _get_documents(label, resource):
       resource,
       endpoints = [(authority.address, authority.dir_port)],
       default_params = False,
+      validate = True,
     )
 
   for authority, query in queries.items():
@@ -738,6 +739,7 @@ def _get_documents(label, resource):
         query = downloader.query(
           '/tor/status-vote/current/%s' % v3ident,
           default_params = False,
+          validate = True,
         )
 
         query.run(True)
diff --git a/descriptor_checker.py b/descriptor_checker.py
index 6b2afca..57aeeab 100755
--- a/descriptor_checker.py
+++ b/descriptor_checker.py
@@ -47,6 +47,7 @@ def main():
       resource,
       block = True,
       timeout = 60,
+      validate = True,
     )
 
     if not query.error:
@@ -77,6 +78,7 @@ def main():
       timeout = 60,
       endpoints = [(authority.address, authority.dir_port)],
       document_handler = stem.descriptor.DocumentHandler.DOCUMENT,
+      validate = True,
     )
 
     if not query.error:
diff --git a/sybil_checker.py b/sybil_checker.py
index 5a88e8b..c51d753 100755
--- a/sybil_checker.py
+++ b/sybil_checker.py
@@ -36,7 +36,7 @@ log = util.get_logger('sybil_checker')
 
 def main():
   prior_fingerprints = load_fingerprints()
-  downloader = DescriptorDownloader(timeout = 60)
+  downloader = DescriptorDownloader(timeout = 60, validate = True)
 
   dry_run = False
 



More information about the tor-commits mailing list