Tezos_baking_025_PsUshuai.Baking_schedulingval create_global_state :
?dal_node_rpc_ctxt:Tezos_rpc.Context.generic ->
?constants:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Constants.t ->
chain:Tezos_shell_services.Chain_services.chain ->
Tezos_client_025_PsUshuai.Protocol_client_context.full ->
Baking_configuration.t ->
Baking_state_types.Key.t list ->
Baking_state.global_state Tezos_base.TzPervasives.tzresult Lwt.tcreate_global_state ?dal_node_rpc_ctxt ?constants ~chain context baking_configuration consensus_keys creates a Baking_state.global_state: round_durations are created from constants, and a forge worker is started. If constants is not provided, an RPC is called to recover them from context.
val create_initial_state :
?canceler:Lwt_canceler.t ->
Tezos_client_025_PsUshuai.Protocol_client_context.full ->
?synchronize:bool ->
?monitor_node_operations:bool ->
multi_node_setup:bool ->
global_state:Baking_state.global_state ->
current_proposal:Baking_state_types.proposal ->
Baking_state_types.Key.t list ->
Baking_state.state Tezos_base.TzPervasives.tzresult Lwt.tcreate_initial_state ?canceler context ?synchronize ?monitor_node_operations ~global_state current_proposal consensus_keys creates an initial Baking_state.t for a single node connection by initializing a Baking_state.automaton_state, a Baking_state.level_state and a Baking_state.round_state from an existing global_state.
automaton_state initialization, a validation mode is set based on the baking configuration and an operation worker is started. If canceler is provided, cancelling it will also trigger a shutdown of the operation worker. See Baking_automaton.create_automaton_state.level_state initialization, information regarding the current and next levels is retrieved (the current level being that of the current_proposal) and delegate slots are computed for the given consensus_keys at both levels. The DAL included attestations cache committees are also initialized for both levels.round_state initialization, current round is computed by calling Baking_actions.compute_round with current_proposal information if synchronize is set to true (which is the default).val run :
Tezos_client_025_PsUshuai.Protocol_client_context.full ->
extra_nodes:Tezos_client_025_PsUshuai.Protocol_client_context.full list ->
?dal_node_rpc_ctxt:Tezos_rpc.Context.generic ->
?canceler:Lwt_canceler.t ->
?stop_on_event:(Baking_state.event -> bool) ->
?on_error:
(Tezos_base.TzPervasives.tztrace ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?constants:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Constants.t ->
chain:Tezos_shell_services.Chain_services.chain ->
Baking_configuration.t ->
Baking_state_types.Key.t list ->
unit Tezos_base.TzPervasives.tzresult Lwt.trun context ?canceler ?stop_on_event ?on_error ?constants chain baking_configuration consensus_keys is the entry point of the baker automaton. This function performs the following tasks:
Baking_automaton.create_initial_stateregister_dal_profiles node RPCBaking_nonces.start_revelation_workerBaking_automaton.create_loop_stateBaking_automaton.automaton_loop