Blockchain.8-Logger
type ev = Event.t
The type of events being logged.
val init : unit -> unit
Initialize the logger.
val terminate : unit -> unit
Close the logger.
val log_event : ev -> unit
Logs an event to the JSON log.
the event to be logged
val print_in_committee : int -> int -> unit
Logs that a node belongs to a committee of a round.
the id of a node
the round where the node belongs to the committee
val print_is_proposer : int -> int -> unit
Logs that a node is a proposer for a round.
the round where the node is a proposer
val print_create_block : int -> int -> unit
Print that a node has minted a block.
the id of the node
the id of the newly minted block
val print_new_chain_head : int -> int -> int -> unit
Print that the head of a node's chain as been updated.
id of the node that update its chain
id of the node that minted the block that was added to node_id's chain
id of the block that was added to node_id's chain
val log_parameters : string -> unit
Receives a JSON string with the parameters and logs them.
a JSON string containing the relevant simulation parameters
val log_statistics : string -> unit
Receives a JSON string with the statistics and logs them.
a JSON string containing the computed statistics of the simulation
val log_per_node_statistics : string -> unit
Receives a JSON string with the per node statistics and logs them.
a JSON string containing the computed per-node-statistics of the simulation
val log_add_node : int -> int -> unit
Log the addition of a node.
the region where the node was added
val log_add_link : int -> int -> unit
Log the addition of a link.
the id of the node at the link's origin
the id of the node at the link's end
val log_remove_link : int -> int -> unit
Log the removal of a link.
val log_protocol : int -> unit
Log wheter it is a blockchain or abstract protocol.
if 0 then abstract. if 1 then blockchain.