Implementation.Protocoltype ('a, 'b) template = {id : int; | (* The node's id *) |
region : Abstractions.Network.region; | (* The node's region *) |
links : Abstractions.Network.links; | (* The node's neighbors *) |
mutable state : 'b; | (* The latest value for which there was consensus *) |
mutable data : 'a; | (* User-defined state required by the node to perform the protocol *) |
}The base type of a node.
module type AbstractNode = sig ... endBase node for a consensus protocol.
module type BlockchainNode = sig ... endExtension of the base node, for blockchain protocols.
module type V = sig ... endWrapper for the type of values for which consensus is being reached.
module MakeBaseNode (V : V) : sig ... endFunctor that receives the wrapper V, and constructs implementation for several operations of a node, without the user having to implement them by hand.
module type Initializer = sig ... endInitializer module. In charge of generating the initial events to start the simulation.
module type Protocol = sig ... endThe Protocol module contains the high-level loop of the simulation, and initialization operations.
module Make : sig ... end