pub struct Config<C: Signer, V: Variant, D: Digest, A: Automaton<Context = Context<C::PublicKey>, Digest = D>, R: Relay<Digest = D>, Z: Reporter<Activity = Activity<C::PublicKey, V, D>>, M: Monitor<Index = Epoch>, Su: Supervisor<Index = Epoch, PublicKey = C::PublicKey>, TSu: ThresholdSupervisor<Index = Epoch, PublicKey = C::PublicKey>> {Show 19 fields
pub crypto: C,
pub monitor: M,
pub validators: TSu,
pub sequencers: Su,
pub automaton: A,
pub relay: R,
pub reporter: Z,
pub namespace: Vec<u8>,
pub priority_proposals: bool,
pub priority_acks: bool,
pub rebroadcast_timeout: Duration,
pub epoch_bounds: (u64, u64),
pub height_bound: u64,
pub journal_name_prefix: String,
pub journal_heights_per_section: u64,
pub journal_replay_buffer: NonZeroUsize,
pub journal_write_buffer: NonZeroUsize,
pub journal_compression: Option<u8>,
pub journal_buffer_pool: PoolRef,
}Expand description
Configuration for the super::Engine.
Fields§
§crypto: CThe cryptographic scheme used if the engine is a sequencer.
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 polynomial. Also manages the cryptographic partial share if the engine is a validator.
sequencers: SuManages the set of sequencers.
automaton: AProposes and verifies digests.
relay: RBroadcasts the raw payload.
reporter: ZNotified when a chunk receives a threshold of acks.
namespace: Vec<u8>The application namespace used to sign over different types of messages. Used to prevent replay attacks on other applications.
priority_proposals: boolWhether proposals are sent as priority.
priority_acks: boolWhether acks are sent as priority.
rebroadcast_timeout: DurationHow often a proposal 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.
height_bound: u64The number of future heights to accept acks for. This is used to prevent spam of acks for arbitrary heights.
For example, if the current tip for a sequencer is at height 100, and the height_bound is 10, then acks for heights 100-110 are accepted.
journal_name_prefix: StringA prefix for the journal names. The rest of the name is the hex-encoded public keys of the relevant sequencer.
journal_heights_per_section: u64The number of entries to keep per journal section.
journal_replay_buffer: NonZeroUsizeThe number of bytes to buffer when replaying a journal.
journal_write_buffer: NonZeroUsizeThe size of the write buffer to use for each blob in the journal.
journal_compression: Option<u8>Compression level for the journal.
journal_buffer_pool: PoolRefBuffer pool for the journal.
Auto Trait Implementations§
impl<C, V, D, A, R, Z, M, Su, TSu> Freeze for Config<C, V, D, A, R, Z, M, Su, TSu>
impl<C, V, D, A, R, Z, M, Su, TSu> !RefUnwindSafe for Config<C, V, D, A, R, Z, M, Su, TSu>
impl<C, V, D, A, R, Z, M, Su, TSu> Send for Config<C, V, D, A, R, Z, M, Su, TSu>
impl<C, V, D, A, R, Z, M, Su, TSu> Sync for Config<C, V, D, A, R, Z, M, Su, TSu>
impl<C, V, D, A, R, Z, M, Su, TSu> Unpin for Config<C, V, D, A, R, Z, M, Su, TSu>
impl<C, V, D, A, R, Z, M, Su, TSu> !UnwindSafe for Config<C, V, D, A, R, Z, M, Su, 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