package octez-protocol-019-PtParisB-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_baking_019_PtParisB.Baking_stateSource

Sourcetype 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;
}
Sourceval consensus_key_encoding : consensus_key Tezos_base.TzPervasives.Data_encoding.t
Sourceval pp_consensus_key : Format.formatter -> consensus_key -> unit
Sourcetype consensus_key_and_delegate = consensus_key * Tezos_base.TzPervasives.Signature.Public_key_hash.t
Sourceval consensus_key_and_delegate_encoding : consensus_key_and_delegate Tezos_base.TzPervasives.Data_encoding.t
Sourceval pp_consensus_key_and_delegate : Format.formatter -> consensus_key_and_delegate -> unit
Sourcetype validation_mode =
  1. | Node
  2. | Local of Abstract_context_index.t

The validation mode specifies whether the baker (filters and) validates mempool operations via an RPC to the node, or if it does so "locally", by using the context.

Sourcetype prequorum = {
  1. level : int32;
  2. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  3. block_payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t;
  4. preattestations : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.preattestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list;
}
Sourcetype block_info = {
  1. hash : Tezos_base.TzPervasives.Block_hash.t;
  2. shell : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Block_header.shell_header;
  3. payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t;
  4. payload_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  5. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  6. prequorum : prequorum option;
  7. quorum : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.attestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list;
  8. payload : Operation_pool.payload;
}
Sourcetype cache = {
  1. known_timestamps : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Timestamp.time Baking_cache.Timestamp_of_round_cache.t;
  2. round_timestamps : (Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Timestamp.time * Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t * consensus_key_and_delegate) Baking_cache.Round_timestamp_interval_cache.t;
}
Sourcetype block_kind =
  1. | Fresh of Operation_pool.pool
  2. | Reproposal of {
    1. consensus_operations : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.packed_operation list;
    2. payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t;
    3. payload_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
    4. payload : Operation_pool.payload;
    }
Sourcetype block_to_bake = {
  1. predecessor : block_info;
  2. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  3. delegate : consensus_key_and_delegate;
  4. kind : block_kind;
  5. force_apply : bool;
    (*

    if true, while baking the block, try and apply the block and its operations instead of only validating them. this can be permanently set using the --force-apply flag (see force_apply_switch_arg in baking_commands.ml).

    *)
}
Sourceval block_info_encoding : block_info Tezos_base.TzPervasives.Data_encoding.t
Sourceval round_of_shell_header : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Block_header.shell_header -> Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t Tezos_base.TzPervasives.tzresult
Sourcemodule SlotMap : Tezos_base.TzPervasives.Map.S with type key = Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Slot.t
Sourcetype delegate_slot = {
  1. consensus_key_and_delegate : consensus_key_and_delegate;
  2. first_slot : Tezos_protocol_019_PtParisB.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.

Sourcemodule Delegate_slots : sig ... end
Sourcetype delegate_slots = Delegate_slots.t
Sourcetype proposal = {
  1. block : block_info;
  2. predecessor : block_info;
}
Sourceval proposal_encoding : proposal Tezos_base.TzPervasives.Data_encoding.t
Sourceval 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.

Sourcetype locked_round = {
  1. payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t;
  2. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
}
Sourceval locked_round_encoding : locked_round Tezos_base.TzPervasives.Data_encoding.t
Sourcetype attestable_payload = {
  1. proposal : proposal;
  2. prequorum : prequorum;
}
Sourceval attestable_payload_encoding : attestable_payload Tezos_base.TzPervasives.Data_encoding.t
Sourcetype elected_block = {
  1. proposal : proposal;
  2. attestation_qc : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.attestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list;
}
Sourcetype prepared_block = {
  1. signed_block_header : Tezos_protocol_019_PtParisB.Protocol.block_header;
  2. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  3. delegate : consensus_key_and_delegate;
  4. operations : Tezos_base.Operation.t list list;
  5. baking_votes : Tezos_protocol_019_PtParisB.Protocol.Per_block_votes_repr.per_block_votes;
}
Sourcetype consensus_vote_kind =
  1. | Attestation
  2. | Preattestation
Sourceval pp_consensus_vote_kind : Format.formatter -> consensus_vote_kind -> unit
Sourceval consensus_vote_kind_encoding : consensus_vote_kind Tezos_base.TzPervasives.Data_encoding.t
Sourcetype unsigned_consensus_vote = {
  1. vote_kind : consensus_vote_kind;
  2. vote_consensus_content : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.consensus_content;
  3. delegate : consensus_key_and_delegate;
  4. dal_content : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.dal_content option;
}
Sourcetype signed_consensus_vote = {
  1. unsigned_consensus_vote : unsigned_consensus_vote;
  2. signed_operation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.packed_operation;
}
Sourcetype batch_content = {
  1. level : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Raw_level.t;
  2. round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  3. block_payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t;
}
Sourcetype unsigned_consensus_vote_batch = private {
  1. batch_kind : consensus_vote_kind;
  2. batch_content : batch_content;
  3. batch_branch : Tezos_base.TzPervasives.Block_hash.t;
  4. unsigned_consensus_votes : unsigned_consensus_vote list;
}
Sourceval make_unsigned_consensus_vote_batch : consensus_vote_kind -> batch_content -> batch_branch:Tezos_base.TzPervasives.Block_hash.t -> (consensus_key_and_delegate * Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Slot.t) list -> unsigned_consensus_vote_batch
Sourceval dal_content_map_p : (unsigned_consensus_vote -> Tezos_protocol_019_PtParisB.Protocol.Alpha_context.dal_content option Tezos_base.TzPervasives.tzresult Lwt.t) -> unsigned_consensus_vote_batch -> unsigned_consensus_vote_batch Lwt.t
Sourcetype signed_consensus_vote_batch = private {
  1. batch_kind : consensus_vote_kind;
  2. batch_content : batch_content;
  3. batch_branch : Tezos_base.TzPervasives.Block_hash.t;
  4. signed_consensus_votes : signed_consensus_vote list;
}
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Mismatch_signed_consensus_vote_in_batch
Sourceval make_signed_consensus_vote_batch : consensus_vote_kind -> batch_content -> batch_branch:Tezos_base.TzPervasives.Block_hash.t -> signed_consensus_vote list -> signed_consensus_vote_batch Tezos_base.TzPervasives.tzresult
Sourceval make_singleton_consensus_vote_batch : signed_consensus_vote -> signed_consensus_vote_batch
Sourcetype 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_019_PtParisB.Protocol.Alpha_context.Round.t option;
}
Sourcetype phase =
  1. | Idle
  2. | Awaiting_preattestations
  3. | Awaiting_attestations
  4. | Awaiting_application
Sourceval phase_encoding : phase Tezos_base.TzPervasives.Data_encoding.t
Sourcetype round_state = {
  1. current_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
  2. current_phase : phase;
  3. delayed_quorum : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.attestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list option;
  4. early_attestations : signed_consensus_vote list;
  5. awaiting_unlocking_pqc : bool;
}
Sourcetype forge_event =
  1. | Block_ready of prepared_block
  2. | Preattestation_ready of signed_consensus_vote
  3. | Attestation_ready of signed_consensus_vote

forge_event type used to return the result of a task completion in the forge worker.

Sourcetype forge_request =
  1. | Forge_and_sign_block of block_to_bake
  2. | Forge_and_sign_preattestations of {
    1. unsigned_preattestations : unsigned_consensus_vote_batch;
    }
  3. | Forge_and_sign_attestations of {
    1. unsigned_attestations : unsigned_consensus_vote_batch;
    }

forge_request type used to push a concurrent forging task in the forge worker.

Sourcetype forge_worker_hooks = {
  1. push_request : forge_request -> unit;
  2. get_forge_event_stream : unit -> forge_event Lwt_stream.t;
  3. cancel_all_pending_tasks : unit -> unit;
}

forge_worker_hooks type that allows interactions with the forge worker. Hooks are needed in order to break a circular dependency.

Sourcetype global_state = {
  1. cctxt : Tezos_client_019_PtParisB.Protocol_client_context.full;
  2. chain_id : Tezos_base.TzPervasives.Chain_id.t;
  3. config : Baking_configuration.t;
  4. constants : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Constants.t;
  5. round_durations : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.round_durations;
  6. operation_worker : Operation_worker.t;
  7. mutable forge_worker_hooks : forge_worker_hooks;
  8. validation_mode : validation_mode;
  9. delegates : consensus_key list;
  10. cache : cache;
  11. dal_node_rpc_ctxt : Tezos_rpc.Context.generic option;
}
Sourcetype state = {
  1. global_state : global_state;
  2. level_state : level_state;
  3. round_state : round_state;
}
Sourcetype t = state
Sourceval update_current_phase : t -> phase -> t
Sourceval round_proposer : state -> level:[ `Current | `Next ] -> Tezos_protocol_019_PtParisB.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.

Sourcetype timeout_kind =
  1. | End_of_round of {
    1. ending_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
    }
  2. | Time_to_prepare_next_level_block of {
    1. at_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t;
    }
Sourceval timeout_kind_encoding : timeout_kind Tezos_base.TzPervasives.Data_encoding.t
Sourcetype event =
  1. | New_valid_proposal of proposal
  2. | New_head_proposal of proposal
  3. | Prequorum_reached of Operation_worker.candidate * Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.preattestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list
  4. | Quorum_reached of Operation_worker.candidate * Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.attestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation list
  5. | New_forge_event of forge_event
  6. | Timeout of timeout_kind
Sourceval event_encoding : event Tezos_base.TzPervasives.Data_encoding.t
Sourceval forge_event_encoding : forge_event Tezos_base.TzPervasives.Data_encoding.t
Sourcetype state_data = {
  1. level_data : int32;
  2. locked_round_data : locked_round option;
  3. attestable_payload_data : attestable_payload option;
}
Sourceval state_data_encoding : state_data Tezos_base.TzPervasives.Data_encoding.t
Sourceval record_state : t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval may_record_new_state : previous_state:t -> new_state:t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval may_load_attestable_data : t -> t Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval create_cache : unit -> cache
Sourceval timestamp_of_round : state -> predecessor_timestamp:Tezos_base.TzPervasives.Time.Protocol.t -> predecessor_round:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t -> round:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t -> Tezos_base.TzPervasives.Time.Protocol.t Tezos_base.TzPervasives.tzresult

Memoization wrapper for Round.timestamp_of_round.

Sourceval compute_next_round_time : state -> (Tezos_base.TzPervasives.Time.Protocol.t * Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t) option

From the current state, the function returns an optional association pair, which consists of the next round timestamp and its round.

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

Innovation. Community. Security.