Module solana_core::cluster_info[][src]

The cluster_info module defines a data structure that is shared by all the nodes in the network over a gossip control plane. The goal is to share small bits of off-chain information and detect and repair partitions.

This CRDT only supports a very limited set of types. A map of Pubkey -> Versioned Struct. The last version is always picked during an update.

The network is arranged in layers:

Bank needs to provide an interface for us to query the stake weight

Structs

ClusterInfo
Node
PruneData
Sockets

Enums

ClusterInfoError

Constants

DATA_PLANE_FANOUT

The Data plane fanout size, also used as the neighborhood size

DEFAULT_CONTACT_DEBUG_INTERVAL_MILLIS
DEFAULT_CONTACT_SAVE_INTERVAL_MILLIS
GOSSIP_SLEEP_MILLIS

milliseconds we sleep for between gossip requests

MAX_BLOOM_SIZE

The maximum size of a bloom filter

MAX_CRDS_OBJECT_SIZE
MAX_SNAPSHOT_HASHES

Maximum number of hashes in SnapshotHashes/AccountsHashes a node publishes such that the serialized size of the push/pull message stays below PACKET_DATA_SIZE.

MINIMUM_VALIDATOR_PORT_RANGE_WIDTH
VALIDATOR_PORT_RANGE

Functions

compute_retransmit_peers

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

make_accounts_hashes_message
stake_weight_peers