pub struct PruneConfig {
pub maintenance_interval: NonZeroUsize,
pub retained_marshal_blocks: usize,
pub retained_qmdb_blocks: usize,
}Expand description
Periodic pruning configuration.
Fields§
§maintenance_interval: NonZeroUsizeFinalized blocks between database and marshal pruning attempts.
Stateful selects a random phase within the interval when it starts. This controls only how often pruning runs, not how much history is retained.
retained_marshal_blocks: usizeFinalized blocks to retain in marshal beyond its acknowledgement window plus one.
This should generally be set to a large enough number of blocks to facilitate downtime on a validator that has completed state sync. If marshal retains too few blocks, a rebooted node may fail to recover due to peers being unable to serve the blocks it needs to catch up.
retained_qmdb_blocks: usizeFinalized blocks’ worth of operations to retain in QMDB beyond marshal’s acknowledgement window plus one.
This value is generally safe to set to 0, as QMDB operations below the active range are only needed to serve state sync requests for lagging peers. Some network topologies may benefit from a non-zero value here to provide a larger buffer for serving state sync requests during periods of instability.
Implementations§
Source§impl PruneConfig
impl PruneConfig
Sourcepub const fn assert_valid(self)
pub const fn assert_valid(self)
Ensure marshal is never pruned more aggressively than QMDB.
Trait Implementations§
Source§impl Clone for PruneConfig
impl Clone for PruneConfig
Source§fn clone(&self) -> PruneConfig
fn clone(&self) -> PruneConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PruneConfig
Source§impl Debug for PruneConfig
impl Debug for PruneConfig
impl Eq for PruneConfig
Source§impl PartialEq for PruneConfig
impl PartialEq for PruneConfig
impl StructuralPartialEq for PruneConfig
Auto Trait Implementations§
impl Freeze for PruneConfig
impl RefUnwindSafe for PruneConfig
impl Send for PruneConfig
impl Sync for PruneConfig
impl Unpin for PruneConfig
impl UnsafeUnpin for PruneConfig
impl UnwindSafe for PruneConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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