revises turbine peers shuffling order (#20480)

Turbine randomly shuffles cluster nodes on a broadcast tree for each
shred. This requires knowing the stakes and nodes' contact-infos (from
gossip).

However gossip is subject to partitioning and propogation delays.
Additionally unstaked nodes may join and leave the cluster at any
moment, changing the cluster view from one node to another.

This commit:
* Always arranges the unstaked nodes at the bottom of turbine broadcast
  tree.
* Staked nodes are always included regardless of if their contact-info
  is available in gossip or not.
* Uses the unbiased WeightedShuffle construct for shuffling nodes.
This commit is contained in:
behzad nouri
2021-10-14 15:09:36 +00:00
committed by GitHub
parent 6649dfa899
commit 0c0384ec32
7 changed files with 355 additions and 64 deletions

View File

@ -241,6 +241,10 @@ pub mod send_to_tpu_vote_port {
solana_sdk::declare_id!("C5fh68nJ7uyKAuYZg2x9sEQ5YrVf3dkW6oojNBSc3Jvo");
}
pub mod turbine_peers_shuffle {
solana_sdk::declare_id!("4VvpgRD6UsHvkXwpuQhtR5NG1G4esMaExeWuSEpsYRUa");
}
lazy_static! {
/// Map of feature identifiers to user-visible description
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@ -296,6 +300,7 @@ lazy_static! {
(optimize_epoch_boundary_updates::id(), "Optimize epoch boundary updates"),
(remove_native_loader::id(), "Remove support for the native loader"),
(send_to_tpu_vote_port::id(), "Send votes to the tpu vote port"),
(turbine_peers_shuffle::id(), "turbine peers shuffle patch"),
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()