ipt manager parameters should be from netdir or configurable
/// Expiry time to put on an interim descriptor (IPT publication set Uncertain)
// TODO HSS IPT_PUBLISH_UNCERTAIN configure? get from netdir?
const IPT_PUBLISH_UNCERTAIN: Duration = Duration::from_secs(30 * 60); // 30 mins
/// Expiry time to put on a final descriptor (IPT publication set Certain
// TODO HSS IPT_PUBLISH_CERTAIN configure? get from netdir?
const IPT_PUBLISH_CERTAIN: Duration = Duration::from_secs(12 * 3600); // 12 hours
// TODO HSS is this the right guess for IPT establishment?
// we could use circuit timings etc., but arguably the actual time to establish
// our fastest IPT is a better estimator here (and we want an optimistic,
// rather than pessimistic estimate).
//
// TODO HSS fastest_good_establish_time factor 1 should be tuneable
let wait_more = fastest_good_establish_time;
let very_recently = fastest_good_establish_time.checked_add(wait_more)?;
/// Maximum number of concurrent intro point relays
pub(crate) fn max_n_intro_relays(&self) -> usize {
// TODO #1210 max_n_intro_relays should be configurable
// TODO #1210 consider default, in context of intro point forcing attacks
self.target_n_intro_points() * 2
}
/// Descriptor expiry time slop
///
/// How long after our descriptor expired should we continue to maintain an old IPT?
/// This is an allowance for:
///
/// - Various RTTs and delays in clients setting up circuits
/// (we can't really measure this ourselves properly,
/// since what matters is the client's latency)
///
/// - Clock skew
//
// TODO HSS IPT_PUBLISH_EXPIRY_SLOP configure?
pub(crate) const IPT_PUBLISH_EXPIRY_SLOP: Duration = Duration::from_secs(300); // 5 minutes
Tagging this MUST just because I don't know offhand where the info should come from and how important this is. The MUST task is "decide where this should come from and whether that is in fact a MUST".
Also grep for TODO #1210
or TODO (#1210)
.
Edited by Nick Mathewson