Module solana::crdt[][src]

The crdt 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 PublicKey -> Versioned Struct. The last version is always picked during an update.

The network is arranged in layers:

  • layer 0 - Leader.
  • layer 1 - As many nodes as we can fit
  • layer 2 - Everyone else, if layer 1 is 2^10, layer 2 should be able to fit 2^20 number of nodes.

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

Structs

ContactInfo

Structure to be replicated by the network

Crdt

Crdt structure keeps a table of NodeInfo structs

LedgerState
NodeInfo
Sockets
TestNode

Enums

CrdtError

Functions

get_ip_addr
parse_port_or_addr