pub struct Config<P, S, X, D, C, H, B, T>where
P: PublicKey,
S: Provider<Scope = Epoch>,
X: Blocker<PublicKey = P>,
D: PeerProvider<PublicKey = P>,
C: CodingScheme,
H: Hasher,
B: CertifiableBlock,
T: Strategy,{
pub scheme_provider: S,
pub blocker: X,
pub shard_codec_cfg: <Shard<C, H> as Read>::Cfg,
pub block_codec_cfg: B::Cfg,
pub strategy: T,
pub mailbox_size: usize,
pub peer_buffer_size: NonZeroUsize,
pub background_channel_capacity: usize,
pub peer_provider: D,
}Expand description
Configuration for the Engine.
Fields§
§scheme_provider: SThe scheme provider.
blocker: XThe peer blocker.
shard_codec_cfg: <Shard<C, H> as Read>::Cfg§block_codec_cfg: B::Cfgcommonware_codec::Read configuration for decoding blocks.
strategy: TThe strategy used for parallel computation.
mailbox_size: usizeThe size of the mailbox buffer.
peer_buffer_size: NonZeroUsizeNumber of shards to buffer per peer.
Shards for commitments without a reconstruction state are buffered per
peer in a fixed-size ring to bound memory under Byzantine spam. These
shards are only ingested when consensus provides a leader via
Discovered.
The worst-case total memory usage for the set of shard buffers is
num_participants * peer_buffer_size * max_shard_size.
background_channel_capacity: usizeCapacity of the channel between the background receiver and the engine.
The background receiver decodes incoming network messages in a separate
task and forwards them to the engine over an mpsc channel with this
capacity.
peer_provider: DProvider for peer set information. Per-peer shard buffers are freed when a peer leaves all tracked peer sets.
Auto Trait Implementations§
impl<P, S, X, D, C, H, B, T> Freeze for Config<P, S, X, D, C, H, B, T>
impl<P, S, X, D, C, H, B, T> RefUnwindSafe for Config<P, S, X, D, C, H, B, T>where
S: RefUnwindSafe,
X: RefUnwindSafe,
<B as Read>::Cfg: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<P, S, X, D, C, H, B, T> Send for Config<P, S, X, D, C, H, B, T>
impl<P, S, X, D, C, H, B, T> Sync for Config<P, S, X, D, C, H, B, T>
impl<P, S, X, D, C, H, B, T> Unpin for Config<P, S, X, D, C, H, B, T>
impl<P, S, X, D, C, H, B, T> UnsafeUnpin for Config<P, S, X, D, C, H, B, T>where
S: UnsafeUnpin,
X: UnsafeUnpin,
<B as Read>::Cfg: UnsafeUnpin,
T: UnsafeUnpin,
D: UnsafeUnpin,
impl<P, S, X, D, C, H, B, T> UnwindSafe for Config<P, S, X, D, C, H, B, T>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 more