Skip to content

Commit e969262

Browse files
authored
refactor: rename disable_caching_and_prewarming to disable_prewarming (#19072)
1 parent be648d9 commit e969262

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

crates/engine/primitives/src/config.rs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ pub struct TreeConfig {
9292
/// Whether to always compare trie updates from the state root task to the trie updates from
9393
/// the regular state root calculation.
9494
always_compare_trie_updates: bool,
95-
/// Whether to disable cross-block caching and parallel prewarming.
96-
disable_caching_and_prewarming: bool,
95+
/// Whether to disable parallel prewarming.
96+
disable_prewarming: bool,
9797
/// Whether to disable the parallel sparse trie state root algorithm.
9898
disable_parallel_sparse_trie: bool,
9999
/// Whether to enable state provider metrics.
@@ -148,7 +148,7 @@ impl Default for TreeConfig {
148148
max_execute_block_batch_size: DEFAULT_MAX_EXECUTE_BLOCK_BATCH_SIZE,
149149
legacy_state_root: false,
150150
always_compare_trie_updates: false,
151-
disable_caching_and_prewarming: false,
151+
disable_prewarming: false,
152152
disable_parallel_sparse_trie: false,
153153
state_provider_metrics: false,
154154
cross_block_cache_size: DEFAULT_CROSS_BLOCK_CACHE_SIZE,
@@ -179,7 +179,7 @@ impl TreeConfig {
179179
max_execute_block_batch_size: usize,
180180
legacy_state_root: bool,
181181
always_compare_trie_updates: bool,
182-
disable_caching_and_prewarming: bool,
182+
disable_prewarming: bool,
183183
disable_parallel_sparse_trie: bool,
184184
state_provider_metrics: bool,
185185
cross_block_cache_size: u64,
@@ -205,7 +205,7 @@ impl TreeConfig {
205205
max_execute_block_batch_size,
206206
legacy_state_root,
207207
always_compare_trie_updates,
208-
disable_caching_and_prewarming,
208+
disable_prewarming,
209209
disable_parallel_sparse_trie,
210210
state_provider_metrics,
211211
cross_block_cache_size,
@@ -285,9 +285,9 @@ impl TreeConfig {
285285
self.disable_parallel_sparse_trie
286286
}
287287

288-
/// Returns whether or not cross-block caching and parallel prewarming should be used.
289-
pub const fn disable_caching_and_prewarming(&self) -> bool {
290-
self.disable_caching_and_prewarming
288+
/// Returns whether or not parallel prewarming should be used.
289+
pub const fn disable_prewarming(&self) -> bool {
290+
self.disable_prewarming
291291
}
292292

293293
/// Returns whether to always compare trie updates from the state root task to the trie updates
@@ -377,12 +377,9 @@ impl TreeConfig {
377377
self
378378
}
379379

380-
/// Setter for whether to disable cross-block caching and parallel prewarming.
381-
pub const fn without_caching_and_prewarming(
382-
mut self,
383-
disable_caching_and_prewarming: bool,
384-
) -> Self {
385-
self.disable_caching_and_prewarming = disable_caching_and_prewarming;
380+
/// Setter for whether to disable parallel prewarming.
381+
pub const fn without_prewarming(mut self, disable_prewarming: bool) -> Self {
382+
self.disable_prewarming = disable_prewarming;
386383
self
387384
}
388385

crates/engine/tree/src/tree/payload_processor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ where
117117
execution_cache: Default::default(),
118118
trie_metrics: Default::default(),
119119
cross_block_cache_size: config.cross_block_cache_size(),
120-
disable_transaction_prewarming: config.disable_caching_and_prewarming(),
120+
disable_transaction_prewarming: config.disable_prewarming(),
121121
evm_config,
122122
precompile_cache_disabled: config.precompile_cache_disabled(),
123123
precompile_cache_map,

crates/node/core/src/args/engine.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ pub struct EngineArgs {
3030
#[deprecated]
3131
pub caching_and_prewarming_enabled: bool,
3232

33-
/// Disable cross-block caching and parallel prewarming
34-
#[arg(long = "engine.disable-caching-and-prewarming")]
35-
pub caching_and_prewarming_disabled: bool,
33+
/// Disable parallel prewarming
34+
#[arg(long = "engine.disable-prewarming", alias = "engine.disable-caching-and-prewarming")]
35+
pub prewarming_disabled: bool,
3636

3737
/// CAUTION: This CLI flag has no effect anymore, use --engine.disable-parallel-sparse-trie
3838
/// if you want to disable usage of the `ParallelSparseTrie`.
@@ -129,7 +129,7 @@ impl Default for EngineArgs {
129129
legacy_state_root_task_enabled: false,
130130
state_root_task_compare_updates: false,
131131
caching_and_prewarming_enabled: true,
132-
caching_and_prewarming_disabled: false,
132+
prewarming_disabled: false,
133133
parallel_sparse_trie_enabled: true,
134134
parallel_sparse_trie_disabled: false,
135135
state_provider_metrics: false,
@@ -157,7 +157,7 @@ impl EngineArgs {
157157
.with_persistence_threshold(self.persistence_threshold)
158158
.with_memory_block_buffer_target(self.memory_block_buffer_target)
159159
.with_legacy_state_root(self.legacy_state_root_task_enabled)
160-
.without_caching_and_prewarming(self.caching_and_prewarming_disabled)
160+
.without_prewarming(self.prewarming_disabled)
161161
.with_disable_parallel_sparse_trie(self.parallel_sparse_trie_disabled)
162162
.with_state_provider_metrics(self.state_provider_metrics)
163163
.with_always_compare_trie_updates(self.state_root_task_compare_updates)

docs/vocs/docs/pages/cli/reth/node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ Engine:
815815
--engine.legacy-state-root
816816
Enable legacy state root
817817
818-
--engine.disable-caching-and-prewarming
819-
Disable cross-block caching and parallel prewarming
818+
--engine.disable-prewarming
819+
Disable parallel prewarming
820820
821821
--engine.disable-parallel-sparse-trie
822822
Disable the parallel sparse trie in the engine

0 commit comments

Comments
 (0)