Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New exec code path rebased #33070

Closed
wants to merge 5,455 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5455 commits
Select commit Hold shift + click to select a range
67de56f
save
ryoqun Feb 18, 2024
8afe4e3
save
ryoqun Feb 18, 2024
3188b39
save
ryoqun Feb 18, 2024
61b3d15
save
ryoqun Feb 18, 2024
2f748b5
save
ryoqun Feb 18, 2024
7485349
save
ryoqun Feb 18, 2024
867eb2f
save
ryoqun Feb 18, 2024
51e4527
save
ryoqun Feb 18, 2024
6ea71be
save
ryoqun Feb 18, 2024
1882ca7
save
ryoqun Feb 18, 2024
1a07a4b
save
ryoqun Feb 18, 2024
6fd7edf
save
ryoqun Feb 18, 2024
a29d750
save
ryoqun Feb 18, 2024
cecfb63
save
ryoqun Feb 18, 2024
5c70a69
save
ryoqun Feb 18, 2024
11e76bc
save
ryoqun Feb 18, 2024
8867965
save
ryoqun Feb 18, 2024
b2c65de
save
ryoqun Feb 18, 2024
d7e9f87
save
ryoqun Feb 18, 2024
b4626c1
save
ryoqun Feb 18, 2024
110e7cc
save
ryoqun Feb 18, 2024
1ca49d3
save
ryoqun Feb 18, 2024
de976a6
save
ryoqun Feb 18, 2024
9ed6fdd
save
ryoqun Feb 18, 2024
c7b7505
save
ryoqun Feb 18, 2024
4376d5d
save
ryoqun Feb 18, 2024
99d3a69
save
ryoqun Feb 18, 2024
349dd7e
save
ryoqun Feb 18, 2024
87d17f4
save
ryoqun Feb 18, 2024
347fb3b
save
ryoqun Feb 18, 2024
9e5eb88
save
ryoqun Feb 18, 2024
0ef0a45
save
ryoqun Feb 18, 2024
7b45a17
save
ryoqun Feb 18, 2024
795a09d
save
ryoqun Feb 18, 2024
e184747
save
ryoqun Feb 18, 2024
c419fa0
save
ryoqun Feb 18, 2024
55a5df7
save
ryoqun Feb 18, 2024
1b56b65
save
ryoqun Feb 18, 2024
fb754b5
save
ryoqun Feb 18, 2024
0bb6f76
save
ryoqun Feb 18, 2024
44e9e8c
save
ryoqun Feb 18, 2024
76edf2b
save
ryoqun Feb 18, 2024
506746f
save
ryoqun Feb 18, 2024
f417e91
save
ryoqun Feb 18, 2024
ff9480a
save
ryoqun Feb 18, 2024
bbb4e12
save
ryoqun Feb 18, 2024
ca31559
save
ryoqun Feb 18, 2024
96bddf1
save
ryoqun Feb 18, 2024
3c65141
save
ryoqun Feb 18, 2024
6659a3b
save
ryoqun Feb 18, 2024
238e889
save
ryoqun Feb 18, 2024
5078419
save
ryoqun Feb 18, 2024
784639d
save
ryoqun Feb 18, 2024
0bbdeb2
save
ryoqun Feb 18, 2024
0fcbc26
save
ryoqun Feb 18, 2024
e219321
save
ryoqun Feb 18, 2024
5381389
save
ryoqun Feb 18, 2024
0fb4968
save
ryoqun Feb 18, 2024
9f6d7f6
save
ryoqun Feb 18, 2024
f6df800
save
ryoqun Feb 18, 2024
f2c57d4
save
ryoqun Feb 18, 2024
f033a72
save
ryoqun Feb 18, 2024
cfb52e1
save
ryoqun Feb 19, 2024
11b95b5
save
ryoqun Feb 19, 2024
2712908
save
ryoqun Feb 19, 2024
965b21e
save
ryoqun Feb 19, 2024
a4cca9c
save
ryoqun Feb 19, 2024
22800d3
save
ryoqun Feb 19, 2024
f8b9fec
save
ryoqun Feb 19, 2024
d5941d2
save
ryoqun Feb 19, 2024
69a2698
save
ryoqun Feb 19, 2024
0923738
save
ryoqun Feb 19, 2024
9fa53be
save
ryoqun Feb 19, 2024
9dd7e22
save
ryoqun Feb 19, 2024
8bc2aba
save
ryoqun Feb 19, 2024
f12b38c
save
ryoqun Feb 19, 2024
af6e86c
save
ryoqun Feb 19, 2024
0119429
save
ryoqun Feb 19, 2024
acf9c28
save
ryoqun Feb 19, 2024
1f3fb78
save
ryoqun Feb 19, 2024
0d726a5
save
ryoqun Feb 19, 2024
73bcc8a
save
ryoqun Feb 19, 2024
330b621
save
ryoqun Feb 19, 2024
5dc30ba
save
ryoqun Feb 19, 2024
5a72062
save
ryoqun Feb 19, 2024
9ec299f
save
ryoqun Feb 19, 2024
1a079eb
save
ryoqun Feb 19, 2024
59c1c5c
save
ryoqun Feb 19, 2024
6d19992
save
ryoqun Feb 19, 2024
d93ea2c
save
ryoqun Feb 19, 2024
7ab076d
save
ryoqun Feb 19, 2024
1f872cb
save
ryoqun Feb 19, 2024
4d0b8b4
save
ryoqun Feb 19, 2024
82d95c7
save
ryoqun Feb 19, 2024
ff38944
save
ryoqun Feb 19, 2024
1a43235
save
ryoqun Feb 19, 2024
4ae107b
save
ryoqun Feb 19, 2024
06990bf
save
ryoqun Feb 19, 2024
c1ed040
save
ryoqun Feb 19, 2024
bc9835e
save
ryoqun Feb 19, 2024
8b558f1
save
ryoqun Feb 19, 2024
d96f1e1
save
ryoqun Feb 19, 2024
877a1a6
save
ryoqun Feb 19, 2024
8b15a7b
save
ryoqun Feb 19, 2024
2b00a70
save
ryoqun Feb 19, 2024
156a6e8
save
ryoqun Feb 19, 2024
5f40172
save
ryoqun Feb 19, 2024
509ce44
save
ryoqun Feb 19, 2024
369f1be
save
ryoqun Feb 19, 2024
95f0b46
save
ryoqun Feb 19, 2024
28ca6f7
save
ryoqun Feb 19, 2024
4aa134e
save
ryoqun Feb 19, 2024
4d25815
save
ryoqun Feb 19, 2024
c5d426d
save
ryoqun Feb 19, 2024
fd8954c
save
ryoqun Feb 21, 2024
48a56eb
save
ryoqun Feb 21, 2024
d574b32
save
ryoqun Feb 21, 2024
85b0a83
save
ryoqun Feb 21, 2024
aa028f1
save
ryoqun Feb 21, 2024
9fc35f4
save
ryoqun Feb 21, 2024
3b160e7
save
ryoqun Feb 21, 2024
1bfbbf7
save
ryoqun Feb 21, 2024
ae8138a
save
ryoqun Feb 21, 2024
ff8b936
save
ryoqun Feb 21, 2024
ecfd83a
save
ryoqun Feb 21, 2024
af39166
save
ryoqun Feb 21, 2024
d8c0882
save
ryoqun Feb 21, 2024
d018023
save
ryoqun Feb 21, 2024
21e9927
save
ryoqun Feb 21, 2024
4e60470
save
ryoqun Feb 21, 2024
3f441c7
save
ryoqun Feb 21, 2024
f7cb08d
save
ryoqun Feb 21, 2024
a2adba1
save
ryoqun Feb 21, 2024
2145be6
save
ryoqun Feb 21, 2024
327ac74
save
ryoqun Feb 21, 2024
32ae5f3
save
ryoqun Feb 21, 2024
75efc23
save
ryoqun Feb 21, 2024
58f2a40
save
ryoqun Feb 21, 2024
14e641c
save
ryoqun Feb 21, 2024
2c52888
save
ryoqun Feb 21, 2024
09470f9
save
ryoqun Feb 21, 2024
6c543a3
save
ryoqun Feb 21, 2024
06743cf
save
ryoqun Feb 21, 2024
6f79278
save
ryoqun Feb 21, 2024
ed2658a
save
ryoqun Feb 21, 2024
b262a14
save
ryoqun Feb 21, 2024
99bded0
save
ryoqun Feb 21, 2024
26f411d
save
ryoqun Feb 21, 2024
25a4159
save
ryoqun Feb 21, 2024
e82c82a
save
ryoqun Feb 22, 2024
ab8cf30
save
ryoqun Feb 22, 2024
9e852d4
save
ryoqun Feb 22, 2024
161c963
save
ryoqun Feb 22, 2024
44d2b31
save
ryoqun Feb 22, 2024
dd0795f
save
ryoqun Feb 22, 2024
9a9fe97
save
ryoqun Feb 22, 2024
4c01ab3
save
ryoqun Feb 22, 2024
123d0dd
save
ryoqun Feb 22, 2024
433f799
save
ryoqun Feb 22, 2024
ec16178
save
ryoqun Feb 22, 2024
94e8a68
save
ryoqun Feb 22, 2024
67121c1
save
ryoqun Feb 22, 2024
55c754e
save
ryoqun Feb 22, 2024
022a15a
save
ryoqun Feb 22, 2024
efcd0cf
save
ryoqun Feb 22, 2024
927a4a7
save
ryoqun Feb 22, 2024
ea3c372
save
ryoqun Feb 22, 2024
f141cba
save
ryoqun Feb 22, 2024
8d3a2d6
save
ryoqun Feb 22, 2024
b8b8fcf
save
ryoqun Feb 22, 2024
1f0d6d1
save
ryoqun Feb 22, 2024
b231ae8
save
ryoqun Feb 22, 2024
de3c41e
save
ryoqun Feb 22, 2024
f5c3bf4
save
ryoqun Feb 22, 2024
987a16c
save
ryoqun Feb 22, 2024
a89a515
save
ryoqun Feb 22, 2024
86d9e01
save
ryoqun Feb 22, 2024
be5abf6
save
ryoqun Feb 22, 2024
f35f22e
save
ryoqun Feb 22, 2024
32c0cb2
save
ryoqun Feb 22, 2024
08d486e
save
ryoqun Feb 22, 2024
9bdd412
save
ryoqun Feb 22, 2024
48b392a
save
ryoqun Feb 22, 2024
1f4afbe
save
ryoqun Feb 22, 2024
ab66b6c
save
ryoqun Feb 22, 2024
9a900bc
save
ryoqun Feb 22, 2024
096d204
save
ryoqun Feb 22, 2024
51cb52c
save
ryoqun Feb 22, 2024
0b48dbd
save
ryoqun Feb 22, 2024
7ee39f1
save
ryoqun Feb 22, 2024
5fd146e
save
ryoqun Feb 22, 2024
523d0d5
save
ryoqun Feb 22, 2024
5af8ae2
save
ryoqun Feb 22, 2024
6da148c
save
ryoqun Feb 22, 2024
3711ca6
save
ryoqun Feb 22, 2024
04a0655
save
ryoqun Feb 22, 2024
8e6c4e7
save
ryoqun Feb 22, 2024
66315a5
save
ryoqun Feb 22, 2024
0525d15
save
ryoqun Feb 22, 2024
0915e27
save
ryoqun Feb 22, 2024
11cf831
save
ryoqun Feb 22, 2024
b503091
save
ryoqun Feb 22, 2024
1498044
save
ryoqun Feb 22, 2024
02d3ca4
save
ryoqun Feb 22, 2024
5c30282
save
ryoqun Feb 22, 2024
a14422c
save
ryoqun Feb 22, 2024
cdec813
save
ryoqun Feb 22, 2024
0e9c3c5
save
ryoqun Feb 22, 2024
cd72fd9
save
ryoqun Feb 22, 2024
950b259
save
ryoqun Feb 22, 2024
77d824c
save
ryoqun Feb 22, 2024
743c9ed
save
ryoqun Feb 22, 2024
9b8ff30
save
ryoqun Feb 22, 2024
8eb4e4a
save
ryoqun Feb 22, 2024
866aa33
save
ryoqun Feb 22, 2024
7a380cd
save
ryoqun Feb 22, 2024
496e139
save
ryoqun Feb 22, 2024
4ed0b4f
save
ryoqun Feb 22, 2024
32735ff
save
ryoqun Feb 22, 2024
679b26d
save
ryoqun Feb 22, 2024
dd3178c
save
ryoqun Feb 22, 2024
5488e79
save
ryoqun Feb 22, 2024
58879a2
save
ryoqun Feb 22, 2024
eb12b82
save
ryoqun Feb 22, 2024
8a8830a
save
ryoqun Feb 22, 2024
efcf3cb
save
ryoqun Feb 22, 2024
9c23870
save
ryoqun Feb 22, 2024
fd2b074
save
ryoqun Feb 22, 2024
805f1d2
save
ryoqun Feb 22, 2024
e2a3ff4
save
ryoqun Feb 22, 2024
3a91944
save
ryoqun Feb 22, 2024
5fc1775
save
ryoqun Feb 22, 2024
2412099
save
ryoqun Feb 22, 2024
808fa6f
save
ryoqun Feb 22, 2024
87d6847
save
ryoqun Feb 22, 2024
b1edd36
save
ryoqun Feb 22, 2024
0dca9f3
save
ryoqun Feb 22, 2024
70f2e5e
save
ryoqun Feb 22, 2024
20a0d67
save
ryoqun Feb 22, 2024
5759892
save
ryoqun Feb 22, 2024
021b791
save
ryoqun Feb 22, 2024
34a6c61
save
ryoqun Feb 22, 2024
41c98ea
save
ryoqun Feb 22, 2024
c843522
save
ryoqun Feb 22, 2024
0440535
save
ryoqun Feb 22, 2024
317fb97
save
ryoqun Feb 22, 2024
6893f49
Merge remote-tracking branch 'origin/master' into HEAD
ryoqun Feb 22, 2024
1c8b2d8
save
ryoqun Feb 22, 2024
95774a6
save
ryoqun Feb 22, 2024
ffb457f
save
ryoqun Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 191 additions & 26 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ console_error_panic_hook = "0.1.7"
console_log = "0.2.2"
const_format = "0.2.32"
core_affinity = "0.5.10"
cpu-time = "1.0.0"
criterion = "0.5.1"
criterion-stats = "0.3.0"
crossbeam-channel = "0.5.11"
Expand Down Expand Up @@ -268,6 +269,7 @@ predicates = "2.1"
pretty-hex = "0.3.0"
prio-graph = "0.2.1"
proc-macro2 = "1.0.78"
procfs = "0.16.0"
proptest = "1.4"
prost = "0.11.9"
prost-build = "0.11.9"
Expand All @@ -288,6 +290,7 @@ reqwest = { version = "0.11.23", default-features = false }
rolling-file = "0.2.0"
rpassword = "7.3"
rustc_version = "0.4"
rustix = "0.38.21"
rustls = { version = "0.21.10", default-features = false, features = ["quic"] }
rustversion = "1.0.14"
scopeguard = "1.2.0"
Expand Down Expand Up @@ -439,6 +442,8 @@ zstd = "0.11.2"
# for details, see https://github.com/solana-labs/crossbeam/commit/fd279d707025f0e60951e429bf778b4813d1b6bf
crossbeam-epoch = { git = "https://github.com/solana-labs/crossbeam", rev = "fd279d707025f0e60951e429bf778b4813d1b6bf" }

crossbeam-channel = { git = "https://github.com/ryoqun/crossbeam", rev = "438ec7cdaf6c6a8f593e50344c725fef8a13c7a5" }

# We include the following crates as our dependencies above from crates.io:
#
# * spl-associated-token-account
Expand Down
4 changes: 4 additions & 0 deletions ci/test-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ _ $cargoNightly bench --manifest-path gossip/Cargo.toml ${V:+--verbose} \
_ $cargoNightly bench --manifest-path poh/Cargo.toml ${V:+--verbose} \
-- -Z unstable-options --format=json | tee -a "$BENCH_FILE"

# Run scheduler-pool benches
_ $cargoNightly bench --manifest-path scheduler-pool/Cargo.toml ${V:+--verbose} \
-- -Z unstable-options --format=json | tee -a "$BENCH_FILE"

# Run core benches
_ $cargoNightly bench --manifest-path core/Cargo.toml ${V:+--verbose} \
-- -Z unstable-options --format=json | tee -a "$BENCH_FILE"
Expand Down
9 changes: 3 additions & 6 deletions core/src/drop_bank_service.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
use {
crossbeam_channel::Receiver,
solana_measure::measure::Measure,
solana_runtime::bank::Bank,
std::{
sync::Arc,
thread::{self, Builder, JoinHandle},
},
solana_runtime::installed_scheduler_pool::BankWithScheduler,
std::thread::{self, Builder, JoinHandle},
};

pub struct DropBankService {
thread_hdl: JoinHandle<()>,
}

impl DropBankService {
pub fn new(bank_receiver: Receiver<Vec<Arc<Bank>>>) -> Self {
pub fn new(bank_receiver: Receiver<Vec<BankWithScheduler>>) -> Self {
let thread_hdl = Builder::new()
.name("solDropBankSrvc".to_string())
.spawn(move || {
Expand Down
8 changes: 4 additions & 4 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ impl ReplayStage {
cluster_slots_update_sender: ClusterSlotsUpdateSender,
cost_update_sender: Sender<CostUpdate>,
voting_sender: Sender<VoteOp>,
drop_bank_sender: Sender<Vec<Arc<Bank>>>,
drop_bank_sender: Sender<Vec<BankWithScheduler>>,
block_metadata_notifier: Option<BlockMetadataNotifierArc>,
log_messages_bytes_limit: Option<usize>,
prioritization_fee_cache: Arc<PrioritizationFeeCache>,
Expand Down Expand Up @@ -1618,7 +1618,7 @@ impl ReplayStage {

// Grab the Slot and BankId's of the banks we need to purge, then clear the banks
// from BankForks
let (slots_to_purge, removed_banks): (Vec<(Slot, BankId)>, Vec<Arc<Bank>>) = {
let (slots_to_purge, removed_banks): (Vec<(Slot, BankId)>, Vec<BankWithScheduler>) = {
let mut w_bank_forks = bank_forks.write().unwrap();
slot_descendants
.iter()
Expand Down Expand Up @@ -2275,7 +2275,7 @@ impl ReplayStage {
replay_timing: &mut ReplayTiming,
voting_sender: &Sender<VoteOp>,
epoch_slots_frozen_slots: &mut EpochSlotsFrozenSlots,
drop_bank_sender: &Sender<Vec<Arc<Bank>>>,
drop_bank_sender: &Sender<Vec<BankWithScheduler>>,
wait_to_vote_slot: Option<Slot>,
) {
if bank.is_empty() {
Expand Down Expand Up @@ -4093,7 +4093,7 @@ impl ReplayStage {
has_new_vote_been_rooted: &mut bool,
voted_signatures: &mut Vec<Signature>,
epoch_slots_frozen_slots: &mut EpochSlotsFrozenSlots,
drop_bank_sender: &Sender<Vec<Arc<Bank>>>,
drop_bank_sender: &Sender<Vec<BankWithScheduler>>,
) {
bank_forks.read().unwrap().prune_program_cache(new_root);
let removed_banks = bank_forks.write().unwrap().set_root(
Expand Down
41 changes: 39 additions & 2 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ const WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT: u64 = 80;
#[derive(Clone, EnumString, EnumVariantNames, Default, IntoStaticStr, Display)]
#[strum(serialize_all = "kebab-case")]
pub enum BlockVerificationMethod {
#[default]
BlockstoreProcessor,
#[default]
UnifiedScheduler,
}

Expand Down Expand Up @@ -1434,8 +1434,10 @@ impl Validator {

// Used for notifying many nodes in parallel to exit
pub fn exit(&mut self) {
info!("exit1");
self.validator_exit.write().unwrap().exit();

info!("exit2");
// drop all signals in blockstore
self.blockstore.drop_signal();
}
Expand Down Expand Up @@ -1471,24 +1473,29 @@ impl Validator {
}

pub fn join(self) {
drop(self.bank_forks);
info!("join1");
drop(self.cluster_info);

info!("join2");
self.poh_service.join().expect("poh_service");
drop(self.poh_recorder);

info!("join3");
if let Some(json_rpc_service) = self.json_rpc_service {
json_rpc_service.join().expect("rpc_service");
}

info!("join4");
if let Some(pubsub_service) = self.pubsub_service {
pubsub_service.join().expect("pubsub_service");
}

info!("join5");
self.rpc_completed_slots_service
.join()
.expect("rpc_completed_slots_service");

info!("join6");
if let Some(optimistically_confirmed_bank_tracker) =
self.optimistically_confirmed_bank_tracker
{
Expand All @@ -1497,96 +1504,126 @@ impl Validator {
.expect("optimistically_confirmed_bank_tracker");
}

info!("join7");
if let Some(transaction_status_service) = self.transaction_status_service {
transaction_status_service
.join()
.expect("transaction_status_service");
}

info!("join8");
if let Some(rewards_recorder_service) = self.rewards_recorder_service {
rewards_recorder_service
.join()
.expect("rewards_recorder_service");
}

info!("join9");
if let Some(cache_block_meta_service) = self.cache_block_meta_service {
cache_block_meta_service
.join()
.expect("cache_block_meta_service");
}

info!("join10");
if let Some(system_monitor_service) = self.system_monitor_service {
system_monitor_service
.join()
.expect("system_monitor_service");
}

info!("join11");
if let Some(sample_performance_service) = self.sample_performance_service {
sample_performance_service
.join()
.expect("sample_performance_service");
}

info!("join12");
if let Some(entry_notifier_service) = self.entry_notifier_service {
entry_notifier_service
.join()
.expect("entry_notifier_service");
}

info!("join13");
if let Some(s) = self.snapshot_packager_service {
s.join().expect("snapshot_packager_service");
}

info!("join14");
self.gossip_service.join().expect("gossip_service");
if let Some(repair_quic_endpoint) = &self.repair_quic_endpoint {
repair::quic_endpoint::close_quic_endpoint(repair_quic_endpoint);
}
info!("join15");
self.serve_repair_service
.join()
.expect("serve_repair_service");
info!("join15");
if let Some(repair_quic_endpoint_join_handle) = self.repair_quic_endpoint_join_handle {
self.repair_quic_endpoint_runtime
.map(|runtime| runtime.block_on(repair_quic_endpoint_join_handle))
.transpose()
.unwrap();
};
info!("join16");
self.stats_reporter_service
.join()
.expect("stats_reporter_service");
info!("join17");
self.blockstore_metric_report_service
.join()
.expect("ledger_metric_report_service");
info!("join18");
self.accounts_background_service
.join()
.expect("accounts_background_service");
info!("join19");
self.accounts_hash_verifier
.join()
.expect("accounts_hash_verifier");
info!("join20");
if let Some(turbine_quic_endpoint) = &self.turbine_quic_endpoint {
solana_turbine::quic_endpoint::close_quic_endpoint(turbine_quic_endpoint);
}
info!("join21");
self.tpu.join().expect("tpu");
info!("join22");
self.tvu.join().expect("tvu");
info!("join23");
if let Some(turbine_quic_endpoint_join_handle) = self.turbine_quic_endpoint_join_handle {
self.turbine_quic_endpoint_runtime
.map(|runtime| runtime.block_on(turbine_quic_endpoint_join_handle))
.transpose()
.unwrap();
}
info!("join24");
self.completed_data_sets_service
.join()
.expect("completed_data_sets_service");
info!("join25");
if let Some(ip_echo_server) = self.ip_echo_server {
ip_echo_server.shutdown_background();
}

info!("join26");
if let Some(geyser_plugin_service) = self.geyser_plugin_service {
geyser_plugin_service.join().expect("geyser_plugin_service");
}

info!("join27");
self.poh_timing_report_service
.join()
.expect("poh_timing_report_service");
info!("join28");
self.bank_forks.write().unwrap().prepare_to_drop();
let sc = Arc::strong_count(&self.bank_forks);
if let Some(bank_forks) = Arc::into_inner(self.bank_forks) {
drop::<BankForks>(bank_forks.into_inner().unwrap());
} else {
warn!("seems bankforks are leaking...{}:", sc);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions ledger-tool/src/ledger_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ pub fn load_and_process_ledger(
}
}
BlockVerificationMethod::UnifiedScheduler => {
let unified_scheduler_handler_threads =
value_t!(arg_matches, "unified_scheduler_handler_threads", usize).ok();
let no_transaction_status_sender = None;
let no_replay_vote_sender = None;
let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64));
Expand Down
2 changes: 2 additions & 0 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,8 @@ fn main() {
}
exit_signal.store(true, Ordering::Relaxed);
system_monitor_service.join().unwrap();
bank_forks.write().unwrap().prepare_to_drop();
drop::<BankForks>(Arc::into_inner(bank_forks).unwrap().into_inner().unwrap());
}
("graph", Some(arg_matches)) => {
let output_file = value_t_or_exit!(arg_matches, "graph_filename", String);
Expand Down
17 changes: 8 additions & 9 deletions ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ fn process_batches(
// scheduling always succeeds here without being blocked on actual transaction executions.
// The transaction execution errors will be collected via the blocking fn called
// BankWithScheduler::wait_for_completed_scheduler(), if any.
schedule_batches_for_execution(bank, batches);
Ok(())
schedule_batches_for_execution(bank, batches)
} else {
debug!(
"process_batches()/rebatch_and_execute_batches({} batches)",
Expand All @@ -360,7 +359,7 @@ fn process_batches(
fn schedule_batches_for_execution(
bank: &BankWithScheduler,
batches: &[TransactionBatchWithIndexes],
) {
) -> Result<()> {
for TransactionBatchWithIndexes {
batch,
transaction_indexes,
Expand All @@ -371,8 +370,9 @@ fn schedule_batches_for_execution(
.sanitized_transactions()
.iter()
.zip(transaction_indexes.iter()),
);
)?;
}
Ok(())
}

fn rebatch_transactions<'a>(
Expand Down Expand Up @@ -440,9 +440,7 @@ fn rebatch_and_execute_batches(
{
let mut cost_tracker = bank.write_cost_tracker().unwrap();
for tx_cost in &tx_costs {
cost_tracker
.try_add(tx_cost)
.map_err(TransactionError::from)?;
cost_tracker.try_add(tx_cost)?;
}
}

Expand Down Expand Up @@ -1960,6 +1958,7 @@ pub mod tests {
instruction::{Instruction, InstructionError},
native_token::LAMPORTS_PER_SOL,
pubkey::Pubkey,
scheduling::SchedulingMode,
signature::{Keypair, Signer},
system_instruction::SystemError,
system_transaction,
Expand Down Expand Up @@ -4544,7 +4543,7 @@ pub mod tests {
..
} = create_genesis_config_with_leader(500, &dummy_leader_pubkey, 100);
let bank = Arc::new(Bank::new_for_tests(&genesis_config));
let context = SchedulingContext::new(bank.clone());
let context = SchedulingContext::new(SchedulingMode::BlockVerification, bank.clone());

let txs = create_test_transactions(&mint_keypair, &genesis_config.hash());

Expand All @@ -4559,7 +4558,7 @@ pub mod tests {
mocked_scheduler
.expect_schedule_execution()
.times(txs.len())
.returning(|_| ());
.returning(|_| Ok(()));
mocked_scheduler
.expect_wait_for_termination()
.with(mockall::predicate::eq(true))
Expand Down
16 changes: 9 additions & 7 deletions local-cluster/tests/local_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
crossbeam_channel::{unbounded, Receiver},
gag::BufferRedirect,
log::*,
rand::seq::IteratorRandom,
rand::seq::SliceRandom,
serial_test::serial,
solana_accounts_db::{
hardened_unpack::open_genesis_config, utils::create_accounts_run_and_snapshot_dirs,
Expand Down Expand Up @@ -5499,12 +5499,14 @@ fn test_randomly_mixed_block_verification_methods_between_bootstrap_and_not() {
);

// Randomly switch to use unified scheduler
config
.validator_configs
.iter_mut()
.choose(&mut rand::thread_rng())
.unwrap()
.block_verification_method = BlockVerificationMethod::UnifiedScheduler;
let mut methods = [
BlockVerificationMethod::UnifiedScheduler,
BlockVerificationMethod::BlockstoreProcessor,
];
methods.shuffle(&mut rand::thread_rng());
for (validator_config, method) in config.validator_configs.iter_mut().zip(methods) {
validator_config.block_verification_method = method;
}

let local = LocalCluster::new(&mut config, SocketAddrSpace::Unspecified);
cluster_tests::spend_and_verify_all_nodes(
Expand Down
Loading
Loading