HashGraph

Undocumented in source.
@safe
class HashGraph {
enum default_scrap_depth;
int scrap_depth;
immutable(string) name;
HashGraphStatistics statistics;
BitMask _excluded_nodes_mask;
Refinement refinement;
protected
Node _owner_node;
const
HiRPC hirpc;
protected
EventCache _event_cache;
Topic topic;
protected
Register _register;
}

Constructors

this
this(size_t node_size, SecureNet net, Refinement refinement, GossipNet gossip_net, string name)

Creates a graph with node_size nodes

Members

Classes

Node
class Node
Undocumented in source.

Functions

nodes
const(Node[Pubkey]) nodes()

Get a map of all the nodes currently handled by the graph

register_wavefront
const(Event) register_wavefront(Wavefront received_wave, Pubkey from_channel)
sharpResponse
const(Wavefront) sharpResponse(Wavefront received_wave)
sharpWave
const(Wavefront) sharpWave()

First time it is called we only send our own eva since this is all we know. Later we send everything it knows.

tidalWave
const(Wavefront) tidalWave()

to synchronize two _nodes A and B 1) Node A send it's wave front to B This is done via the waveFront function 2) B collects all the events it has which is are in front of the wave front of A. This is done via the waveFront function B send the all the collected event to B including B's wave font of all the node which B know it leads in, The wave from is collect via the waveFront function by adding the remaining tides 3) A send the rest of the event which is in front of B's wave-front

Variables

_rounds
Round.Rounder _rounds;

The rounder hold the round in the queue both decided and undecided rounds

node_size
size_t node_size;

Number of active nodes in the graph