pub struct StoragePrunerConfig {
    pub enable_state_store_pruner: bool,
    pub enable_ledger_pruner: bool,
    pub state_store_prune_window: u64,
    pub ledger_prune_window: u64,
    pub ledger_pruning_batch_size: usize,
    pub state_store_pruning_batch_size: usize,
    pub user_pruning_window_offset: u64,
}

Fields

enable_state_store_pruner: bool

Boolean to enable/disable the state store pruner. The state pruner is responsible for pruning state tree nodes.

enable_ledger_pruner: bool

Boolean to enable/disable the ledger pruner. The ledger pruner is responsible for pruning everything else except for states (e.g. transactions, events etc.)

state_store_prune_window: u64

The size of the window should be calculated based on disk space availability and system TPS.

ledger_prune_window: u64

This is the default pruning window for any other store except for state store. State store being big in size, we might want to configure a smaller window for state store vs other store.

ledger_pruning_batch_size: usize

Batch size of the versions to be sent to the ledger pruner - this is to avoid slowdown due to issuing too many DB calls and batch prune instead. For ledger pruner, this means the number of versions to prune a time.

state_store_pruning_batch_size: usize

Similar to the variable above but for state store pruner. It means the number of stale nodes to prune a time.

user_pruning_window_offset: u64

The offset for user pruning window to adjust

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

Generates a hash used only for tests.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more