Make directory objects expire faster
In tor_dirmgr::storage
we have:
pub(crate) const EXPIRATION_DEFAULTS: ExpirationConfig = {
ExpirationConfig {
// TODO: Choose a more realistic time.
router_descs: Duration::days(3 * 30),
// TODO: Choose a more realistic time.
microdescs: Duration::days(3 * 30),
authcerts: Duration::ZERO,
consensuses: Duration::days(2),
}
};
We should lower the router_descs
and microdescs
defaults: as it stands, the microdescs one retains too much information and make our directory caches huge.
The C Tor implementation uses 7 days for the microdesc expiration cutoff, and 5 days for the router descriptor cutoff. I have no reason to think those are especially good or principled cutoffs, though.