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 15 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 journal_partition: String,
pub journal_write_buffer: NonZeroUsize,
pub journal_replay_buffer: NonZeroUsize,
pub journal_heights_per_section: NonZeroU64,
pub journal_compression: Option<u8>,
}
Expand description
Configuration for the super::Engine.
Fields§
§monitor: M
Tracks the current state of consensus (to determine which participants should be involved in the current broadcast attempt).
validators: TSu
Manages the set of validators and the group identity. Also manages the cryptographic partial share if the engine is a validator.
automaton: A
Proposes and verifies Digests.
reporter: Z
Notified when a chunk receives a threshold of super::types::Acks.
blocker: B
Blocker 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: bool
Whether acks are sent as priority.
rebroadcast_timeout: NonZeroDuration
How 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: NonZeroU64
The number of chunks to process concurrently.
journal_partition: String
Partition for the commonware_storage::journal::variable::Journal.
journal_write_buffer: NonZeroUsize
The size of the write buffer to use for each blob in the journal.
journal_replay_buffer: NonZeroUsize
Number of bytes to buffer when replaying a journal.
journal_heights_per_section: NonZeroU64
The number of entries to keep per journal section.
journal_compression: Option<u8>
Compression level 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