[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #25046 [Core Tor/Stem]: reveal_count incorrect in stem



#25046: reveal_count incorrect in stem
---------------------------+------------------------
 Reporter:  tom            |          Owner:  atagar
     Type:  defect         |         Status:  new
 Priority:  Medium         |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+------------------------

Comment (by atagar):

 % curl 128.31.0.39:9131/tor/status-vote/current/consensus >
 moria_consensus

 Within the conesus header it had the lines you wanted...

 {{{
 shared-rand-previous-value 9 2xFM9tuS7c84CfE2OIURwJjh/XYop/tQoQD70DBBJNA=
 shared-rand-current-value 9 vLbCqI2m02UXzOUYtSMPWxC/QUSXSw0mrOBNyBCGtcE=
 }}}

 ... then when I read it with Stem...

 {{{
 python
 Python 2.7.3 (default, Oct 26 2016, 21:04:23)
 [GCC 4.6.3] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import stem.descriptor
 >>> import stem.descriptor.remote
 >>> consensus = stem.descriptor.remote.get_consensus(document_handler =
 stem.descriptor.DocumentHandler.DOCUMENT).run()[0]
 >>> consensus
 <stem.descriptor.networkstatus.NetworkStatusDocumentV3 object at
 0x8d0b64c>
 >>> consensus.shared_randomness_current_value
 u'vLbCqI2m02UXzOUYtSMPWxC/QUSXSw0mrOBNyBCGtcE='
 >>> consensus.shared_randomness_current_reveal_count
 9
 }}}

 Turns out that a year ago we had a similar discussion about this (#21102,
 which resulted in
 [https://gitweb.torproject.org/stem.git/commit/?id=d713b29 commit
 d713b29]). :P

 One bug I *am* spotting is that the 'reveal_count' attributes are
 undocumented. Also, if you fetch those *before* the 'current_value' then
 you get None. This is because when lazily loading stem is missing the
 'reveal_count' handler. Fixing...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25046#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs