Mavryk_baking_alpha.Operation_worker
Launch processes to gather operations from the mempool and make them available for the baker.
type candidate = {
hash : Mavryk_base.TzPervasives.Block_hash.t;
round_watched : Mavryk_protocol_alpha.Protocol.Alpha_context.Round.t;
payload_hash_watched : Mavryk_protocol_alpha.Protocol.Block_payload_hash.t;
}
val candidate_encoding : candidate Mavryk_base.TzPervasives.Data_encoding.t
type event =
| Prequorum_reached of candidate
* Mavryk_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Mavryk_protocol_alpha.Protocol.Alpha_context.operation
list
| Quorum_reached of candidate
* Mavryk_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Mavryk_protocol_alpha.Protocol.Alpha_context.operation
list
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.
val retrieve_pending_operations :
Mavryk_client_alpha.Protocol_client_context.full ->
t ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
val get_current_operations : t -> Operation_pool.pool
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