Tezos_baking_alpha.Baking_stateSourcetype consensus_key = {alias : string option;public_key : Tezos_base.TzPervasives.Signature.public_key;public_key_hash : Tezos_base.TzPervasives.Signature.public_key_hash;secret_key_uri : Tezos_client_base.Client_keys.sk_uri;}type consensus_key_and_delegate =
consensus_key * Tezos_base.TzPervasives.Signature.Public_key_hash.tval consensus_key_and_delegate_encoding :
consensus_key_and_delegate Tezos_base.TzPervasives.Data_encoding.ttype prequorum = {level : int32;round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;block_payload_hash : Tezos_protocol_alpha.Protocol.Block_payload_hash.t;preattestations : Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list;}type block_info = {hash : Tezos_base.TzPervasives.Block_hash.t;shell : Tezos_protocol_alpha.Protocol.Alpha_context.Block_header.shell_header;payload_hash : Tezos_protocol_alpha.Protocol.Block_payload_hash.t;payload_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;prequorum : prequorum option;quorum : Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list;dal_attestations : Tezos_protocol_alpha.Protocol.Alpha_context.Kind.dal_attestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list;payload : Operation_pool.payload;}type cache = {known_timestamps : Tezos_protocol_alpha.Protocol.Alpha_context.Timestamp.time
Baking_cache.Timestamp_of_round_cache.t;round_timestamps : (Tezos_protocol_alpha.Protocol.Alpha_context.Timestamp.time
* Tezos_protocol_alpha.Protocol.Alpha_context.Round.t
* consensus_key_and_delegate)
Baking_cache.Round_timestamp_interval_cache.t;}type global_state = {cctxt : Tezos_client_alpha.Protocol_client_context.full;chain_id : Tezos_base.TzPervasives.Chain_id.t;config : Baking_configuration.t;constants : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t;round_durations : Tezos_protocol_alpha.Protocol.Alpha_context.Round.round_durations;operation_worker : Operation_worker.t;validation_mode : validation_mode;delegates : consensus_key list;cache : cache;dal_node_rpc_ctxt : Tezos_rpc.Context.generic option;}val round_of_shell_header :
Tezos_protocol_alpha.Protocol.Alpha_context.Block_header.shell_header ->
Tezos_protocol_alpha.Protocol.Alpha_context.Round.t
Tezos_base.TzPervasives.tzresultmodule SlotMap :
Tezos_base.TzPervasives.Map.S
with type key = Tezos_protocol_alpha.Protocol.Alpha_context.Slot.ttype delegate_slot = {consensus_key_and_delegate : consensus_key_and_delegate;first_slot : Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t;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.
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.
type locked_round = {payload_hash : Tezos_protocol_alpha.Protocol.Block_payload_hash.t;round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;}type level_state = {current_level : int32;latest_proposal : proposal;is_latest_proposal_applied : bool;locked_round : locked_round option;attestable_payload : attestable_payload option;elected_block : elected_block option;delegate_slots : delegate_slots;next_level_delegate_slots : delegate_slots;next_level_proposed_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t
option;}type round_state = {current_round : Tezos_protocol_alpha.Protocol.Alpha_context.Round.t;current_phase : phase;delayed_prequorum : (Operation_worker.candidate
* Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list)
option;}type state = {global_state : global_state;level_state : level_state;round_state : round_state;}val round_proposer :
state ->
level:[ `Current | `Next ] ->
Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
delegate_slot optionReturns, 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 event = | New_valid_proposal of proposal| New_head_proposal of proposal| Prequorum_reached of Operation_worker.candidate
* Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list| Quorum_reached of Operation_worker.candidate
* Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.Protocol.Alpha_context.operation
list| Timeout of timeout_kindtype state_data = {level_data : int32;locked_round_data : locked_round option;attestable_payload_data : attestable_payload option;}val may_record_new_state :
previous_state:t ->
new_state:t ->
unit Tezos_base.TzPervasives.tzresult Lwt.tval load_attestable_data :
Tezos_client_alpha.Protocol_client_context.full ->
[ `State ] Baking_files.location ->
state_data option Tezos_base.TzPervasives.tzresult Lwt.tval 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