mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat: add cross-block cache size cli arg (#14305)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user