3

Why does a restart cause a relay to lose the Guard and HSDir flag?

I understand that the Guard and HSDir flag are based on time in the network. However, why is it important when the last restart happened?

Isn't it counterproductive if a relay loses these flags, because it or its OS gets updated and therefor has to be restarted?

Also couldn't that be easily faked? While time in the network can be checked against historical data isn't it hard to check for constant uptime without restarts?

2 Answers 2

2

A restart does not cause a relay to lose its Guard and HSDir flags. However, a restart that takes way too long, or frequent restarts (more than one per week, say) can cause a relay to lose its stable flag, which will then cause it to lose its Guard and HSDir flags.

Note: OS updates typically do not require restarting. Typically kernel updates are the only kind that require restarting, and those happen on the order of once or twice per month if you are running the unstable form of your distribution.

5
  • But isn't the requirement for guard and hsdir to have an uptime of X amount of time and not the stable flag you mentioned?
    – meee
    Commented Nov 7, 2015 at 19:37
  • 1
    The requirement is more complicated than just uptime of X amount, specifically for the reason that even stable nodes need to restart sometimes to do critical updates. The stable flag is not sufficient, but it is necessary. If you lose your stable flag, you also lose your guard flag, but being stable doesn't make you a guard.
    – nullUser
    Commented Nov 8, 2015 at 17:58
  • Thank you for your response. Is there a place where I can look up the the current requirements?
    – meee
    Commented Nov 8, 2015 at 18:06
  • Brief overview: blog.torproject.org/blog/lifecycle-of-a-new-relay, and the source code specification: gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n1913
    – nullUser
    Commented Nov 8, 2015 at 18:13
  • According to your second link a HSDir flag is only given to people that have some amount of uptime (96 hours by default). gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n2153
    – meee
    Commented Jan 15, 2016 at 11:18
1

This is just a guess:

When you restart a relay, chances are you're going to restart it again soon. Once it's been up for a day or two, you'll probably leave it running.
I have no research to back this up but it seems likely that statistically, restarts come in bunches, rather than being distributed evenly over time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .