Struct solana::crdt::Crdt[][src]

pub struct Crdt {
    pub table: HashMap<PublicKey, NodeInfo>,
    pub remote: HashMap<PublicKey, u64>,
    pub alive: HashMap<PublicKey, u64>,
    pub update_index: u64,
    pub me: PublicKey,
    // some fields omitted
}

Crdt structure keeps a table of NodeInfo structs

Properties

  • table - map of public id's to versioned and signed NodeInfo structs
  • local - map of public id's to what self.update_index self.table was updated
  • remote - map of public id's to the remote.update_index was sent
  • update_index - my update index

Remarks

This implements two services, gossip and listen.

  • gossip - asynchronously ask nodes to send updates
  • listen - listen for requests and responses No attempt to keep track of timeouts or dropped requests is made, or should be.

Fields

table of everyone in the network

The value of the remote update index that I have last seen This Node will ask external nodes for updates since the value in this list

last time the public key had sent us a message

Methods

impl Crdt
[src]

purge old validators TODO: we need a robust membership protocol http://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf challenging part is that we are on a permissionless network

compute broadcast table

Remarks

broadcast messages from the leader to layer 1 nodes

Remarks

We need to avoid having obj locked while doing any io, such as the send_to

retransmit messages from the leader to layer 1 nodes

Remarks

We need to avoid having obj locked while doing any io, such as the send_to

randomly pick a node and ask them for updates asynchronously

Auto Trait Implementations

impl Send for Crdt

impl Sync for Crdt