Expand description
Implements a usable view of Tor network parameters.
The Tor consensus document contains a number of ‘network parameters’, which are integer-valued items voted on by the directory authorities. They are used to tune the behavior of numerous aspects of the network. A set of Tor network parameters
The Tor consensus document contains a number of ‘network parameters’, which are integer-valued items voted on by the directory authorities. These parameters are used to tune the behavior of numerous aspects of the network.
This type differs from
NetParams
in that it
only exposes a set of parameters recognized by arti. In return
for this restriction, it makes sure that the values it gives are
in range, and provides default values for any parameters that are
missing.
Macros§
- declare_
net_ 🔒parameters - A macro to help us declare the net parameters object. It lets us
put the information about each parameter in just one place, even
though it will later get split between the struct declaration, the
Default implementation, and the implementation of
saturating_update_override
.
Structs§
- NetParameters
- This structure holds recognized configuration parameters. All values are type-safe, and where applicable clamped to be within range.
Constants§
- CHANNEL_
PADDING_ TIMEOUT_ UPPER_ BOUND - Upper limit for channel padding timeouts
Traits§
- From
Int32 Saturating - An object that can be constructed from an i32, with saturating semantics.