Octez_agnostic_baker.Daemon
Daemon handling the an agent's life cycle.
The current possible agents are the accuser and the baker, and the corresponding daemons are given by Accuser
and Baker
, respectively.
It is used to create
and run
a protocol-agnostic process which uses the existing protocol processes in an adaptive way, depending on the current protocol obtained from the chain.
It relies on a state
which contains the endpoint
to contact the running node, together with the current agent which is being run.
To do so, it also spawns a "monitoring" process which follows the heads of the chain, as reported by the node from the state
, more precisely which monitors the voting period. By doing that, it decides when to swap to a different baking process.
module type AGNOSTIC_DAEMON = sig ... end
type baker_command =
| Run_with_local_node of {
data_dir : string;
args : Configuration.t;
sources : Tezos_base.TzPervasives.Signature.public_key_hash
Tezos_base.TzPervasives.trace;
}
| Run_remotely of {
args : Configuration.t;
sources : Tezos_base.TzPervasives.Signature.public_key_hash
Tezos_base.TzPervasives.trace;
}
| Run_vdf of {
}
| Run_accuser of {
}
module Baker : AGNOSTIC_DAEMON with type command = baker_command
module Accuser : AGNOSTIC_DAEMON with type command = accuser_command