pub struct CoreConfig {Show 15 fields
pub log_target: &'static str,
pub num_gateway_mixnodes: u32,
pub session_0_kx_secret: Option<[u8; 32]>,
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 str
The target for log messages.
num_gateway_mixnodes: u32
The 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<[u8; 32]>
The key-exchange secret key to use in session 0. This option is intended for testing purposes only.
mixnode_session: SessionConfig
Used 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: usize
Maximum 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: Duration
Mean forwarding delay at each mixnode. This should really be the same for all nodes!
per_hop_net_delay: Duration
Conservative estimate of the network (and processing) delay per hop.
loop_cover_proportion: f64
Proportion 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: bool
Generate cover packets? This option is intended for testing purposes only. It essentially just drops all cover packets instead of sending them.
num_hops: usize
Number 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: usize
Maximum number of outstanding SURBs to keep keys for. Must be greater than 0.
max_incomplete_messages: usize
Maximum number of incomplete messages to keep.
max_incomplete_fragments: usize
Maximum number of fragments to keep across all incomplete messages.
max_fragments_per_message: usize
Maximum 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.