Module Mavryk_baking_alpha.Operation_worker

Launch processes to gather operations from the mempool and make them available for the baker.

Datatypes

type t
val candidate_encoding : candidate Mavryk_base.TzPervasives.Data_encoding.t

Constructors

val create : ?monitor_node_operations:bool -> Mavryk_client_alpha.Protocol_client_context.full -> t Lwt.t

create ?monitor_node_operations cctxt creates a monitoring process to fetch operations for the baker to process.

  • parameter monitor_node_operations

    monitor operations on the node (defaults: true). Set monitor_node_operations to false to only consider externally provided (non-node) operations.

Utilities

Accessors

val get_current_operations : t -> Operation_pool.pool
val get_quorum_event_stream : t -> event Lwt_stream.t

Observers

val monitor_preattestation_quorum : t -> consensus_threshold:int -> get_slot_voting_power: (slot:Mavryk_protocol_alpha.Protocol.Alpha_context.Slot.t -> int option) -> candidate -> unit Lwt.t
val monitor_attestation_quorum : t -> consensus_threshold:int -> get_slot_voting_power: (slot:Mavryk_protocol_alpha.Protocol.Alpha_context.Slot.t -> int option) -> candidate -> unit Lwt.t
val cancel_monitoring : t -> unit
val shutdown_worker : t -> (unit, exn list) Stdlib.result Lwt.t