package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type consensus_key = {
  1. alias : string option;
  2. public_key : Tezos_base.TzPervasives.Signature.public_key;
  3. public_key_hash : Tezos_base.TzPervasives.Signature.public_key_hash;
  4. secret_key_uri : Tezos_client_base.Client_keys.sk_uri;
}
val consensus_key_encoding : consensus_key Tezos_base.TzPervasives.Data_encoding.t
val pp_consensus_key : Format.formatter -> consensus_key -> unit
type consensus_key_and_delegate = consensus_key * Tezos_base.TzPervasives.Signature.Public_key_hash.t
val consensus_key_and_delegate_encoding : consensus_key_and_delegate Tezos_base.TzPervasives.Data_encoding.t
val pp_consensus_key_and_delegate : Format.formatter -> consensus_key_and_delegate -> unit
type validation_mode =
  1. | Node
  2. | Local of Abstract_context_index.t
type global_state = {
  1. cctxt : Tezos_client_alpha.Protocol_client_context.full;
  2. chain_id : Tezos_base.TzPervasives.Chain_id.t;
  3. config : Baking_configuration.t;
  4. constants : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t;
  5. round_durations : Tezos_protocol_alpha.Protocol.Alpha_context.Round.round_durations;
  6. operation_worker : Operation_worker.t;
  7. validation_mode : validation_mode;
  8. delegates : consensus_key list;
  9. cache : cache;
  10. dal_node_rpc_ctxt : Tezos_rpc.Context.generic option;
}
val block_info_encoding : block_info Tezos_base.TzPervasives.Data_encoding.t
module SlotMap : Tezos_base.TzPervasives.Map.S with type key = Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t
type delegate_slot = {
  1. consensus_key_and_delegate : consensus_key_and_delegate;
  2. first_slot : Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t;
  3. attesting_power : int;
}

A delegate slot consists of the delegate's consensus key, its public key hash, its first slot, and its attesting power at some level.

module Delegate_slots : sig ... end
type delegate_slots = Delegate_slots.t
type proposal = {
  1. block : block_info;
  2. predecessor : block_info;
}
val proposal_encoding : proposal Tezos_base.TzPervasives.Data_encoding.t
val is_first_block_in_protocol : proposal -> bool

Identify the first block of the protocol, ie. the block that activates the current protocol.

This block should be baked by the baker of the previous protocol (that's why this same block is also referred to as the last block of the previous protocol). It is always considered final and therefore is not attested.

val locked_round_encoding : locked_round Tezos_base.TzPervasives.Data_encoding.t
type attestable_payload = {
  1. proposal : proposal;
  2. prequorum : prequorum;
}
val attestable_payload_encoding : attestable_payload Tezos_base.TzPervasives.Data_encoding.t
type level_state = {
  1. current_level : int32;
  2. latest_proposal : proposal;
  3. is_latest_proposal_applied : bool;
  4. locked_round : locked_round option;
  5. attestable_payload : attestable_payload option;
  6. elected_block : elected_block option;
  7. delegate_slots : delegate_slots;
  8. next_level_delegate_slots : delegate_slots;
  9. next_level_proposed_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t option;
}
type phase =
  1. | Idle
  2. | Awaiting_preattestations
  3. | Awaiting_attestations
  4. | Awaiting_application
val phase_encoding : phase Tezos_base.TzPervasives.Data_encoding.t
type state = {
  1. global_state : global_state;
  2. level_state : level_state;
  3. round_state : round_state;
}
type t = state
val update_current_phase : t -> phase -> t
val round_proposer : state -> level:[ `Current | `Next ] -> Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> delegate_slot option

Returns, among our *own* delegates, the delegate (and its attesting slot) that has a proposer slot at the given round and the current or next level, if any.

type timeout_kind =
  1. | End_of_round of {
    1. ending_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;
    }
  2. | Time_to_bake_next_level of {
    1. at_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;
    }
val timeout_kind_encoding : timeout_kind Tezos_base.TzPervasives.Data_encoding.t
val event_encoding : event Tezos_base.TzPervasives.Data_encoding.t
type state_data = {
  1. level_data : int32;
  2. locked_round_data : locked_round option;
  3. attestable_payload_data : attestable_payload option;
}
val state_data_encoding : state_data Tezos_base.TzPervasives.Data_encoding.t
val record_state : t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
val may_record_new_state : previous_state:t -> new_state:t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
val load_attestable_data : Tezos_client_alpha.Protocol_client_context.full -> [ `State ] Baking_files.location -> state_data option Tezos_base.TzPervasives.tzresult Lwt.t
val may_load_attestable_data : t -> t Tezos_base.TzPervasives.tzresult Lwt.t
val compute_delegate_slots : Tezos_client_alpha.Protocol_client_context.full -> ?block:Tezos_shell_services.Block_services.block -> level:int32 -> chain:Tezos_shell_services.Shell_services.chain -> consensus_key list -> delegate_slots Tezos_base.TzPervasives.tzresult Lwt.t
  • parameter block

    default to `Head 0

val create_cache : unit -> cache
val pp_validation_mode : Format.formatter -> validation_mode -> unit
val pp_global_state : Format.formatter -> global_state -> unit
val pp_option : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a option -> unit
val pp_block_info : Format.formatter -> block_info -> unit
val pp_proposal : Format.formatter -> proposal -> unit
val pp_locked_round : Format.formatter -> locked_round -> unit
val pp_attestable_payload : Format.formatter -> attestable_payload -> unit
val pp_elected_block : Format.formatter -> elected_block -> unit
val pp_delegate_slot : Format.formatter -> delegate_slot -> unit
val pp_delegate_slots : Format.formatter -> delegate_slots -> unit
val pp_level_state : Format.formatter -> level_state -> unit
val pp_phase : Format.formatter -> phase -> unit
val pp_round_state : Format.formatter -> round_state -> unit
val pp : Format.formatter -> t -> unit
val pp_timeout_kind : Format.formatter -> timeout_kind -> unit
val pp_event : Format.formatter -> event -> unit
OCaml

Innovation. Community. Security.