[tor-commits] [stem/master] Drop obsolete NetworkStatusDocumentV3 attributes

atagar at torproject.org atagar at torproject.org
Mon Feb 10 03:14:50 UTC 2020


commit d719f98a9b1b6db64bab26d5a6bcdadd5a36d93a
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Feb 9 17:42:29 2020 -0800

    Drop obsolete NetworkStatusDocumentV3 attributes
    
    Couple attributes that were never used (they were misdocumentations in the
    spec).
---
 stem/descriptor/networkstatus.py                  | 15 +--------------
 test/unit/descriptor/networkstatus/document_v3.py |  4 ----
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 743076be..444ec0c2 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -1009,8 +1009,7 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
      Added the packages attribute.
 
   .. versionchanged:: 1.5.0
-     Added the is_shared_randomness_participate, shared_randomness_commitments,
-     shared_randomness_previous_reveal_count,
+     Added the shared_randomness_previous_reveal_count,
      shared_randomness_previous_value,
      shared_randomness_current_reveal_count, and
      shared_randomness_current_value attributes.
@@ -1019,11 +1018,6 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
      Added the recommended_client_protocols, recommended_relay_protocols,
      required_client_protocols, and required_relay_protocols attributes.
 
-  .. versionchanged:: 1.6.0
-     The is_shared_randomness_participate and shared_randomness_commitments
-     were misdocumented in the tor spec and as such never set. They're now an
-     attribute of votes in the **directory_authorities**.
-
   .. versionchanged:: 1.7.0
      The shared_randomness_current_reveal_count and
      shared_randomness_previous_reveal_count attributes were undocumented and
@@ -1198,13 +1192,6 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
     super(NetworkStatusDocumentV3, self).__init__(raw_content, lazy_load = not validate)
     document_file = io.BytesIO(raw_content)
 
-    # TODO: Tor misdocumented these as being in the header rather than the
-    # authority section. As such these have never been set but we need the
-    # attributes for stem 1.5 compatability. Drop these in 2.0.
-
-    self.is_shared_randomness_participate = False
-    self.shared_randomness_commitments = []
-
     self._default_params = default_params
     self._header(document_file, validate)
 
diff --git a/test/unit/descriptor/networkstatus/document_v3.py b/test/unit/descriptor/networkstatus/document_v3.py
index 22d49b5f..62ce6073 100644
--- a/test/unit/descriptor/networkstatus/document_v3.py
+++ b/test/unit/descriptor/networkstatus/document_v3.py
@@ -312,8 +312,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
     self.assertEqual(expected_known_flags, document.known_flags)
     self.assertEqual([], document.packages)
     self.assertEqual({}, document.flag_thresholds)
-    self.assertEqual(False, document.is_shared_randomness_participate)
-    self.assertEqual([], document.shared_randomness_commitments)
     self.assertEqual(None, document.shared_randomness_previous_reveal_count)
     self.assertEqual(None, document.shared_randomness_previous_value)
     self.assertEqual(None, document.shared_randomness_current_reveal_count)
@@ -352,8 +350,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
     self.assertEqual(expected_known_flags, document.known_flags)
     self.assertEqual([], document.packages)
     self.assertEqual({}, document.flag_thresholds)
-    self.assertEqual(False, document.is_shared_randomness_participate)
-    self.assertEqual([], document.shared_randomness_commitments)
     self.assertEqual(None, document.shared_randomness_previous_reveal_count)
     self.assertEqual(None, document.shared_randomness_previous_value)
     self.assertEqual(None, document.shared_randomness_current_reveal_count)





More information about the tor-commits mailing list