mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Storage chains part 1 (#7868)
* CLI options and DB upgrade * Transaction storage * Block pruning * Block pruning test * Style * Naming * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Style Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -326,8 +326,10 @@ pub fn new_full_parts<TBl, TRtApi, TExecDisp>(
|
||||
state_cache_size: config.state_cache_size,
|
||||
state_cache_child_ratio:
|
||||
config.state_cache_child_ratio.map(|v| (v, 100)),
|
||||
pruning: config.pruning.clone(),
|
||||
state_pruning: config.state_pruning.clone(),
|
||||
source: config.database.clone(),
|
||||
keep_blocks: config.keep_blocks.clone(),
|
||||
transaction_storage: config.transaction_storage.clone(),
|
||||
};
|
||||
|
||||
let extensions = sc_client_api::execution_extensions::ExecutionExtensions::new(
|
||||
@@ -384,8 +386,10 @@ pub fn new_light_parts<TBl, TRtApi, TExecDisp>(
|
||||
state_cache_size: config.state_cache_size,
|
||||
state_cache_child_ratio:
|
||||
config.state_cache_child_ratio.map(|v| (v, 100)),
|
||||
pruning: config.pruning.clone(),
|
||||
state_pruning: config.state_pruning.clone(),
|
||||
source: config.database.clone(),
|
||||
keep_blocks: config.keep_blocks.clone(),
|
||||
transaction_storage: config.transaction_storage.clone(),
|
||||
};
|
||||
sc_client_db::light::LightStorage::new(db_settings)?
|
||||
};
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
|
||||
//! Service configuration.
|
||||
|
||||
pub use sc_client_db::{Database, PruningMode, DatabaseSettingsSrc as DatabaseConfig};
|
||||
pub use sc_client_db::{
|
||||
Database, PruningMode, DatabaseSettingsSrc as DatabaseConfig,
|
||||
KeepBlocks, TransactionStorageMode
|
||||
};
|
||||
pub use sc_network::Multiaddr;
|
||||
pub use sc_network::config::{ExtTransport, MultiaddrWithPeerId, NetworkConfiguration, Role, NodeKeyConfig};
|
||||
pub use sc_executor::WasmExecutionMethod;
|
||||
@@ -58,8 +61,12 @@ pub struct Configuration {
|
||||
pub state_cache_size: usize,
|
||||
/// Size in percent of cache size dedicated to child tries
|
||||
pub state_cache_child_ratio: Option<usize>,
|
||||
/// Pruning settings.
|
||||
pub pruning: PruningMode,
|
||||
/// State pruning settings.
|
||||
pub state_pruning: PruningMode,
|
||||
/// Number of blocks to keep in the db.
|
||||
pub keep_blocks: KeepBlocks,
|
||||
/// Transaction storage scheme.
|
||||
pub transaction_storage: TransactionStorageMode,
|
||||
/// Chain configuration.
|
||||
pub chain_spec: Box<dyn ChainSpec>,
|
||||
/// Wasm execution method.
|
||||
|
||||
@@ -60,6 +60,7 @@ pub use self::builder::{
|
||||
};
|
||||
pub use config::{
|
||||
BasePath, Configuration, DatabaseConfig, PruningMode, Role, RpcMethods, TaskExecutor, TaskType,
|
||||
KeepBlocks, TransactionStorageMode,
|
||||
};
|
||||
pub use sc_chain_spec::{
|
||||
ChainSpec, GenericChainSpec, Properties, RuntimeGenesis, Extension as ChainSpecExtension,
|
||||
|
||||
Reference in New Issue
Block a user