[metrics-team] DirAuth vote names inconsistent
Tom Ritter
tom at ritter.vg
Mon Sep 11 18:37:44 UTC 2017
On 11 September 2017 at 13:31, Karsten Loesing <karsten at torproject.org> wrote:
> Hi Tom,
>
> On 2017-09-11 17:21, Tom Ritter wrote:
>> I'm looking at https://collector.torproject.org/recent/relay-descriptors/votes/
>> and it seems the format of a vote file name is
>>
>> %Y-%m-%d-%H-%M-%S-vote-[fingerprint]-[random-fingerprint]
>>
>> Where random-fingerprint is the fingerprint of the dirauth that
>> downloaded the vote, but it
>> a) changes every hour
>> b) only one view is available
>>
>> The result of this is that if I want to download a vote I need to try
>> all the dirauth fingerprints until I find the one that is available.
>>
>> Is my understanding correct? Is there any way this could be
>> deterministic? Perhaps (since we expose only a single vote) we can
>> just strip the last fingerprint?
>>
>> I understand we do this because we want to archive different DirAuth
>> views in case they differ but if they do we could expose the different
>> file under the viewer fingerprint?
>
> The file name format is actually [datetime]-vote-[fingerprint]-[digest],
> where [fingerprint] is the v3 identity and [digest] is the digest of the
> vote document (not the identity of the downloading authority).
>
> For example, you'll find all of gabelmoo's votes under v3 identity
> ED03BB616EB2F60BEC80151114BB25CEF515B226 (first hex string).
>
> There's also a specification for file names that we're currently hiding
> here:
>
> https://gitweb.torproject.org/collector.git/tree/src/main/resources/docs/PROTOCOL#n202
I think that document is wrong.
year DASH month DASH day DASH hour DASH minute DASH second
DASH VOTE DASH fingerprint DASH digest
Where VOTE is the string "vote" and all time related
values are derived from the valid-after dates. 'fingerprint'
is the fingerprint of the authority and 'digest' is the SHA1
digest of the authority's medium term signing key.
Specifically: 'digest' is the SHA1 digest of the authority's medium
term signing key.
It's not the medium term signing key, it's the digest of the vote document.
> Does that answer your question?
Kinda. The filename is still unpredictable, which means I'll have to
parse the /recent/ page and find it to download it. That's not ideal,
but if it's the way things is, I'll manage. What I'm doing is already
kind of a pile of hacks =)
-tom
More information about the metrics-team
mailing list