HashGraph

Undocumented in source.
@safe
class HashGraph {}

Constructors

this
this(size_t node_size, SecureNet net, Refinement refinement, ValidChannel valid_channel, Flag!"joining" joining, string name)

Creates a graph with node_size nodes

Members

Aliases

EventCache
alias EventCache = Event[Buffer]
Undocumented in source.
EventPackageCache
alias EventPackageCache = immutable(EventPackage)*[Buffer]
Undocumented in source.
GraphPayload
alias GraphPayload = const(Document) delegate() @(safe)
Undocumented in source.
GraphResonse
alias GraphResonse = const(Pubkey) delegate(GossipNet.ChannelFilter channel_filter, GossipNet.SenderCallBack sender) @(safe)
Undocumented in source.
NodeRange
alias NodeRange = typeof((cast(const )_nodes).byValue)
Undocumented in source.
ValidChannel
alias ValidChannel = bool delegate(const Pubkey channel)
Undocumented in source.
check
alias check = Check!HashGraphConsensusException
Undocumented in source.

Classes

Node
class Node
Undocumented in source.
Register
class Register
Undocumented in source.

Functions

active_nodes
size_t active_nodes()
Undocumented in source. Be warned that the author may not have intended to support it.
areWeInGraph
bool areWeInGraph()
Undocumented in source. Be warned that the author may not have intended to support it.
buildWavefront
const(Wavefront) buildWavefront(ExchangeState state, Tides tides)
Undocumented in source. Be warned that the author may not have intended to support it.
channel
Pubkey channel()
Undocumented in source. Be warned that the author may not have intended to support it.
channels
const(Pubkey[]) channels()
Undocumented in source. Be warned that the author may not have intended to support it.
createEvaEvent
Event createEvaEvent(sdt_t time, Buffer nonce)
Undocumented in source. Be warned that the author may not have intended to support it.
eliminate
void eliminate(const(Buffer) fingerprint)
Undocumented in source. Be warned that the author may not have intended to support it.
epoch
void epoch(Event[] event_collection, Round decided_round)
Undocumented in source. Be warned that the author may not have intended to support it.
eva_pack
immutable(EventPackage*) eva_pack(sdt_t time, Buffer nonce)
Undocumented in source. Be warned that the author may not have intended to support it.
event_pack
immutable(EventPackage)* event_pack(sdt_t time, const(Event) father_event, Document doc)
Undocumented in source. Be warned that the author may not have intended to support it.
excluded_nodes_mask
const(BitMask) excluded_nodes_mask()
Undocumented in source. Be warned that the author may not have intended to support it.
excluded_nodes_mask
void excluded_nodes_mask(const(BitMask) mask)
Undocumented in source. Be warned that the author may not have intended to support it.
front_seat
void front_seat(Event event)
Undocumented in source.
fwrite
void fwrite(string filename, Pubkey[string] node_labels)

Dumps all events in the Hashgraph to a file

getNode
Node getNode(Pubkey channel)
Undocumented in source. Be warned that the author may not have intended to support it.
init_tide
void init_tide(const(GraphResonse) responde, const(GraphPayload) payload, sdt_t time)
Undocumented in source. Be warned that the author may not have intended to support it.
initialize_witness
void initialize_witness(const(immutable(EventPackage)*[]) epacks)
Undocumented in source.
isMajority
bool isMajority(size_t voting)
Undocumented in source. Be warned that the author may not have intended to support it.
isRegistered
bool isRegistered(const(ubyte[]) fingerprint)
Undocumented in source. Be warned that the author may not have intended to support it.
joining
Flag!"joining" joining()
Undocumented in source. Be warned that the author may not have intended to support it.
mark_offline
void mark_offline(const(size_t) node_id)
Undocumented in source. Be warned that the author may not have intended to support it.
net
const(SecureNet) net()
Undocumented in source. Be warned that the author may not have intended to support it.
next_event_id
uint next_event_id()
Undocumented in source. Be warned that the author may not have intended to support it.
next_node_id
size_t next_node_id()
Undocumented in source. Be warned that the author may not have intended to support it.
nodes
const(Node[Pubkey]) nodes()

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

not_used_channels
bool not_used_channels(const(Pubkey) selected_channel)
Undocumented in source. Be warned that the author may not have intended to support it.
number_of_registered_event
size_t number_of_registered_event()
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
NodeRange opSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
owner_node
const(Node) owner_node()
Undocumented in source. Be warned that the author may not have intended to support it.
register
Event register(const(Buffer) fingerprint)
Undocumented in source. Be warned that the author may not have intended to support it.
registerEventPackage
Event registerEventPackage(immutable(EventPackage*) event_pack)

@return true if the event package has been register correct

register_wavefront
const(Event) register_wavefront(Wavefront received_wave, Pubkey from_channel)
remove_node
bool remove_node(Pubkey pkey)
Undocumented in source. Be warned that the author may not have intended to support it.
rounds
const(Round.Rounder) rounds()
Undocumented in source. Be warned that the author may not have intended to support it.
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

wavefront
const(HiRPC.Sender) wavefront(Wavefront wave, uint id)
Undocumented in source. Be warned that the author may not have intended to support it.
wavefront
void wavefront(HiRPC.Receiver received, const(sdt_t) time, void delegate(const(HiRPC.Sender) send_wave) @(safe) response, const(Document) delegate() @(safe) payload)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

default_scrap_depth
enum default_scrap_depth;
Undocumented in source.
max_package_size
enum max_package_size;
Undocumented in source.
round_clean_limit
enum round_clean_limit;
Undocumented in source.

Variables

__debug_print
bool __debug_print;
Undocumented in source.
_event_cache
EventCache _event_cache;
Undocumented in source.
_excluded_nodes_mask
BitMask _excluded_nodes_mask;
Undocumented in source.
_owner_node
Node _owner_node;
Undocumented in source.
_register
Register _register;
Undocumented in source.
_rounds
Round.Rounder _rounds;

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

epoch_delay_statistic
Statistic!long epoch_delay_statistic;
Undocumented in source.
epoch_events_statistic
Statistic!uint epoch_events_statistic;
Undocumented in source.
hirpc
HiRPC hirpc;
Undocumented in source.
live_events_statistic
Statistic!uint live_events_statistic;
Undocumented in source.
live_witness_statistic
Statistic!uint live_witness_statistic;
Undocumented in source.
mark_received_statistic
Statistic!uint mark_received_statistic;
Undocumented in source.
name
immutable(string) name;
Undocumented in source.
node_size
size_t node_size;

Number of active nodes in the graph

order_compare_statistic
Statistic!uint order_compare_statistic;
Undocumented in source.
rare_order_compare_statistic
Statistic!uint rare_order_compare_statistic;
Undocumented in source.
received_order_statistic
Statistic!uint received_order_statistic;
Undocumented in source.
refinement
Refinement refinement;
Undocumented in source.
scrap_depth
int scrap_depth;
Undocumented in source.
strong_seeing_statistic
Statistic!uint strong_seeing_statistic;
Undocumented in source.
topic
Topic topic;
Undocumented in source.
valid_channel
ValidChannel valid_channel;

Valiates of a node at channel is valid

wavefront_event_package_statistic
Statistic!uint wavefront_event_package_statistic;
Undocumented in source.
wavefront_event_package_used_statistic
Statistic!uint wavefront_event_package_used_statistic;
Undocumented in source.
witness_search_statistic
Statistic!uint witness_search_statistic;
Undocumented in source.

Meta