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-02-24 20:17:53 +04:00
|
|
|
type shell_operation = Store.Operation.shell_header = {
|
|
|
|
net_id: Net_id.t ;
|
2016-09-08 21:13:10 +04:00
|
|
|
}
|
|
|
|
val shell_operation_encoding: shell_operation Data_encoding.t
|
|
|
|
|
2017-02-24 20:17:53 +04:00
|
|
|
type raw_operation = Store.Operation.t = {
|
2016-09-08 21:13:10 +04:00
|
|
|
shell: shell_operation ;
|
|
|
|
proto: MBytes.t ;
|
|
|
|
}
|
|
|
|
val raw_operation_encoding: raw_operation Data_encoding.t
|
|
|
|
|
2017-04-14 00:48:07 +04:00
|
|
|
type shell_block_header = Store.Block_header.shell_header = {
|
2017-02-24 20:17:53 +04:00
|
|
|
net_id: Net_id.t ;
|
2017-04-10 15:01:22 +04:00
|
|
|
level: Int32.t ;
|
2017-04-12 20:22:40 +04:00
|
|
|
proto_level: int ; (* uint8 *)
|
2016-09-08 21:13:10 +04:00
|
|
|
predecessor: Block_hash.t ;
|
|
|
|
timestamp: Time.t ;
|
2017-04-10 19:06:11 +04:00
|
|
|
operations_hash: Operation_list_list_hash.t ;
|
2016-09-08 21:13:10 +04:00
|
|
|
fitness: MBytes.t list ;
|
|
|
|
}
|
2017-04-14 00:48:07 +04:00
|
|
|
val shell_block_header_encoding: shell_block_header Data_encoding.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-04-14 00:48:07 +04:00
|
|
|
type raw_block_header = Store.Block_header.t = {
|
|
|
|
shell: shell_block_header ;
|
2016-09-08 21:13:10 +04:00
|
|
|
proto: MBytes.t ;
|
|
|
|
}
|
2017-04-14 00:48:07 +04:00
|
|
|
val raw_block_header_encoding: raw_block_header Data_encoding.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-04-10 14:14:11 +04:00
|
|
|
type validation_result = Protocol.validation_result = {
|
|
|
|
context: Context.t ;
|
|
|
|
fitness: Fitness.fitness ;
|
|
|
|
message: string option ;
|
|
|
|
}
|
|
|
|
|
|
|
|
type rpc_context = Protocol.rpc_context = {
|
|
|
|
context: Context.t ;
|
2017-04-10 15:01:22 +04:00
|
|
|
level: Int32.t ;
|
2017-04-10 14:14:11 +04:00
|
|
|
timestamp: Time.t ;
|
|
|
|
fitness: Fitness.fitness ;
|
|
|
|
}
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
module type PROTOCOL = Protocol.PROTOCOL
|
|
|
|
module type REGISTRED_PROTOCOL = sig
|
|
|
|
val hash: Protocol_hash.t
|
|
|
|
(* exception Ecoproto_error of error list *)
|
|
|
|
include Protocol.PROTOCOL with type error := error
|
|
|
|
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
|
|
|
|
|
2016-10-24 21:15:35 +04:00
|
|
|
type component = Tezos_compiler.Protocol.component = {
|
2016-09-08 21:13:10 +04:00
|
|
|
name : string ;
|
|
|
|
interface : string option ;
|
|
|
|
implementation : string ;
|
|
|
|
}
|
|
|
|
|
2016-10-25 21:00:03 +04:00
|
|
|
val extract: Lwt_io.file_name -> Protocol_hash.t -> component list -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
val compile: Protocol_hash.t -> component list -> bool Lwt.t
|
|
|
|
|
|
|
|
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
|