Skip to content

Add RocksDB Provider to DatabaseProvider #20152

@Rjected

Description

@Rjected

Describe the feature

The DatabaseProvider is the main way we read from and write to the database and static files. We should add the RocksDBProvider to DatabaseProvider:

/// A provider struct that fetches data from the database.
/// Wrapper around [`DbTx`] and [`DbTxMut`]. Example: [`HeaderProvider`] [`BlockHashReader`]
#[derive(Debug)]
pub struct DatabaseProvider<TX, N: NodeTypes> {
/// Database transaction.
tx: TX,
/// Chain spec
chain_spec: Arc<N::ChainSpec>,
/// Static File provider
static_file_provider: StaticFileProvider<N::Primitives>,
/// Pruning configuration
prune_modes: PruneModes,
/// Node storage handler.
storage: Arc<N::Storage>,
/// Storage configuration settings for this node
storage_settings: Arc<RwLock<StorageSettings>>,
/// Minimum distance from tip required for pruning
minimum_pruning_distance: u64,
}

So that we can use RocksDB in provider implementations.

Additional context

No response

Metadata

Metadata

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions