pub struct Config<B, P, ES, T>{Show 14 fields
pub provider: P,
pub epocher: ES,
pub partition_prefix: String,
pub mailbox_size: usize,
pub view_retention_timeout: ViewDelta,
pub prunable_items_per_section: NonZeroU64,
pub page_cache: CacheRef,
pub replay_buffer: NonZeroUsize,
pub key_write_buffer: NonZeroUsize,
pub value_write_buffer: NonZeroUsize,
pub block_codec_config: B::Cfg,
pub max_repair: NonZeroUsize,
pub max_pending_acks: NonZeroUsize,
pub strategy: T,
}Expand description
Marshal configuration.
§Epocher and Provider Coverage
Any height marshal is asked to sync must be covered by both the
epocher and the provider. If
either returns None for a requested height, resolved requests will
be acknowledged and then dropped. If no longer needed (say a duplicate request
for a height we’ve long since processed), this drop is harmless. However, failing
to provide either the epocher or the provider for a height we still require to
process the canonical chain will lead marshal to stall (acknowledged requests
may not be retried).
§Safe Pruning
Applications may prune epocher/provider entries once the last processed
height passes a prune target. The last processed height can be
derived from an Update::Block at height H as
H - max_pending_acks (the maximum backlog of blocks the application can buffer).
Fields§
§provider: PProvider for epoch-specific signing schemes.
Must cover every epoch that contains heights the marshal will sync.
epocher: ESConfiguration for epoch lengths across block height ranges.
Must cover every height the marshal will sync.
partition_prefix: StringThe prefix to use for all partitions.
mailbox_size: usizeSize of backfill request/response mailbox.
view_retention_timeout: ViewDeltaMinimum number of views to retain temporary data after the application processes a block.
Useful for keeping around information that peers may desire to have.
prunable_items_per_section: NonZeroU64Prunable archive partition prefix.
page_cache: CacheRefThe page cache to use for the freezer journal.
replay_buffer: NonZeroUsizeThe size of the replay buffer for storage archives.
key_write_buffer: NonZeroUsizeThe size of the write buffer for the key journal of storage archives.
value_write_buffer: NonZeroUsizeThe size of the write buffer for the value journal of storage archives.
block_codec_config: B::CfgCodec configuration for block type.
max_repair: NonZeroUsizeMaximum number of blocks to repair at once.
max_pending_acks: NonZeroUsizeMaximum number of blocks dispatched to the application that have not yet been acknowledged. Increasing this value allows the application to buffer work while marshal continues dispatching, hiding ack latency.
strategy: TStrategy for parallel operations.
Auto Trait Implementations§
impl<B, P, ES, T> Freeze for Config<B, P, ES, T>
impl<B, P, ES, T> !RefUnwindSafe for Config<B, P, ES, T>
impl<B, P, ES, T> Send for Config<B, P, ES, T>
impl<B, P, ES, T> Sync for Config<B, P, ES, T>
impl<B, P, ES, T> Unpin for Config<B, P, ES, T>
impl<B, P, ES, T> UnsafeUnpin for Config<B, P, ES, T>
impl<B, P, ES, T> !UnwindSafe for Config<B, P, ES, 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