pub struct Config<P: Array, V: Variant, D: Digest, A: Automaton<Context = Index, Digest = D>, Z: Reporter<Activity = Activity<V, D>>, M: Monitor<Index = Epoch>, B: Blocker<PublicKey = P>, TSu: ThresholdSupervisor<Index = Epoch, PublicKey = P>> {Show 17 fields
pub monitor: M,
pub validators: TSu,
pub automaton: A,
pub reporter: Z,
pub blocker: B,
pub namespace: Vec<u8>,
pub priority_acks: bool,
pub rebroadcast_timeout: NonZeroDuration,
pub epoch_bounds: (u64, u64),
pub window: NonZeroU64,
pub activity_timeout: u64,
pub journal_partition: String,
pub journal_write_buffer: NonZeroUsize,
pub journal_replay_buffer: NonZeroUsize,
pub journal_heights_per_section: NonZeroU64,
pub journal_compression: Option<u8>,
pub journal_buffer_pool: PoolRef,
}Expand description
Configuration for the super::Engine.
Fields§
§monitor: MTracks the current state of consensus (to determine which participants should be involved in the current broadcast attempt).
validators: TSuManages the set of validators and the group identity. Also manages the cryptographic partial share if the engine is a validator.
automaton: AProposes and verifies Digests.
reporter: ZNotified when a chunk receives a threshold of super::types::Acks.
blocker: BBlocker for the network.
Blocking is handled by commonware_p2p.
namespace: Vec<u8>The application namespace used to sign over different types of messages. Used to prevent replay attacks on other applications.
priority_acks: boolWhether acks are sent as priority.
rebroadcast_timeout: NonZeroDurationHow often an ack is rebroadcast to all validators if no threshold is reached.
epoch_bounds: (u64, u64)A tuple representing the epochs to keep in memory. The first element is the number of old epochs to keep. The second element is the number of future epochs to accept.
For example, if the current epoch is 10, and the bounds are (1, 2), then epochs 9, 10, 11, and 12 are kept (and accepted); all others are pruned or rejected.
window: NonZeroU64The number of chunks to process concurrently.
activity_timeout: u64Number of indices to track below the tip when collecting acks and/or pruning.
journal_partition: StringPartition for the commonware_storage::journal::segmented::variable::Journal.
journal_write_buffer: NonZeroUsizeThe size of the write buffer to use for each blob in the journal.
journal_replay_buffer: NonZeroUsizeNumber of bytes to buffer when replaying a journal.
journal_heights_per_section: NonZeroU64The number of entries to keep per journal section.
journal_compression: Option<u8>Compression level for the journal.
journal_buffer_pool: PoolRefBuffer pool for the journal.
Auto Trait Implementations§
impl<P, V, D, A, Z, M, B, TSu> Freeze for Config<P, V, D, A, Z, M, B, TSu>
impl<P, V, D, A, Z, M, B, TSu> !RefUnwindSafe for Config<P, V, D, A, Z, M, B, TSu>
impl<P, V, D, A, Z, M, B, TSu> Send for Config<P, V, D, A, Z, M, B, TSu>
impl<P, V, D, A, Z, M, B, TSu> Sync for Config<P, V, D, A, Z, M, B, TSu>
impl<P, V, D, A, Z, M, B, TSu> Unpin for Config<P, V, D, A, Z, M, B, TSu>
impl<P, V, D, A, Z, M, B, TSu> !UnwindSafe for Config<P, V, D, A, Z, M, B, TSu>
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