diff --git a/src/client/embedded/alpha/client_proto_aliases.ml b/src/client/embedded/alpha/client_proto_aliases.ml deleted file mode 100644 index 141468d60..000000000 --- a/src/client/embedded/alpha/client_proto_aliases.ml +++ /dev/null @@ -1,16 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - - - -(* -- aliases ----------------------------------------------------------------- *) - - -(* -- parsing ----------------------------------------------------------------- *) - diff --git a/src/client/embedded/alpha/client_proto_aliases.mli b/src/client/embedded/alpha/client_proto_aliases.mli deleted file mode 100644 index 447918baa..000000000 --- a/src/client/embedded/alpha/client_proto_aliases.mli +++ /dev/null @@ -1,10 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - -module Contract : Client_aliases.Alias with type t = Contract_repr.contract diff --git a/src/client/embedded/alpha/local_error_monad.ml b/src/client/embedded/alpha/local_error_monad.ml deleted file mode 100644 index 5e2773457..000000000 --- a/src/client/embedded/alpha/local_error_monad.ml +++ /dev/null @@ -1,21 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - -module Shell_error_monad = Error_monad - -module Error_monad = struct - type error_category = [ `Branch | `Temporary | `Permanent ] - include Shell_error_monad.Make() -end - -type error += Ecoproto_error of Error_monad.error list - -let wrap = function - | Ok x -> Ok x - | Error errors -> Error [Ecoproto_error errors] diff --git a/src/compiler/sigs/context.mli b/src/compiler/sigs/context.mli deleted file mode 120000 index 28478671c..000000000 --- a/src/compiler/sigs/context.mli +++ /dev/null @@ -1 +0,0 @@ -../../node/db/context.mli \ No newline at end of file diff --git a/src/compiler/sigs/persist.mli b/src/compiler/sigs/persist.mli deleted file mode 120000 index 660e50693..000000000 --- a/src/compiler/sigs/persist.mli +++ /dev/null @@ -1 +0,0 @@ -../../node/db/persist.mli \ No newline at end of file diff --git a/src/compiler/sigs/protocol_sigs.mli b/src/compiler/sigs/protocol_sigs.mli deleted file mode 120000 index dde04fea3..000000000 --- a/src/compiler/sigs/protocol_sigs.mli +++ /dev/null @@ -1 +0,0 @@ -../../node/updater/protocol_sigs.mli \ No newline at end of file diff --git a/src/compiler/sigs/register.mli b/src/compiler/sigs/register.mli deleted file mode 120000 index f1f51a13b..000000000 --- a/src/compiler/sigs/register.mli +++ /dev/null @@ -1 +0,0 @@ -../../node/updater/register.mli \ No newline at end of file diff --git a/src/compiler/sigs/tezos_data.mli b/src/compiler/sigs/tezos_data.mli deleted file mode 120000 index 099fe6030..000000000 --- a/src/compiler/sigs/tezos_data.mli +++ /dev/null @@ -1 +0,0 @@ -../../utils/tezos_data.mli \ No newline at end of file diff --git a/src/node/updater/proto_environment.ml b/src/node/updater/proto_environment.ml deleted file mode 100644 index 834a7da9d..000000000 --- a/src/node/updater/proto_environment.ml +++ /dev/null @@ -1,18 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - -(* module Make(Param : sig val name: string end)() = struct *) - -module V1 = struct - include Environment.Make(struct let name = "proto.alpha" end)() - - let __cast (type error) (module X : PACKED_PROTOCOL) = - (module X : Protocol_sigs.PACKED_PROTOCOL) - -end diff --git a/src/proto/alpha/script_parser.mli b/src/proto/alpha/script_parser.mli deleted file mode 100644 index 26780d219..000000000 --- a/src/proto/alpha/script_parser.mli +++ /dev/null @@ -1,46 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - -open Contract_repr - -(** The node position in the AST in prefix order *) -type location = int -val location_encoding : location Data_encoding.t - -(** The three possible parsing contexts *) -type parse_context = Type | Constant | Instr - -(** The primitive on which an error happened *) -type parse_symbol = parse_context * string - -(** Errors (only used as result in the error monad) *) -exception Invalid_arity of location * parse_symbol * int * int -exception Unknown_primitive of location * parse_symbol -exception Comparable_type_expected of location -exception Invalid_push of location -exception Invalid_node of location * parse_context -exception Invalid_constant of location * string - -(** An association from script AST nodes to original expression nodes. - Nodes are represented by their indexes in expression trees and - script AST in prefix order, the root being 0. In expression nodes, - all constants count for 1, as do a primitive applcation or a - sequence. In AST nodes, all constructors count for 1, except for - all type contructors and the seq instruction constructor which are - omitted. *) -type code_map = (int * int) list - -(** parse a script expression as code, may return a [Parse_error] *) -val parse_code: Script_ir.node -> (script_instr * code_map) result - -(** parse a script expression as typed data, may return a [Parse_error] *) -val parse_data: Script_ir.node -> (script_data_ty * script_data * code_map) result - -(** parse a script expression as a type, may return a [Parse_error] *) -val parse_data_type: Script_ir.node -> (script_data_ty * code_map) result diff --git a/src/proto/alpha/storage_helpers.mli b/src/proto/alpha/storage_helpers.mli deleted file mode 100644 index 67e74fbdb..000000000 --- a/src/proto/alpha/storage_helpers.mli +++ /dev/null @@ -1,236 +0,0 @@ -(**************************************************************************) -(* *) -(* Copyright (c) 2014 - 2016. *) -(* Dynamic Ledger Solutions, Inc. *) -(* *) -(* All rights reserved. No warranty, explicit or implicit, provided. *) -(* *) -(**************************************************************************) - -(** Tezos Protocol Implementation - Typed storage accessor builders - - This module hides the hierarchical (key x value) database under - three kinds of typed data accessors (single typed data, homgeneous - indexed data and homgeneous data set). *) - -type context = Context.t * Constants.constants - - -(** {1 Errors} ****************************************************************) - -(** An internal storage error that should not happen *) -type error += Storage_error of string - -(** {1 Data Accessor Signatures} *********************************************) - -(** The generic signature of a single data accessor (a single value - bound to a specific key in the hierarchical (key x value) - database). *) -module type Minimal_single_data_storage = sig - - (** The type of the value *) - type value - - (** Retrieve the value from the storage bucket ; returns a - {!Storage_error} if the key is not set or if the deserialisation - fails *) - val get : context -> value tzresult Lwt.t - - (** Tells if the data is already defined *) - val mem : context -> bool Lwt.t - - (** Updates the content of the bucket ; returns a {!Storage_Error} - if the value does not exists *) - val set : context -> value -> context tzresult Lwt.t - -end - -module type Single_data_storage = sig - - include Minimal_single_data_storage - - (** Retrieves the value from the storage bucket ; returns [None] if - the data is not initialized, or {!Storage_helpers.Storage_error} - if the deserialisation fails *) - val get_option : context -> value option tzresult Lwt.t - - - (** Allocates the storage bucket and initializes it ; returns a - {!Storage_error} if the bucket exists *) - val init : context -> value -> context tzresult Lwt.t - - (** Delete the storage bucket ; returns a {!Storage_error} if the - bucket does not exists *) - val delete : context -> context tzresult Lwt.t - - (** Allocates the data and initializes it with a value ; just - updates it if the bucket exists *) - val init_set : context -> value -> context tzresult Lwt.t - - (** Removes the storage bucket and its contents ; does nothing if the - bucket does not exists *) - val remove : context -> context Lwt.t - -end - -module type Minimal_indexed_data_storage = sig - - (** An abstract type for keys *) - type key - - (** The type of values *) - type value - - (** Retrieve a value from the storage bucket at a given key ; - returns a {!Storage_error} if the key is not set or if the - deserialisation fails *) - val get : context -> key -> value tzresult Lwt.t - - (** Tells if a given key is already bound to a storage bucket *) - val mem : context -> key -> bool Lwt.t - - (** Updates the content of a bucket ; returns A {!Storage_Error} if - the value does not exists *) - val set : context -> key -> value -> context tzresult Lwt.t - -end - -(** The generic signature of indexed data accessors (a set of values - of the same type indexed by keys of the same form in the - hierarchical (key x value) database). *) -module type Indexed_data_storage = sig - - include Minimal_indexed_data_storage - - (** Retrieve a value from the storage bucket at a given key ; - returns [None] if the value is not set an error if the - deserialisation fails *) - val get_option : context -> key -> value option tzresult Lwt.t - - (** Allocates a storage bucket at the given key and initializes it ; - returns a {!Storage_error} if the bucket exists *) - val init : context -> key -> value -> context tzresult Lwt.t - - (** Delete a storage bucket and its contents ; returns a - {!Storage_error} if the bucket does not exists *) - val delete : context -> key -> context tzresult Lwt.t - - (** Allocates a storage bucket at the given key and initializes it - with a value ; just updates it if the bucket exists *) - val init_set : context -> key -> value -> context tzresult Lwt.t - - (** Removes a storage bucket and its contents ; does nothing if the - bucket does not exists *) - val remove : context -> key -> context Lwt.t - -end - -(** An extension of [Indexed_data_storage] that allows iterations - over the element of the database *) -module type Iterable_data_storage = sig - - include Indexed_data_storage - - (** Iter over all elements in the storage *) - val iter : context -> f:(key -> value -> unit Lwt.t) -> unit Lwt.t - val fold : context -> 'a -> f:(key -> value -> 'a -> 'a Lwt.t) -> 'a Lwt.t - - (** Removes all elements in the storage *) - val clear : context -> context Lwt.t - -end - -(** The generic signature of a data set accessor (a set of values - bound to a specific key prefix in the hierarchical (key x value) - database). Values are equal if their serializations are. *) -module type Data_set_storage = sig - - (** The type of values *) - type value - - (** Tells if a value is a member of the set *) - val mem : context -> value -> bool tzresult Lwt.t - - (** Adds a value is a member of the set *) - val add : context -> value -> context tzresult Lwt.t - - (** Removes a value of the set ; does nothing if not a member *) - val del : context -> value -> context tzresult Lwt.t - - (** Returns the elements of the set, deserialized in a list in no - particular order ; returns a {!Storage_error} if a - deserialization error occurs *) - val elements : context -> value list tzresult Lwt.t - - (** Removes all elements in the set *) - val clear : context -> context tzresult Lwt.t -end - -(** {1 Data Accessor Parameters} *********************************************) - -(** Description of a single data typed accessor. *) -module type Single_data_description = sig - (** The OCaml type of value contents *) - type value - - (** The concrete key in the hierarchical database *) - val key : string list - - (** A name (only used for error messages) *) - val name : string - - (** The serialization format *) - val encoding : value Data_encoding.t -end - -(** Describes how to map abstract OCaml types for some (key x value) - pair to the concrete path in the hierarchical database structure - and the serialization format. *) -module type Indexed_data_description = sig - - (** The OCaml type for keys *) - type key - - (** The OCaml type of value contents *) - type value - - (** A name (only used for error messages) *) - val name : string - - (** How to produce a concrete key from an abstract one *) - val key : key -> string list - - (** The serialization format *) - val encoding : value Data_encoding.t -end - -(** {1 Data Accessor Builders} ***********************************************) - -(** Single data typed accessor builder *) -module Make_single_data_storage (P : Single_data_description) : - Single_data_storage with type value = P.value - -module Make_single_option_data_storage (P : Single_data_description) : - Minimal_single_data_storage with type value = P.value option - -(** Indexed data accessor builder *) -module Make_indexed_data_storage (P : Indexed_data_description) : - Indexed_data_storage with type key = P. key and type value = P.value - -module Make_indexed_option_data_storage (P : Indexed_data_description) : - Minimal_indexed_data_storage with type key = P. key - and type value = P.value option - -(** Data set builder (set of homogeneous data under a key prefix) *) -module Make_data_set_storage (P : Single_data_description) : - Data_set_storage with type value = P.value - -module Make_iterable_data_storage (H : HASH) (P: Single_data_description) : - Iterable_data_storage with type key = H.t and type value = P.value - -module Make_hash_resolver - (K: sig val prefix: string list end) - (H: Hash.HASH) : sig - val register : Store.t -> unit -end -