[tor-bugs] #2732 [Tor Hidden Services]: Simplify hid_serv_responsible_for_desc_id
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Tue Mar 15 15:16:53 UTC 2011
#2732: Simplify hid_serv_responsible_for_desc_id
---------------------------------+------------------------------------------
Reporter: rransom | Owner: rransom
Type: defect | Status: needs_review
Priority: major | Milestone: Tor: 0.2.2.x-final
Component: Tor Hidden Services | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
Comment(by rransom):
Replying to [comment:7 nickm]:
> I'm not sure this is the behavior we want; I think the old thing might
be deliberate but broken.
>
> I think that the intention might have been for us to store the
descriptor not only if we are listed as an HSDir at the right place in the
consensus, but also if we are not an HSDir but we *are* listed in the
right place in the consensus. This is broken since the check for
hid_serv_acting_as_directory() depends on the HSDir flag.
`hid_serv_acting_as_directory` has always checked whether the relay is
marked with the HSDir flag in the consensus, and
`hid_serv_responsible_for_desc_id` has always called
`hid_serv_acting_as_directory`.
However, before
[https://gitweb.torproject.org/tor.git/commitdiff/bf2717ff3d02e1c8527d6e6c8f14349813ba0e72
commit bf2717ff], `hid_serv_responsible_for_desc_id` determined whether a
relay is responsible for a given descriptor ID in a different way. The
prior method would have broken if less than
`REND_NUMBER_OF_CONSECUTIVE_REPLICAS` relays had the HSDir flag (although
those versions would have not attempted to look up HS descriptors at all
in that case), but seems to be equivalent in other cases.
> So I'd like to make sure that the intent *isn't* for non-HSDir routers
to store descriptors anyway before we merge this.
It looks like the intent was for non-HSDir routers to not store
descriptors, but that's probably a bad design.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2732#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list