2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2018-02-06 00:17:03 +04:00
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-11-13 22:06:30 +04:00
|
|
|
(** Tezos Shell - Main entry point of the validation scheduler. *)
|
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
type t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-11-29 16:51:06 +04:00
|
|
|
val create:
|
|
|
|
State.t ->
|
|
|
|
Distributed_db.t ->
|
2018-01-22 20:47:18 +04:00
|
|
|
Peer_validator.limits ->
|
2018-01-26 16:10:20 +04:00
|
|
|
Block_validator.limits ->
|
2017-11-29 16:51:06 +04:00
|
|
|
Prevalidator.limits ->
|
2018-01-22 20:21:23 +04:00
|
|
|
Net_validator.limits ->
|
2018-01-26 16:10:20 +04:00
|
|
|
t Lwt.t
|
2017-09-29 20:43:13 +04:00
|
|
|
val shutdown: t -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-11-13 22:06:30 +04:00
|
|
|
(** Start the validation scheduler of a given network. *)
|
2017-11-11 06:34:12 +04:00
|
|
|
val activate:
|
|
|
|
t ->
|
|
|
|
?max_child_ttl:int ->
|
|
|
|
State.Net.t -> Net_validator.t Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-02-28 21:46:40 +04:00
|
|
|
type error +=
|
2017-11-11 06:34:12 +04:00
|
|
|
| Inactive_network of Net_id.t
|
|
|
|
val get: t -> Net_id.t -> Net_validator.t tzresult Lwt.t
|
|
|
|
val get_exn: t -> Net_id.t -> Net_validator.t Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-13 22:06:30 +04:00
|
|
|
(** Force the validation of a block. *)
|
|
|
|
val validate_block:
|
2017-11-11 06:34:12 +04:00
|
|
|
t ->
|
|
|
|
?force:bool ->
|
2017-11-14 06:14:26 +04:00
|
|
|
?net_id:Net_id.t ->
|
2017-11-14 02:27:19 +04:00
|
|
|
MBytes.t -> Operation.t list list ->
|
2017-04-19 23:46:10 +04:00
|
|
|
(Block_hash.t * State.Block.t tzresult Lwt.t) tzresult Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-13 22:06:30 +04:00
|
|
|
(** Monitor all the valid block (for all activate networks). *)
|
2017-11-27 09:13:12 +04:00
|
|
|
val watcher: t -> State.Block.t Lwt_stream.t * Lwt_watcher.stopper
|
2017-11-14 05:41:37 +04:00
|
|
|
|
|
|
|
val inject_operation:
|
|
|
|
t ->
|
|
|
|
?net_id:Net_id.t ->
|
|
|
|
Operation.t -> unit tzresult Lwt.t
|