2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-04-19 21:21:23 +04:00
|
|
|
(* See `src/proto/updater.mli` for documentation. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-04-19 21:21:23 +04:00
|
|
|
type validation_result = Protocol_sigs.validation_result = {
|
2017-04-10 14:14:11 +04:00
|
|
|
context: Context.t ;
|
2017-04-19 21:21:23 +04:00
|
|
|
fitness: Fitness.t ;
|
2017-04-10 14:14:11 +04:00
|
|
|
message: string option ;
|
2017-04-18 13:29:14 +04:00
|
|
|
max_operations_ttl: int ;
|
2017-04-10 14:14:11 +04:00
|
|
|
}
|
|
|
|
|
2017-04-19 21:21:23 +04:00
|
|
|
type rpc_context = Protocol_sigs.rpc_context = {
|
2017-04-14 02:07:01 +04:00
|
|
|
block_hash: Block_hash.t ;
|
2017-04-19 21:21:23 +04:00
|
|
|
block_header: Block_header.t ;
|
2017-04-14 02:07:01 +04:00
|
|
|
operation_hashes: unit -> Operation_hash.t list list Lwt.t ;
|
2017-04-19 21:21:23 +04:00
|
|
|
operations: unit -> Operation.t list list Lwt.t ;
|
2017-04-10 14:14:11 +04:00
|
|
|
context: Context.t ;
|
|
|
|
}
|
|
|
|
|
2017-04-19 21:21:23 +04:00
|
|
|
module type PROTOCOL = Protocol_sigs.PROTOCOL
|
|
|
|
module type PACKED_PROTOCOL = Protocol_sigs.PACKED_PROTOCOL
|
2016-09-08 21:13:10 +04:00
|
|
|
module type REGISTRED_PROTOCOL = sig
|
|
|
|
val hash: Protocol_hash.t
|
|
|
|
(* exception Ecoproto_error of error list *)
|
2017-04-19 21:21:23 +04:00
|
|
|
include PROTOCOL with type error := error
|
2016-09-08 21:13:10 +04:00
|
|
|
and type 'a tzresult := 'a tzresult
|
2017-02-19 21:22:32 +04:00
|
|
|
val complete_b58prefix : Context.t -> string -> string list Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
end
|
|
|
|
|
2017-04-19 21:21:23 +04:00
|
|
|
val extract: Lwt_io.file_name -> Protocol_hash.t -> Protocol.t -> unit Lwt.t
|
|
|
|
val compile: Protocol_hash.t -> Protocol.t -> bool Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val activate: Context.t -> Protocol_hash.t -> Context.t Lwt.t
|
2017-04-10 23:14:17 +04:00
|
|
|
val fork_test_network:
|
|
|
|
Context.t -> protocol:Protocol_hash.t -> expiration:Time.t -> Context.t Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val register: Protocol_hash.t -> (module REGISTRED_PROTOCOL) -> unit
|
|
|
|
|
|
|
|
val get: Protocol_hash.t -> (module REGISTRED_PROTOCOL) option
|
|
|
|
val get_exn: Protocol_hash.t -> (module REGISTRED_PROTOCOL)
|
|
|
|
|
|
|
|
val init: string -> unit
|