When a time interval (like MIN/MAX/DEFAULT_ONION_KEY_LIFETIME) has a unit other than seconds, put the unit in the name. (eg, "MIN_ONION_KEY_LIFETIME_DAYS"). Otherwise people tend to assume seconds. Same for DEFAULT/MIN onion_key_grace_period.
Maybe we should check whether the onion key is expired more frequently than the get_onion_key_lifetime() interval? -- otherwise, if the interval changes in the consensus, we won't reach the interior of rotate_onion_key_callback(). Same for the other callback.
The documentation for expire_old_onion_keys should make it clear that the function doesn't perform a grace period check.
This branch needs a changes file.
(Also please remember when you make these changes, fixup commits are easier to review than a completely new or rebased branch.)
Trac: Reviewer: N/Ato nickm Status: needs_review to needs_revision
LGTM; Squashed and merged. This should begin having a modest effect on directory bandwidth immediately, which will grow as more relays upgrade. We should keep an eye on upgraded relays, of course, to make sure that they don't have any weird side effects from the increased interval.
Trac: Resolution: N/Ato implemented Status: needs_review to closed