feat: add cross-block cache size cli arg (#14305)

This commit is contained in:
Federico Gimenez
2025-02-10 20:31:40 +01:00
committed by GitHub
parent 731b771fa2
commit d9e660bd56
7 changed files with 64 additions and 27 deletions

View File

@@ -2,7 +2,10 @@
use clap::Args;
use crate::node_config::{DEFAULT_MEMORY_BLOCK_BUFFER_TARGET, DEFAULT_PERSISTENCE_THRESHOLD};
use crate::node_config::{
DEFAULT_CROSS_BLOCK_CACHE_SIZE_MB, DEFAULT_MEMORY_BLOCK_BUFFER_TARGET,
DEFAULT_PERSISTENCE_THRESHOLD,
};
/// Parameters for configuring the engine driver.
#[derive(Debug, Clone, Args, PartialEq, Eq)]
@@ -24,6 +27,10 @@ pub struct EngineArgs {
#[arg(long = "engine.caching-and-prewarming")]
pub caching_and_prewarming_enabled: bool,
/// Configure the size of cross-block cache in megabytes
#[arg(long = "engine.cross-block-cache-size", default_value_t = DEFAULT_CROSS_BLOCK_CACHE_SIZE_MB)]
pub cross_block_cache_size: u64,
/// Enable comparing trie updates from the state root task to the trie updates from the regular
/// state root calculation.
#[arg(long = "engine.state-root-task-compare-updates")]
@@ -38,6 +45,7 @@ impl Default for EngineArgs {
state_root_task_enabled: false,
state_root_task_compare_updates: false,
caching_and_prewarming_enabled: false,
cross_block_cache_size: DEFAULT_CROSS_BLOCK_CACHE_SIZE_MB,
}
}
}