package octez-protocol-020-PsParisC-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-protocol-020-PsParisC-libs.baking/Tezos_baking_020_PsParisC/Baking_scheduling/index.html
Module Tezos_baking_020_PsParisC.Baking_schedulingSource
val create_loop_state :
?get_valid_blocks_stream:Baking_state.proposal Lwt_stream.t Lwt.t ->
heads_stream:Baking_state.proposal Lwt_stream.t ->
forge_event_stream:Baking_state.forge_event Lwt_stream.t ->
Operation_worker.t ->
loop_stateval retry :
Tezos_client_020_PsParisC.Protocol_client_context.full ->
?max_delay:float ->
delay:float ->
factor:float ->
tries:int ->
?msg:string ->
('a -> 'b Tezos_base.TzPervasives.tzresult Lwt.t) ->
'a ->
'b Tezos_base.TzPervasives.tzresult Lwt.tretry ctxt ~delay ?max_delay ~factor ~tries ?msg f x retries applying f x tries until it succeeds or returns an error different from Connection_failed, at most tries number of times. After each try it waits for a number of seconds, but not more than max_delay, if given. The wait time between tries is given by the initial delay, multiplied by factor at each subsequent try. At each failure, msg together with the current delay is printed using ctxt#message.
val wait_next_event :
timeout:[ `Timeout of Baking_state.timeout_kind ] Lwt.t ->
loop_state ->
(Baking_state.event option,
Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace)
result
Lwt.tAn event monitor using the streams in loop_state (to create promises) and a timeout promise timeout. The function reacts to a promise being fulfilled by firing an event Baking_state.event.
val first_potential_round_at_next_level :
Baking_state.state ->
earliest_round:Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Round.t ->
(Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Round.t
* Baking_state.consensus_key_and_delegate)
optionReturns the first round at the next level, at or after earliest_round, whose baking slot belongs to one of our own delegates; also returns the corresponding delegate. Or returns None if no such round exists.
val compute_next_potential_baking_time_at_next_level :
Baking_state.state ->
(Tezos_base.TzPervasives.Time.Protocol.t
* Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Round.t)
option
Lwt.tval compute_next_timeout :
Baking_state.state ->
Baking_state.timeout_kind Lwt.t Tezos_base.TzPervasives.tzresult Lwt.tval create_initial_state :
Tezos_client_020_PsParisC.Protocol_client_context.full ->
?synchronize:bool ->
chain:Tezos_shell_services.Chain_services.chain ->
Baking_configuration.t ->
Operation_worker.t ->
current_proposal:Baking_state.proposal ->
?constants:Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Constants.t ->
Baking_state.consensus_key list ->
Baking_state.state Tezos_base.TzPervasives.tzresult Lwt.tval compute_bootstrap_event :
Baking_state.state ->
Baking_state.event Tezos_base.TzPervasives.tzresultval automaton_loop :
?stop_on_event:(Baking_state.event -> bool) ->
config:Baking_configuration.t ->
on_error:
(Tezos_base.TzPervasives.tztrace ->
(unit, Tezos_base.TzPervasives.tztrace) result Lwt.t) ->
loop_state ->
Baking_state.state ->
Baking_state.event ->
Baking_state.event option Tezos_base.TzPervasives.tzresult Lwt.tval run :
Tezos_client_020_PsParisC.Protocol_client_context.full ->
?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_020_PsParisC.Protocol.Alpha_context.Constants.t ->
chain:Tezos_shell_services.Chain_services.chain ->
Baking_configuration.t ->
Baking_state.consensus_key list ->
unit Tezos_base.TzPervasives.tzresult Lwt.t