Leader scheduler plumbing (#1440)
* Added LeaderScheduler module and tests * plumbing for LeaderScheduler in Fullnode + tests. Add vote processing for active set to ReplicateStage and WriteStage * Add LeaderScheduler plumbing for Tvu, window, and tests * Fix bank and switch tests to use new LeaderScheduler * move leader rotation check from window service to replicate stage * Add replicate_stage leader rotation exit test * removed leader scheduler from the window service and associated modules/tests * Corrected is_leader calculation in repair() function in window.rs * Integrate LeaderScheduler with write_stage for leader to validator transitions * Integrated LeaderScheduler with BroadcastStage * Removed gossip leader rotation from crdt * Add multi validator, leader test * Comments and cleanup * Remove unneeded checks from broadcast stage * Fix case where a validator/leader need to immediately transition on startup after reading ledger and seeing they are not in the correct role * Set new leader in validator -> validator transitions * Clean up for PR comments, refactor LeaderScheduler from process_entry/process_ledger_tail * Cleaned out LeaderScheduler options, implemented LeaderScheduler strategy that only picks the bootstrap leader to support existing tests, drone/airdrops * Ignore test_full_leader_validator_network test due to bug where the next leader in line fails to get the last entry before rotation (b/c it hasn't started up yet). Added a test test_dropped_handoff_recovery go track this bug
This commit is contained in:
@ -406,6 +406,7 @@ impl Blob {
|
||||
pub fn make_consecutive_blobs(
|
||||
me_id: Pubkey,
|
||||
num_blobs_to_make: u64,
|
||||
start_height: u64,
|
||||
start_hash: Hash,
|
||||
addr: &SocketAddr,
|
||||
) -> SharedBlobs {
|
||||
@ -415,7 +416,7 @@ pub fn make_consecutive_blobs(
|
||||
for _ in 0..num_blobs_to_make {
|
||||
all_entries.extend(next_entries_mut(&mut last_hash, &mut num_hashes, vec![]));
|
||||
}
|
||||
let mut new_blobs = all_entries.to_blobs_with_id(me_id, 0, addr);
|
||||
let mut new_blobs = all_entries.to_blobs_with_id(me_id, start_height, addr);
|
||||
new_blobs.truncate(num_blobs_to_make as usize);
|
||||
new_blobs
|
||||
}
|
||||
|
Reference in New Issue
Block a user