Mavryk_baking_002_PtBoreas.Baking_actions
type action =
| Do_nothing
| Prepare_block of {
block_to_bake : Baking_state.block_to_bake;
}
| Prepare_preattestations of {
preattestations : Baking_state.unsigned_consensus_vote_batch;
}
| Prepare_attestations of {
attestations : Baking_state.unsigned_consensus_vote_batch;
}
| Prepare_consensus_votes of {
preattestations : Baking_state.unsigned_consensus_vote_batch;
attestations : Baking_state.unsigned_consensus_vote_batch;
}
| Inject_block of {
prepared_block : Baking_state.prepared_block;
force_injection : bool;
asynchronous : bool;
}
| Inject_preattestation of {
signed_preattestation : Baking_state.signed_consensus_vote;
}
| Inject_attestations of {
signed_attestations : Baking_state.signed_consensus_vote_batch;
}
| Update_to_level of level_update
| Synchronize_round of round_update
| Watch_prequorum
| Watch_quorum
and level_update = {
new_level_proposal : Baking_state.proposal;
compute_new_state : current_round:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Round.t ->
delegate_slots:Baking_state.delegate_slots ->
next_level_delegate_slots:Baking_state.delegate_slots ->
(Baking_state.state * action) Lwt.t;
}
and round_update = {
new_round_proposal : Baking_state.proposal;
handle_proposal : Baking_state.state -> (Baking_state.state * action) Lwt.t;
}
type t = action
val pp_action : Stdlib.Format.formatter -> action -> unit
val generate_seed_nonce_hash :
Baking_configuration.nonce_config ->
Baking_state.consensus_key ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Level.t ->
(Mavryk_protocol_002_PtBoreas.Protocol.Nonce_hash.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Nonce.t)
option
Mavryk_base.TzPervasives.tzresult
Lwt.t
val prepare_block :
Baking_state.global_state ->
Baking_state.block_to_bake ->
Baking_state.prepared_block Mavryk_base.TzPervasives.tzresult Lwt.t
val inject_block :
?force_injection:bool ->
?asynchronous:bool ->
Baking_state.state ->
Baking_state.prepared_block ->
Baking_state.state Mavryk_base.TzPervasives.tzresult Lwt.t
val may_get_dal_content :
Baking_state.state ->
Baking_state.unsigned_consensus_vote ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.dal_content option
Mavryk_base.TzPervasives.tzresult
Lwt.t
val authorized_consensus_votes :
Baking_state.global_state ->
Baking_state.unsigned_consensus_vote_batch ->
Baking_state.unsigned_consensus_vote list Mavryk_base.TzPervasives.tzresult
Lwt.t
val forge_and_sign_consensus_vote :
Baking_state.global_state ->
branch:Mavryk_base.TzPervasives.Block_hash.t ->
Baking_state.unsigned_consensus_vote ->
Baking_state.signed_consensus_vote Mavryk_base.TzPervasives.tzresult Lwt.t
val sign_consensus_votes :
Baking_state.global_state ->
Baking_state.unsigned_consensus_vote_batch ->
Baking_state.signed_consensus_vote_batch Mavryk_base.TzPervasives.tzresult
Lwt.t
val inject_consensus_votes :
Baking_state.state ->
Baking_state.signed_consensus_vote_batch ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
val prepare_waiting_for_quorum :
Baking_state.state ->
int
* (slot:Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Slot.t ->
int option)
* Operation_worker.candidate
val start_waiting_for_preattestation_quorum : Baking_state.state -> unit Lwt.t
val start_waiting_for_attestation_quorum : Baking_state.state -> unit Lwt.t
val update_to_level :
Baking_state.state ->
level_update ->
(Baking_state.state * t) Mavryk_base.TzPervasives.tzresult Lwt.t
val perform_action :
Baking_state.state ->
t ->
Baking_state.state Mavryk_base.TzPervasives.tzresult Lwt.t