Tezos_baking_alpha.Baking_schedulingval create_initial_state :
Tezos_client_alpha.Protocol_client_context.full ->
?dal_node_rpc_ctxt:Tezos_rpc.Context.generic ->
?synchronize:bool ->
chain:Tezos_shell_services.Chain_services.chain ->
Baking_configuration.t ->
Operation_worker.t ->
Dal_attestable_slots_worker.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Round.round_durations ->
current_proposal:Baking_state_types.proposal ->
?constants:Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t ->
Baking_state_types.Key.t list ->
Baking_state.state Tezos_base.TzPervasives.tzresult Lwt.tcreate_initial_state context ?synchronize chain baking_configuration operation_worker dal_attestable_slots_worker current_proposal ?constants consensus_keys creates an initial Baking_state.t by initializing a Baking_state.global_state, a Baking_state.level_state and a Baking_state.round_state.
global_state and automaton_state initialization, a validation mode is set based on the baking_configuration and a forge worker is started. If constants is not provided, an RPC is called to recover them from the context.level_state initialization, information regarding the current level is retrieved (the current level being that of the current_proposal) and delegates slots are computed for the given consensus_keys.round_state initialization, current round is compute by calling Baking_actions.compute_round with current_proposal information if synchronize is set to true (which is the default).val run :
Tezos_client_alpha.Protocol_client_context.full ->
extra_nodes:Tezos_client_alpha.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_alpha.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