Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Adjust solana-core for cleaner scheduler-pr diff #33881

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,6 @@ impl ReplayStage {
match replay_result {
Ok(replay_tx_count) => tx_count += replay_tx_count,
Err(err) => {
// Error means the slot needs to be marked as dead
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of redundant comment.

Self::mark_dead_slot(
blockstore,
bank,
Expand All @@ -2802,8 +2801,7 @@ impl ReplayStage {
ancestor_hashes_replay_update_sender,
purge_repair_slot_counter,
);
// If the bank was corrupted, don't try to run the below logic to check if the
// bank is completed
// don't try to run the below logic to check if the bank is completed
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrupted is kind of ambiguous word. just remove it.

continue;
}
}
Expand Down
11 changes: 6 additions & 5 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,12 @@ impl Validator {
config.block_verification_method, config.block_production_method
);

let (replay_vote_sender, replay_vote_receiver) = unbounded();

// block min prioritization fee cache should be readable by RPC, and writable by validator
// (by both replay stage and banking stage)
let prioritization_fee_cache = Arc::new(PrioritizationFeeCache::default());

Comment on lines +815 to +820
Copy link
Contributor Author

@ryoqun ryoqun Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two strictly-tx-execution related variables are hoisted here to be used SchedulerPool creation, which must have been completed relatively early in this fn to be ready to use for ProcessBlockStore just below.

let leader_schedule_cache = Arc::new(leader_schedule_cache);
let entry_notification_sender = entry_notifier_service
.as_ref()
Expand Down Expand Up @@ -939,10 +945,6 @@ impl Validator {
)),
};

// block min prioritization fee cache should be readable by RPC, and writable by validator
// (by both replay stage and banking stage)
let prioritization_fee_cache = Arc::new(PrioritizationFeeCache::default());

let rpc_override_health_check =
Arc::new(AtomicBool::new(config.rpc_config.disable_health_check));
let (
Expand Down Expand Up @@ -1229,7 +1231,6 @@ impl Validator {
};
let last_vote = tower.last_vote();

let (replay_vote_sender, replay_vote_receiver) = unbounded();
let tvu = Tvu::new(
vote_account,
authorized_voter_keypairs,
Expand Down