Function solana_core::cluster_info::compute_retransmit_peers [−][src]
pub fn compute_retransmit_peers(
fanout: usize,
node: usize,
index: &[usize]
) -> (Vec<usize>, Vec<usize>)
Turbine logic
1 - For the current node find out if it is in layer 1
1.1 - If yes, then broadcast to all layer 1 nodes
1 - using the layer 1 index, broadcast to all layer 2 nodes assuming you know neighborhood size
1.2 - If no, then figure out what layer the node is in and who the neighbors are and only broadcast to them
1 - also check if there are nodes in the next layer and repeat the layer 1 to layer 2 logic
Returns Neighbor Nodes and Children Nodes (neighbors, children)
for a given node based on its stake