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-02-16 04:26:24 +04:00
|
|
|
Chain_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
|
|
|
|
2018-02-16 04:26:24 +04:00
|
|
|
(** Start the validation scheduler of a given chain. *)
|
2017-11-11 06:34:12 +04:00
|
|
|
val activate:
|
|
|
|
t ->
|
|
|
|
?max_child_ttl:int ->
|
2018-02-16 04:26:24 +04:00
|
|
|
State.Chain.t -> Chain_validator.t Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2018-02-16 04:26:24 +04:00
|
|
|
val get: t -> Chain_id.t -> Chain_validator.t tzresult Lwt.t
|
|
|
|
val get_exn: t -> Chain_id.t -> Chain_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 ->
|
2018-02-16 04:26:24 +04:00
|
|
|
?chain_id:Chain_id.t ->
|
2017-11-14 02:27:19 +04:00
|
|
|
MBytes.t -> Operation.t list list ->
|
2018-04-20 22:42:44 +04:00
|
|
|
(Block_hash.t * State.Block.t option tzresult Lwt.t) tzresult Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2018-02-16 04:26:24 +04:00
|
|
|
(** Monitor all the valid block (for all activate chains). *)
|
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 ->
|
2018-02-16 04:26:24 +04:00
|
|
|
?chain_id:Chain_id.t ->
|
2017-11-14 05:41:37 +04:00
|
|
|
Operation.t -> unit tzresult Lwt.t
|