From f7f510d7f8364768e5d4564be2ec6d4223a82a0c Mon Sep 17 00:00:00 2001 From: ksolana <110843012+ksolana@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:34:47 -0800 Subject: [PATCH] Remove the ThreadLocalMultiIterator BlockProductionMethod Towards: #3357 --- core/benches/banking_stage.rs | 2 +- core/src/banking_stage.rs | 27 +++------------------------ core/src/validator.rs | 11 ----------- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/core/benches/banking_stage.rs b/core/benches/banking_stage.rs index 3e2d5572e4e761..0f449719ce34cb 100644 --- a/core/benches/banking_stage.rs +++ b/core/benches/banking_stage.rs @@ -291,7 +291,7 @@ fn bench_banking(bencher: &mut Bencher, tx_type: TransactionType) { let cluster_info = Arc::new(cluster_info); let (s, _r) = unbounded(); let _banking_stage = BankingStage::new( - BlockProductionMethod::ThreadLocalMultiIterator, + BlockProductionMethod::CentralScheduler, &cluster_info, &poh_recorder, non_vote_receiver, diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index 94b8f1aeaa68df..1e776d51724149 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -397,22 +397,6 @@ impl BankingStage { enable_forwarding: bool, ) -> Self { match block_production_method { - BlockProductionMethod::ThreadLocalMultiIterator => { - Self::new_thread_local_multi_iterator( - cluster_info, - poh_recorder, - non_vote_receiver, - tpu_vote_receiver, - gossip_vote_receiver, - num_threads, - transaction_status_sender, - replay_vote_sender, - log_messages_bytes_limit, - connection_cache, - bank_forks, - prioritization_fee_cache, - ) - } BlockProductionMethod::CentralScheduler => Self::new_central_scheduler( cluster_info, poh_recorder, @@ -898,7 +882,7 @@ mod tests { let (replay_vote_sender, _replay_vote_receiver) = unbounded(); let banking_stage = BankingStage::new( - BlockProductionMethod::ThreadLocalMultiIterator, + BlockProductionMethod::CentralScheduler, &cluster_info, &poh_recorder, non_vote_receiver, @@ -954,7 +938,7 @@ mod tests { let (replay_vote_sender, _replay_vote_receiver) = unbounded(); let banking_stage = BankingStage::new( - BlockProductionMethod::ThreadLocalMultiIterator, + BlockProductionMethod::CentralScheduler, &cluster_info, &poh_recorder, non_vote_receiver, @@ -1128,11 +1112,6 @@ mod tests { Blockstore::destroy(ledger_path.path()).unwrap(); } - #[test] - fn test_banking_stage_entries_only_thread_local_multi_iterator() { - test_banking_stage_entries_only(BlockProductionMethod::ThreadLocalMultiIterator); - } - #[test] fn test_banking_stage_entries_only_central_scheduler() { test_banking_stage_entries_only(BlockProductionMethod::CentralScheduler); @@ -1396,7 +1375,7 @@ mod tests { let (replay_vote_sender, _replay_vote_receiver) = unbounded(); let banking_stage = BankingStage::new( - BlockProductionMethod::ThreadLocalMultiIterator, + BlockProductionMethod::CentralScheduler, &cluster_info, &poh_recorder, non_vote_receiver, diff --git a/core/src/validator.rs b/core/src/validator.rs index 510c0fb0f71cba..d776c7923efb8d 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -187,7 +187,6 @@ impl BlockVerificationMethod { #[derive(Clone, EnumString, EnumVariantNames, Default, IntoStaticStr, Display)] #[strum(serialize_all = "kebab-case")] pub enum BlockProductionMethod { - ThreadLocalMultiIterator, #[default] CentralScheduler, } @@ -860,16 +859,6 @@ impl Validator { "Using: block-verification-method: {}, block-production-method: {}", config.block_verification_method, config.block_production_method ); - if matches!( - config.block_production_method, - BlockProductionMethod::ThreadLocalMultiIterator - ) { - warn!( - "--block-production-method thread-local-multi-iterator is deprecated \ - and will be removed in a future release. Please use \ - --block-production-method=central-scheduler instead." - ); - } let (replay_vote_sender, replay_vote_receiver) = unbounded();