[tor-bugs] #7646 [Tor]: fix/enhance getinfo ns/id/* commands
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Mar 21 20:19:09 UTC 2014
#7646: fix/enhance getinfo ns/id/* commands
------------------------+-----------------------------------
Reporter: mr-4 | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version: Tor: 0.2.4.7-alpha
Resolution: | Keywords: tor-client controller
Actual Points: | Parent ID:
Points: |
------------------------+-----------------------------------
Comment (by nickm):
Replying to [comment:7 atagar]:
> > Currently, it only returns information about tor nodes which have
microdescriptors and ignores those that use "normal" descriptors, in other
words, it behaves exactly like the md/id/node command.
>
> I'm not clear - (a) do you mean that it provides **router status
entries** if and only if microdescriptors are available, or (b) it
provides actual microdescriptors like **md/id/node**?
The actual behavior is that it looks up the routerstatus item in the
current consensus. If we're using a microdescriptor consensus, it looks
at that. If we're using a networkstatus consensus, it looks at that.
It works even if we haven't fetched the microdescriptors themselves -- the
issue is that it might return results from a FLAV_NS consensus.
> > ... this command in control-specs.txt it is supposed to return V2
directory info on all nodes without making such distinctions.
>
> This was
[https://gitweb.torproject.org/torspec.git/commitdiff/d2b7ebb098c5cae9c40aaaf2bbc50efe67e1c91f
fixed] in the spec a while back.
>
> > When I add UseMicrodescriptors 1 line to my torrc, GETINFO
ns/id/$DIGEST doesn't return anything since Tor instance refrain from
downloading network statuses when this configuration option is set.
>
> ... huh? **UseMicrodescriptors 1** should mean that we download
microdescriptors and router status entries, while **UseMicrodescriptors
0** means that we download server descriptors and router status entries.
Are you saying that we opt to **only** download microdescriptors by
default nowadays?
"NS" is the flavor of the old-style, pre-microdescriptor networkstatus
consensus documents. I think that mr-4 is calling those networkstatuses.
We don't download FLAV_NS networkstatuses by default any more when
UseMicrodescriptors 0 is set; we download FLAV_MICRODESC networkstatuses
instead.
> > Damian, would this mess anything up? I wonder if we shouldn't just
redesign the interface we *want*, and then implement it, rather than
trying to reverse engineer what we meant when we designed the old thing.
>
> If mr-4 meant (a) then that sounds like a bug and fixing it will make
controllers happy (... though I'm not sure why the relays you have
microdescriptors for wouldn't match the router status entires). If he
meant (b) then that sounds like a horrible bug and I'm not sure how it's
possible that went undetected (... Stem has integ tests that should
definitely complain about that).
>
> Tor's "GETINFO ns/id/*" options are pretty nice as-is and used by Stem.
I'm not sure what type of re-implementation you have in mind.
Hm. This suggests that the right thing to do here might be "no change in
0.2.5, just document the current behavior", and turn this into a needs-
proposal thing.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7646#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list