Struct tor_netdir::params::NetParameters
source · [−]#[non_exhaustive]pub struct NetParameters {Show 34 fields
pub bw_weight_scale: BoundedInt32<1, { i32::MAX }>,
pub cbt_learning_disabled: BoundedInt32<0, 1>,
pub cbt_num_xm_modes: BoundedInt32<1, 20>,
pub cbt_success_count: BoundedInt32<3, 1_000>,
pub cbt_max_timeouts: BoundedInt32<3, 10_000>,
pub cbt_min_circs_for_estimate: BoundedInt32<1, 10_000>,
pub cbt_timeout_quantile: Percentage<BoundedInt32<10, 99>>,
pub cbt_abandon_quantile: Percentage<BoundedInt32<10, 99>>,
pub cbt_min_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>,
pub cbt_initial_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>,
pub cbt_testing_delay: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>,
pub cbt_max_open_circuits_for_testing: BoundedInt32<0, 14>,
pub circuit_window: BoundedInt32<100, 1000>,
pub circuit_priority_half_life: IntegerMilliseconds<BoundedInt32<1, { i32::MAX }>>,
pub extend_by_ed25519_id: BoundedInt32<0, 1>,
pub guard_meaningful_restriction: Percentage<BoundedInt32<1, 100>>,
pub guard_extreme_restriction: Percentage<BoundedInt32<1, 100>>,
pub guard_lifetime_unconfirmed: IntegerDays<BoundedInt32<1, 3650>>,
pub guard_lifetime_confirmed: IntegerDays<BoundedInt32<1, 3650>>,
pub guard_internet_likely_down: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>,
pub guard_max_sample_size: BoundedInt32<1, {i32::MAX}>,
pub guard_max_sample_threshold: Percentage<BoundedInt32<1, 100>>,
pub guard_filtered_min_sample_size: BoundedInt32<1, {i32::MAX}>,
pub guard_n_primary: BoundedInt32<1, {i32::MAX}>,
pub guard_use_parallelism: BoundedInt32<1, {i32::MAX}>,
pub guard_dir_use_parallelism: BoundedInt32<1, {i32::MAX}>,
pub guard_nonprimary_connect_timeout: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>,
pub guard_nonprimary_idle_timeout: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>,
pub guard_remove_unlisted_after: IntegerDays<BoundedInt32<1, 3650>>,
pub min_circuit_path_threshold: Percentage<BoundedInt32<25, 95>>,
pub sendme_accept_min_version: SendMeVersion,
pub sendme_emit_min_version: SendMeVersion,
pub unused_client_circ_timeout: IntegerSeconds<BoundedInt32<60, 86_400>>,
pub unused_client_circ_timeout_while_learning_cbt: IntegerSeconds<BoundedInt32<10, 60_000>>,
}
Expand description
This structure holds recognized configuration parameters. All values are type-safe, and where applicable clamped to be within range.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.bw_weight_scale: BoundedInt32<1, { i32::MAX }>
A weighting factor for bandwidth calculations
cbt_learning_disabled: BoundedInt32<0, 1>
If true, do not attempt to learn circuit-build timeouts at all.
cbt_num_xm_modes: BoundedInt32<1, 20>
Number of histograms bins to consider when estimating Xm for a Pareto-based circuit timeout estimator.
cbt_success_count: BoundedInt32<3, 1_000>
How many recent circuit success/timeout statuses do we remember when trying to tell if our circuit timeouts are too low?
cbt_max_timeouts: BoundedInt32<3, 10_000>
How many timeouts (in the last cbt_success_count
observations)
indicates that our circuit timeouts are too low?
cbt_min_circs_for_estimate: BoundedInt32<1, 10_000>
Smallest number of circuit build times we have to view in order to use our Pareto-based circuit timeout estimator.
cbt_timeout_quantile: Percentage<BoundedInt32<10, 99>>
Quantile to use when determining the correct circuit timeout value with our Pareto estimator.
(We continue building circuits after this timeout, but only for build-time measurement purposes.)
cbt_abandon_quantile: Percentage<BoundedInt32<10, 99>>
Quantile to use when determining when to abandon circuits completely with our Pareto estimator.
cbt_min_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>
Lowest permissible timeout value for Pareto timeout estimator.
cbt_initial_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>
Timeout value to use for our Pareto timeout estimator when we have no initial estimate.
cbt_testing_delay: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>
When we don’t have a good build-time estimate yet, how long (in seconds) do we wait between trying to launch build-time testing circuits through the network?
cbt_max_open_circuits_for_testing: BoundedInt32<0, 14>
How many circuits can be open before we will no longer consider launching testing circuits to learn average build times?
circuit_window: BoundedInt32<100, 1000>
The maximum cell window size?
circuit_priority_half_life: IntegerMilliseconds<BoundedInt32<1, { i32::MAX }>>
The decay parameter for circuit priority
extend_by_ed25519_id: BoundedInt32<0, 1>
Whether to perform circuit extensions by Ed25519 ID
guard_meaningful_restriction: Percentage<BoundedInt32<1, 100>>
If we have excluded so many possible guards that the available fraction is below this threshold, we should use a different guard sample.
guard_extreme_restriction: Percentage<BoundedInt32<1, 100>>
We should warn the user if they have excluded so many guards that the available fraction is below this threshold.
guard_lifetime_unconfirmed: IntegerDays<BoundedInt32<1, 3650>>
How long should we keep an unconfirmed guard (one we have not contacted) before removing it from the guard sample?
guard_lifetime_confirmed: IntegerDays<BoundedInt32<1, 3650>>
How long should we keep a confirmed guard (one we have contacted) before removing it from the guard sample?
guard_internet_likely_down: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>
If all circuits have failed for this interval, then treat the internet as “probably down”, and treat any guard failures in that interval as unproven.
guard_max_sample_size: BoundedInt32<1, {i32::MAX}>
Largest number of guards that a client should try to maintain in a sample of possible guards.
guard_max_sample_threshold: Percentage<BoundedInt32<1, 100>>
Largest fraction of guard bandwidth on the network that a client should try to remain in a sample of possible guards.
guard_filtered_min_sample_size: BoundedInt32<1, {i32::MAX}>
If the client ever has fewer than this many guards in their sample, after filtering out unusable guards, they should try to add more guards to the sample (if allowed).
guard_n_primary: BoundedInt32<1, {i32::MAX}>
The number of confirmed guards that the client should treat as “primary guards”.
guard_use_parallelism: BoundedInt32<1, {i32::MAX}>
The number of primary guards that the client should use in parallel. Other primary guards won’t get used unless earlier ones are down.
guard_dir_use_parallelism: BoundedInt32<1, {i32::MAX}>
The number of primary guards that the client should use in parallel. Other primary directory guards won’t get used unless earlier ones are down.
guard_nonprimary_connect_timeout: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>
When trying to confirm nonprimary guards, if a guard doesn’t answer for more than this long in seconds, treat any lower- priority guards as possibly usable.
guard_nonprimary_idle_timeout: IntegerSeconds<BoundedInt32<1, {i32::MAX}>>
When trying to confirm nonprimary guards, if a guard doesn’t answer for more than this long in seconds, treat it as down.
guard_remove_unlisted_after: IntegerDays<BoundedInt32<1, 3650>>
If a guard has been unlisted in the consensus for at least this long, remove it from the consensus.
min_circuit_path_threshold: Percentage<BoundedInt32<25, 95>>
The minimum threshold for circuit patch construction
sendme_accept_min_version: SendMeVersion
The minimum sendme version to accept.
sendme_emit_min_version: SendMeVersion
The minimum sendme version to transmit.
unused_client_circ_timeout: IntegerSeconds<BoundedInt32<60, 86_400>>
How long should never-used client circuits stay available, in the steady state?
unused_client_circ_timeout_while_learning_cbt: IntegerSeconds<BoundedInt32<10, 60_000>>
When we’re learning circuit timeouts, how long should never-used client circuits stay available?
Implementations
Trait Implementations
sourceimpl Clone for NetParameters
impl Clone for NetParameters
sourcefn clone(&self) -> NetParameters
fn clone(&self) -> NetParameters
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NetParameters
impl Debug for NetParameters
Auto Trait Implementations
impl RefUnwindSafe for NetParameters
impl Send for NetParameters
impl Sync for NetParameters
impl Unpin for NetParameters
impl UnwindSafe for NetParameters
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more