pub struct Config {Show 15 fields
pub log_target: &'static str,
pub num_gateway_mixnodes: u32,
pub session_0_kx_secret: Option<KxSecret>,
pub mixnode_session: SessionConfig,
pub non_mixnode_session: Option<SessionConfig>,
pub forward_packet_queue_capacity: usize,
pub mean_forwarding_delay: Duration,
pub per_hop_net_delay: Duration,
pub loop_cover_proportion: f64,
pub gen_cover_packets: bool,
pub num_hops: usize,
pub surb_keystore_capacity: usize,
pub max_incomplete_messages: usize,
pub max_incomplete_fragments: usize,
pub max_fragments_per_message: usize,
}Expand description
Mixnet configuration.
Fields§
§log_target: &'static strThe target for log messages.
num_gateway_mixnodes: u32The number of mixnodes to connect to when we are not a mixnode ourselves. When we are a mixnode, we connect to all other mixnodes.
session_0_kx_secret: Option<KxSecret>The key-exchange secret key to use in session 0. This option is intended for testing purposes only.
mixnode_session: SessionConfigUsed by sessions in which the local node is a mixnode. If this is not the same for all nodes, delay estimates may be off.
non_mixnode_session: Option<SessionConfig>Used by sessions in which the local node is not a mixnode. If None, we will only
participate in the mixnet during sessions in which we are a mixnode.
forward_packet_queue_capacity: usizeMaximum number of packets waiting for their forwarding delay to elapse. When at the limit, any packets arriving that need forwarding will simply be dropped.
mean_forwarding_delay: DurationMean forwarding delay at each mixnode. This should really be the same for all nodes!
per_hop_net_delay: DurationConservative estimate of the network (and processing) delay per hop.
loop_cover_proportion: f64Proportion of authored packets which should be loop cover packets (as opposed to drop cover packets or real packets). If this is not the same for all nodes, delay estimates may be off.
gen_cover_packets: boolGenerate cover packets? This option is intended for testing purposes only. It essentially just drops all cover packets instead of sending them.
num_hops: usizeNumber of hops for packets to traverse. Some packets may traverse more hops if necessary.
Note this only affects packets whose headers are generated by this node. Must be <=
MAX_HOPS.
surb_keystore_capacity: usizeMaximum number of outstanding SURBs to keep keys for. Must be greater than 0.
max_incomplete_messages: usizeMaximum number of incomplete messages to keep.
max_incomplete_fragments: usizeMaximum number of fragments to keep across all incomplete messages.
max_fragments_per_message: usizeMaximum number of fragments per message. This should really be the same for all nodes!
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more