Block_producer
module type CONTEXT = sig ... end
val block_produced_structured_events_id : Structured_log_events.id
val block_produced_structured_events_repr : Structured_log_events.repr
module Singleton_supervisor : sig ... end
val time_to_ms : Block_time.t -> Core_kernel.Int64.t
val time_of_ms : Core_kernel.Int64.t -> Block_time.t
val lift_sync : ( unit -> 'a ) -> ( 'b, 'c ) Interruptible.t
module Singleton_scheduler : sig ... end
val report_transaction_inclusion_failures :
logger:Logger.t ->
(Mina_base.User_command.Valid.t * Base.Error.t) list ->
unit Async.Deferred.t
Sends an error to the reporting service containing as many failed transactions as we can fit.
val generate_next_state :
constraint_constants:Genesis_constants.Constraint_constants.t ->
previous_protocol_state:
( Mina_wire_types.Mina_base.State_hash.V1.t,
Mina_state.Protocol_state.Body.Value.t )
Mina_state.Protocol_state.Poly.t ->
time_controller:Block_time.Controller.t ->
staged_ledger:Staged_ledger.t ->
transactions:Mina_base.User_command.Valid.t Core_kernel.Sequence.t ->
get_completed_work:
( Transaction_snark_work.Statement.t ->
Transaction_snark_work.Checked.t option ) ->
logger:Logger.t ->
block_data:Consensus.Data.Block_data.t ->
winner_pk:Signature_lib.Public_key.Compressed.t ->
scheduled_time:Block_time.t ->
log_block_creation:bool ->
block_reward_threshold:Currency.Amount.Stable.Latest.t option ->
( (Mina_state.Protocol_state.Value.t
* Mina_block.Internal_transition.Stable.Latest.t
* Mina_base.Pending_coinbase_witness.t)
option,
'a )
Interruptible.t
module Precomputed : sig ... end
val handle_block_production_errors :
logger:Logger.t ->
rejected_blocks_logger:Logger.t ->
time_taken:Block_time.Span.t ->
previous_protocol_state:Mina_state.Protocol_state.value ->
protocol_state:Mina_state.Protocol_state.Value.t ->
( unit,
[< `Already_in_frontier
| `Fatal_error of exn
| `Invalid_genesis_protocol_state
| `Invalid_staged_ledger_diff of Base.Error.t * Staged_ledger_diff.t
| `Invalid_staged_ledger_hash of Core.Error.t
| `Not_selected_over_frontier_root
| `Parent_missing_from_frontier
| `Prover_error of
Base.Error.t
* (Mina_base.Proof.t
* Mina_block.Internal_transition.t
* Mina_base.Pending_coinbase_witness.t) ] )
Core._result ->
unit Async_kernel__Deferred.t
val time :
logger:Logger.t ->
time_controller:Block_time.Controller.t ->
string ->
( unit -> ( 'a, 'b ) Async_kernel__Deferred_result.t ) ->
( 'c, 'b ) Async_kernel__Deferred_result.t
val retry :
?max:Core_kernel__Int.t ->
logger:Logger.t ->
error_message:string ->
( unit -> ( 'a, Core.Error.t ) Core._result Async_kernel__Deferred.t ) ->
'b Async_kernel__Deferred.t
module Vrf_evaluation_state : sig ... end
val run :
context:(module CONTEXT) ->
vrf_evaluator:Vrf_evaluator.t ->
prover:Prover.t ->
verifier:Verifier.t ->
trust_system:Trust_system.t ->
get_completed_work:
( Transaction_snark_work.Statement.t ->
Transaction_snark_work.Checked.t option ) ->
transaction_resource_pool:Network_pool.Transaction_pool.Resource_pool.t ->
time_controller:Block_time.Controller.t ->
consensus_local_state:Consensus.Data.Local_state.t ->
coinbase_receiver:Consensus.Coinbase_receiver.t Core.ref ->
frontier_reader:Transition_frontier.t option Pipe_lib.Broadcast_pipe.Reader.t ->
transition_writer:
( Frontier_base__Breadcrumb.t, 'a, unit Async_kernel__Deferred.t )
Pipe_lib.Strict_pipe.Writer.t ->
set_next_producer_timing:
( [> `Check_again of Block_time.t
| `Evaluating_vrf of Mina_numbers.Global_slot.t
| `Produce of
Core_kernel.Int64.t
* Consensus.Data.Block_data.t
* Signature_lib.Public_key.Compressed.t
| `Produce_now of
Consensus.Data.Block_data.t * Signature_lib.Public_key.Compressed.t ] ->
Consensus.Data.Consensus_state.Value.t ->
'b ) ->
log_block_creation:bool ->
block_reward_threshold:Currency.Amount.Stable.Latest.t option ->
block_produced_bvar:
( Frontier_base__Breadcrumb.t, [> Core_kernel.write ] ) Async.Bvar.t ->
unit
val run_precomputed :
context:(module CONTEXT) ->
verifier:Verifier.t ->
trust_system:Trust_system.t ->
time_controller:Block_time.Controller.t ->
frontier_reader:Transition_frontier.t option Pipe_lib.Broadcast_pipe.Reader.t ->
transition_writer:
( Frontier_base__Breadcrumb.t, 'a, unit Async_kernel__Deferred.t )
Pipe_lib.Strict_pipe.Writer.t ->
precomputed_blocks:Precomputed.t Base.Sequence.t ->
unit Async_kernel__Deferred.t