Module 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 =
  1. | Run_with_local_node of {
    1. data_dir : string;
    2. args : Configuration.t;
    3. sources : Tezos_base.TzPervasives.Signature.public_key_hash Tezos_base.TzPervasives.trace;
    }
  2. | Run_remotely of {
    1. args : Configuration.t;
    2. sources : Tezos_base.TzPervasives.Signature.public_key_hash Tezos_base.TzPervasives.trace;
    }
  3. | Run_vdf of {
    1. pidfile : string option;
    2. keep_alive : bool;
    }
  4. | Run_accuser of {
    1. pidfile : string option;
    2. preserved_levels : int;
    3. keep_alive : bool;
    }
type accuser_command =
  1. | Run_accuser of {
    1. pidfile : string option;
    2. preserved_levels : int;
    3. keep_alive : bool;
    }