Tezos_baking_alpha.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_block_action :
Baking_state.state ->
Baking_state.consensus_key_and_delegate ->
Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
last_proposal:Baking_state.proposal ->
Baking_actions.action Lwt.t
Propose a block at the start of the given round for the given delegate, given that there was already a proposal at the current level, the last one being last_proposal
.
val end_of_round :
Baking_state.state ->
Tezos_protocol_alpha.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 ->
Tezos_protocol_alpha.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 ->
Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
Tezos_protocol_alpha.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 ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.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 ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.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