Mavryk_baking_001_PtAtLas.State_transitions
This module, and in particular the step
function, modifies the automaton state, while Baking_actions
performs potentially failing side-effects.
val do_nothing :
Baking_state.state ->
(Baking_state.state * Baking_actions.action) Lwt.t
val is_acceptable_proposal_for_current_level :
Baking_state.state ->
Baking_state.proposal ->
proposal_acceptance Lwt.t
val make_consensus_vote_batch :
Baking_state.state ->
Baking_state.proposal ->
Baking_state.consensus_vote_kind ->
Baking_state.unsigned_consensus_vote_batch
val may_update_proposal :
is_proposal_applied:bool ->
Baking_state.state ->
Baking_state.proposal ->
Baking_state.state Lwt.t
val preattest :
Baking_state.state ->
Baking_state.proposal ->
(Baking_state.state * Baking_actions.action) Lwt.t
val handle_proposal :
is_proposal_applied:bool ->
Baking_state.state ->
Baking_state.proposal ->
(Baking_state.state * Baking_actions.action) Lwt.t
val propose_fresh_block_action :
attestations:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.attestation
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Operation.t
list ->
dal_attestations:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.dal_attestation
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Operation.t
list ->
?last_proposal:Baking_state.block_info ->
predecessor:Baking_state.block_info ->
Baking_state.state ->
Baking_state.consensus_key_and_delegate ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Round.t ->
Baking_actions.action Lwt.t
val propose_block_action :
Baking_state.state ->
Baking_state.consensus_key_and_delegate ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Round.t ->
Baking_state.proposal ->
Baking_actions.action Lwt.t
val end_of_round :
Baking_state.state ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Round.t ->
(Baking_state.state * Baking_actions.action) Lwt.t
Increase the current round and propose at the new round (same level), if the baker has a proposer slot.
val time_to_prepare_next_level_block :
Baking_state.state ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Round.t ->
(Baking_state.state * Baking_actions.action) Lwt.t
Propose for the first time at a level at the given round. There was no previous proposal at the current level.
val update_locked_round :
Baking_state.state ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Round.t ->
Mavryk_protocol_001_PtAtLas.Protocol.Block_payload_hash.t ->
Baking_state.state
val prepare_attest_action :
Baking_state.state ->
Baking_state.proposal ->
Baking_actions.action
val prequorum_reached_when_awaiting_preattestations :
Baking_state.state ->
Operation_worker.candidate ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.preattestation
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.operation
list ->
(Baking_state.state * Baking_actions.action) Lwt.t
val quorum_reached_when_waiting_attestations :
Baking_state.state ->
Operation_worker.candidate ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.attestation
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.operation
list ->
(Baking_state.state * Baking_actions.action) Lwt.t
val step :
Baking_state.state ->
Baking_state.event ->
(Baking_state.state * Baking_actions.action) Lwt.t