package tezos-baking-alpha

  1. Overview
  2. Docs
type action =
  1. | Do_nothing
  2. | Inject_block of {
    1. block_to_bake : block_to_bake;
    2. updated_state : Baking_state.state;
    }
  3. | Inject_preendorsements of {
    1. preendorsements : (Baking_state.delegate * Tezos_protocol_alpha.Protocol.Alpha_context.consensus_content) list;
    2. updated_state : Baking_state.state;
    }
  4. | Inject_endorsements of {
    1. endorsements : (Baking_state.delegate * Tezos_protocol_alpha.Protocol.Alpha_context.consensus_content) list;
    2. updated_state : Baking_state.state;
    }
  5. | Update_to_level of level_update
  6. | Synchronize_round of round_update
and level_update = {
  1. new_level_proposal : Baking_state.proposal;
  2. compute_new_state : current_round: Tezos_protocol_alpha.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 = {
  1. new_round_proposal : Baking_state.proposal;
  2. handle_proposal : Baking_state.state -> (Baking_state.state * action) Lwt.t;
}
type t = action
val inject_block : state_recorder: (new_state:Baking_state.state -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t) -> Baking_state.state -> block_to_bake -> updated_state:Baking_state.state -> (Baking_state.state, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val inject_preendorsements : state_recorder: (new_state:Baking_state.state -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t) -> Baking_state.state -> preendorsements: (Baking_state.delegate * Tezos_protocol_alpha.Protocol.Alpha_context.consensus_content) list -> updated_state:Baking_state.state -> (Baking_state.state, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val inject_endorsements : state_recorder: (new_state:Baking_state.state -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t) -> Baking_state.state -> endorsements: (Baking_state.delegate * Tezos_protocol_alpha.Protocol.Alpha_context.consensus_content) list -> updated_state:Baking_state.state -> (Baking_state.state, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val start_waiting_for_preendorsement_quorum : Baking_state.state -> unit Lwt.t
val start_waiting_for_endorsement_quorum : Baking_state.state -> unit Lwt.t
val update_to_level : Baking_state.state -> level_update -> (Baking_state.state * t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val pp_action : Stdlib.Format.formatter -> t -> unit
val perform_action : state_recorder: (new_state:Baking_state.state -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t) -> Baking_state.state -> t -> (Baking_state.state, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
OCaml

Innovation. Community. Security.