Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ pub fn cli_app() -> Command {
Arg::new("block-cache-size")
.long("block-cache-size")
.value_name("SIZE")
.help("Specifies how many blocks the database should cache in memory")
.default_value("0")
.help("DEPRECATED")
.hide(true)
.action(ArgAction::Set)
.display_order(0)
)
Expand Down
6 changes: 2 additions & 4 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,8 @@ pub fn get_config<E: EthSpec>(
client_config.blobs_db_path = Some(PathBuf::from(blobs_db_dir));
}

if let Some(block_cache_size) = cli_args.get_one::<String>("block-cache-size") {
client_config.store.block_cache_size = block_cache_size
.parse()
.map_err(|_| "block-cache-size is not a valid integer".to_string())?;
if cli_args.get_one::<String>("block-cache-size").is_some() {
warn!("The block-cache-size flag is deprecated");
}

if let Some(cache_size) = cli_args.get_one::<String>("state-cache-size") {
Expand Down
4 changes: 0 additions & 4 deletions beacon_node/store/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub const DEFAULT_BACKEND: DatabaseBackend = DatabaseBackend::LevelDb;
pub const PREV_DEFAULT_SLOTS_PER_RESTORE_POINT: u64 = 2048;
pub const DEFAULT_SLOTS_PER_RESTORE_POINT: u64 = 8192;
pub const DEFAULT_EPOCHS_PER_STATE_DIFF: u64 = 8;
pub const DEFAULT_BLOCK_CACHE_SIZE: usize = 0;
pub const DEFAULT_STATE_CACHE_SIZE: NonZeroUsize = new_non_zero_usize(128);
pub const DEFAULT_STATE_CACHE_HEADROOM: NonZeroUsize = new_non_zero_usize(1);
pub const DEFAULT_COMPRESSION_LEVEL: i32 = 1;
Expand All @@ -33,8 +32,6 @@ pub const DEFAULT_BLOB_PUNE_MARGIN_EPOCHS: u64 = 0;
/// Database configuration parameters.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoreConfig {
/// 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: NonZeroUsize,
/// Minimum number of states to cull from the state cache upon fullness.
Expand Down Expand Up @@ -105,7 +102,6 @@ pub enum StoreConfigError {
impl Default for StoreConfig {
fn default() -> Self {
Self {
block_cache_size: DEFAULT_BLOCK_CACHE_SIZE,
state_cache_size: DEFAULT_STATE_CACHE_SIZE,
state_cache_headroom: DEFAULT_STATE_CACHE_HEADROOM,
historic_state_cache_size: DEFAULT_HISTORIC_STATE_CACHE_SIZE,
Expand Down
Loading