From 560143a267a81caaa00cbf28b123c06caef080e9 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Fri, 9 Dec 2022 13:31:55 -0600 Subject: [PATCH] remove ValidatorConfig.caching_enabled (#29172) --- bench-tps/tests/bench_tps.rs | 1 - core/src/validator.rs | 7 ++----- local-cluster/src/validator_configs.rs | 1 - local-cluster/tests/local_cluster.rs | 1 - test-validator/src/lib.rs | 1 - validator/src/main.rs | 1 - 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bench-tps/tests/bench_tps.rs b/bench-tps/tests/bench_tps.rs index 6b9abe7b6..f8098fbe7 100644 --- a/bench-tps/tests/bench_tps.rs +++ b/bench-tps/tests/bench_tps.rs @@ -63,7 +63,6 @@ fn test_bench_tps_local_cluster(config: Config) { cluster_lamports: 200_000_000, validator_configs: make_identical_validator_configs( &ValidatorConfig { - accounts_db_caching_enabled: true, rpc_config: JsonRpcConfig { faucet_addr: Some(faucet_addr), ..JsonRpcConfig::default_for_test() diff --git a/core/src/validator.rs b/core/src/validator.rs index 6fb207265..c50b03378 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -162,7 +162,6 @@ pub struct ValidatorConfig { pub poh_hashes_per_batch: u64, pub process_ledger_before_services: bool, pub account_indexes: AccountSecondaryIndexes, - pub accounts_db_caching_enabled: bool, pub accounts_db_config: Option, pub warp_slot: Option, pub accounts_db_test_hash_calculation: bool, @@ -224,7 +223,6 @@ impl Default for ValidatorConfig { poh_hashes_per_batch: poh_service::DEFAULT_HASHES_PER_BATCH, process_ledger_before_services: false, account_indexes: AccountSecondaryIndexes::default(), - accounts_db_caching_enabled: false, warp_slot: None, accounts_db_test_hash_calculation: false, accounts_db_skip_shrink: false, @@ -245,7 +243,6 @@ impl Default for ValidatorConfig { impl ValidatorConfig { pub fn default_for_test() -> Self { Self { - accounts_db_caching_enabled: true, enforce_ulimit_nofile: false, rpc_config: JsonRpcConfig::default_for_test(), ..Self::default() @@ -638,7 +635,7 @@ impl Validator { snapshot_request_handler, pruned_banks_request_handler, }, - config.accounts_db_caching_enabled, + true, // caching_enabled config.accounts_db_test_hash_calculation, last_full_snapshot_slot, ); @@ -1407,7 +1404,7 @@ fn load_blockstore( new_hard_forks: config.new_hard_forks.clone(), debug_keys: config.debug_keys.clone(), account_indexes: config.account_indexes.clone(), - accounts_db_caching_enabled: config.accounts_db_caching_enabled, + accounts_db_caching_enabled: true, accounts_db_config: config.accounts_db_config.clone(), shrink_ratio: config.accounts_shrink_ratio, accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation, diff --git a/local-cluster/src/validator_configs.rs b/local-cluster/src/validator_configs.rs index 88a6977a4..044b94dcf 100644 --- a/local-cluster/src/validator_configs.rs +++ b/local-cluster/src/validator_configs.rs @@ -48,7 +48,6 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig { no_os_disk_stats_reporting: config.no_os_disk_stats_reporting, poh_pinned_cpu_core: config.poh_pinned_cpu_core, account_indexes: config.account_indexes.clone(), - accounts_db_caching_enabled: config.accounts_db_caching_enabled, warp_slot: config.warp_slot, accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation, accounts_db_skip_shrink: config.accounts_db_skip_shrink, diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index 4f3135134..d62403c06 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -2195,7 +2195,6 @@ fn test_hard_fork_with_gap_in_roots() { let validator_config = ValidatorConfig { snapshot_config: LocalCluster::create_dummy_load_only_snapshot_config(), - accounts_db_caching_enabled: true, ..ValidatorConfig::default() }; let mut config = ClusterConfig { diff --git a/test-validator/src/lib.rs b/test-validator/src/lib.rs index a21415776..9c3bcccad 100644 --- a/test-validator/src/lib.rs +++ b/test-validator/src/lib.rs @@ -794,7 +794,6 @@ impl TestValidator { let mut validator_config = ValidatorConfig { geyser_plugin_config_files: config.geyser_plugin_config_files.clone(), - accounts_db_caching_enabled: config.accounts_db_caching_enabled, rpc_addrs: Some(( SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), node.info.rpc.port()), SocketAddr::new( diff --git a/validator/src/main.rs b/validator/src/main.rs index 4b88ec193..a8fe62670 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1131,7 +1131,6 @@ pub fn main() { .unwrap_or(poh_service::DEFAULT_HASHES_PER_BATCH), process_ledger_before_services: matches.is_present("process_ledger_before_services"), account_indexes, - accounts_db_caching_enabled: true, accounts_db_test_hash_calculation: matches.is_present("accounts_db_test_hash_calculation"), accounts_db_config, accounts_db_skip_shrink: matches.is_present("accounts_db_skip_shrink"),