Module Implementation.Protocol

type ('a, 'b) template = {
id : int;(*

The node's id

*)
region : Abstractions.Network.region;(*

The node's region

*)
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 ... end

Base node for a consensus protocol.

module type BlockchainNode = sig ... end

Extension of the base node, for blockchain protocols.

module type V = sig ... end

Wrapper for the type of values for which consensus is being reached.

module MakeBaseNode (V : V) : sig ... end

Functor 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 ... end

Initializer module. In charge of generating the initial events to start the simulation.

module type Protocol = sig ... end

The Protocol module contains the high-level loop of the simulation, and initialization operations.

module Make : sig ... end