nskinkel / oppy

A Tor client (onion proxy) implementation in Python
BSD 3-Clause "New" or "Revised" License
24 stars 3 forks source link

Calculate correct time to download fresh consensus #1

Closed nskinkel closed 9 years ago

nskinkel commented 10 years ago

When calculating the time to download a fresh consensus, the Tor dir-spec states:

This time is chosen uniformly at random from the interval between the time 3/4 into the first interval after the consensus is no longer fresh, and 7/8 of the time remaining after that before the consensus is invalid.

What does "first interval" refer to in this context? Is this the first hour after the consensus is no longer fresh? I'm not sure what this means.

This is discussed in section 5.1 of the Tor dir-spec

See seconds_to_next_consensus in DocDownloader.py in the NetStatusPrototype branch for an idea of what I'm currently doing.

nskinkel commented 9 years ago

Closed for now. This will be aggregated in a master NetStatus/Path selection ticket soon. Currently just making the choice to download new documents every hour.