#[non_exhaustive]
pub struct NetParameters {
Show 43 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 nf_ito_low: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_high: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_low_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_high_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, 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>>, pub cc_min_sendme_acks: BoundedInt32<2, 20>, pub cc_ewma_n_by_sendme_acks: Percentage<BoundedInt32<1, 255>>, pub cc_ewma_n_max: BoundedInt32<2, { i32::MAX }>, pub cc_sendme_cell_ack_count: BoundedInt32<1, 255>, pub cc_cwnd_inc_rate: BoundedInt32<1, 250>,
}
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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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

§nf_ito_low: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, low end of random padding interval, milliseconds

nf_ito stands for “netflow inactive timeout”.

§nf_ito_high: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, high end of random padding interval, milliseconds

§nf_ito_low_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, low end of random padding interval (reduced padding) milliseconds

§nf_ito_high_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, high end of random padding interval (reduced padding) , milliseconds

§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?

§cc_min_sendme_acks: BoundedInt32<2, 20>

The minimum number of SENDME acks required to estimate RTT and/or bandwidth.

§cc_ewma_n_by_sendme_acks: Percentage<BoundedInt32<1, 255>>

The “N” parameter in N-EWMA smoothing of RTT and/or bandwidth estimation, specified as a percentage of the number of SENDME acks in a congestion window.

A percentage over 100% indicates smoothing with more than one congestion window’s worth of SENDMEs.

§cc_ewma_n_max: BoundedInt32<2, { i32::MAX }>

The maximum value of the “N” parameter in N-EWMA smoothing of RTT and/or bandwidth estimation.

§cc_sendme_cell_ack_count: BoundedInt32<1, 255>

How many cells a SENDME acks under the congestion-control regime.

§cc_cwnd_inc_rate: BoundedInt32<1, 250>

How often we update our congestion window, per congestion window worth of packets. (For example, if this is 2, we will update the window twice every window.)

Implementations§

Construct a new NetParameters from a given list of key=value parameters.

Unrecognized parameters are ignored.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more