[tor-dev] Question about HS code

Nick Mathewson nickm at alum.mit.edu
Thu May 29 18:36:56 UTC 2014

On Tue, May 27, 2014 at 9:25 AM, Michael Rogers
<michael at briarproject.org> wrote:
> Hash: SHA256
> Hi,
> I've been trying to get to grips with the hidden service code, and I
> have a question that I was hoping someone on the list could answer.
> The constant REND_HID_SERV_DIR_REQUERY_PERIOD is defined as 15 * 60
> (15 minutes) in rendclient.c, with the comment "The period for which a
> hidden service directory cannot be queried for the same descriptor ID
> again." As far as I can tell, the purpose of this constant is to
> prevent a client from repeatedly asking an HS directory for a
> descriptor that the directory doesn't have.
> However, when a descriptor fetch fails and there's no reusable cached
> descriptor, rend_client_desc_trynow(query) calls
> rend_client_note_connection_attempt_ended(onion_address), which calls
> purge_hid_serv_from_last_hid_serv_requests(onion_address), which (as
> far as I can tell) forgets which HS directories have been tried for
> the descriptor, allowing the same directories to be tried again before
> So what's the effect of REND_HID_SERV_DIR_REQUERY_PERIOD?

Hello, Michael!

This looks like a possible bug to me.  Could you open a ticket at


More information about the tor-dev mailing list