From 01f42a4d17392c495d597f14d8ad595eed754688 Mon Sep 17 00:00:00 2001 From: Thor Kamphefner Date: Thu, 14 May 2020 14:34:24 +0200 Subject: [PATCH] removed state-cache-size flag from beacon_node/src (#1120) * removed state-cache-size flag from beacon_node/src * removed state-cache-size related lines from store/src/config.rs --- beacon_node/src/cli.rs | 8 +------- beacon_node/src/config.rs | 6 ------ beacon_node/store/src/config.rs | 4 ---- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 3e2d7a3287..4747ec27ac 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -229,13 +229,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .help("Specifies how many blocks the database should cache in memory [default: 5]") .takes_value(true) ) - .arg( - Arg::with_name("state-cache-size") - .long("state-cache-size") - .value_name("SIZE") - .help("Specifies how many states the database should cache in memory [default: 5]") - .takes_value(true) - ) + /* * Purge. */ diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 2b848c81b3..cd46303512 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -311,12 +311,6 @@ pub fn get_config( .map_err(|_| "block-cache-size is not a valid integer".to_string())?; } - if let Some(state_cache_size) = cli_args.value_of("state-cache-size") { - client_config.store.state_cache_size = state_cache_size - .parse() - .map_err(|_| "block-cache-size is not a valid integer".to_string())?; - } - if spec_constants != client_config.spec_constants { crit!(log, "Specification constants do not match."; "client_config" => client_config.spec_constants.to_string(), diff --git a/beacon_node/store/src/config.rs b/beacon_node/store/src/config.rs index 8249cda2c9..bebddf8fac 100644 --- a/beacon_node/store/src/config.rs +++ b/beacon_node/store/src/config.rs @@ -3,7 +3,6 @@ use types::{EthSpec, MinimalEthSpec}; pub const DEFAULT_SLOTS_PER_RESTORE_POINT: u64 = 2048; pub const DEFAULT_BLOCK_CACHE_SIZE: usize = 5; -pub const DEFAULT_STATE_CACHE_SIZE: usize = 5; /// Database configuration parameters. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -12,8 +11,6 @@ pub struct StoreConfig { pub slots_per_restore_point: u64, /// Maximum number of blocks to store in the in-memory block cache. pub block_cache_size: usize, - /// Maximum number of states to store in the in-memory state cache. - pub state_cache_size: usize, } impl Default for StoreConfig { @@ -22,7 +19,6 @@ impl Default for StoreConfig { // Safe default for tests, shouldn't ever be read by a CLI node. slots_per_restore_point: MinimalEthSpec::slots_per_historical_root() as u64, block_cache_size: DEFAULT_BLOCK_CACHE_SIZE, - state_cache_size: DEFAULT_STATE_CACHE_SIZE, } } }