Compute onion-service hash ring on top of (or as part of) NetDir.
Onion services are stored at positions on a hash ring formed by all hsdir
relays. The ordering and logic of this hash ring are described in section 2.2 of rend-spec-v3.txt
.
We should compute these positions as part of (or immediately after?) our computation of the NetDir. Doing this can be a little expensive, so we should consider doing it in a separate thread, and we should look for ways to avoid recomputation when the consensus changes but the SRV value does not.
We should have accessor functions that can tell the correct positions to upload and download a given onion service descriptor.
This is all somewhat complicated by the time logic in rend-spec-v3 sections 2.2.2.1 and 2.2.4.
Edited by Nick Mathewson