diff --git a/src/bin_node/node_run_command.ml b/src/bin_node/node_run_command.ml index 4dfd005a7..fbc02a131 100644 --- a/src/bin_node/node_run_command.ml +++ b/src/bin_node/node_run_command.ml @@ -92,7 +92,7 @@ let init_logger ?verbosity (log_config : Node_config_file.log) = let init_node ?sandbox (config : Node_config_file.t) = let patch_context json ctxt = - let module Proto = (val Registred_protocol.get_exn genesis.protocol) in + let module Proto = (val Registered_protocol.get_exn genesis.protocol) in protect begin fun () -> Proto.configure_sandbox ctxt json end >|= function diff --git a/src/lib_protocol_compiler/main_embedded_packer.ml b/src/lib_protocol_compiler/main_embedded_packer.ml index 5c798b38f..d836e7243 100644 --- a/src/lib_protocol_compiler/main_embedded_packer.ml +++ b/src/lib_protocol_compiler/main_embedded_packer.ml @@ -31,7 +31,7 @@ end let () = Format.printf {| let () = - let module Ignored = Tezos_protocol_updater.Registred_protocol.Register + let module Ignored = Tezos_protocol_updater.Registered_protocol.Register (Tezos_embedded_protocol_environment_%s.Environment) (Tezos_embedded_raw_protocol_%s.Main) (Source) in diff --git a/src/lib_protocol_updater/registred_protocol.ml b/src/lib_protocol_updater/registered_protocol.ml similarity index 100% rename from src/lib_protocol_updater/registred_protocol.ml rename to src/lib_protocol_updater/registered_protocol.ml diff --git a/src/lib_protocol_updater/registred_protocol.mli b/src/lib_protocol_updater/registered_protocol.mli similarity index 100% rename from src/lib_protocol_updater/registred_protocol.mli rename to src/lib_protocol_updater/registered_protocol.mli diff --git a/src/lib_shell/block_validator.ml b/src/lib_shell/block_validator.ml index 94fda74bd..73e6e8161 100644 --- a/src/lib_shell/block_validator.ml +++ b/src/lib_shell/block_validator.ml @@ -114,7 +114,7 @@ let check_liveness chain_state pred hash operations_hashes operations = let apply_block chain_state - pred (module Proto : Registred_protocol.T) + pred (module Proto : Registered_protocol.T) hash (header: Block_header.t) operations = let pred_header = State.Block.header pred @@ -207,7 +207,7 @@ let check_chain_liveness chain_db hash (header: Block_header.t) = let get_proto pred hash = State.Block.context pred >>= fun pred_context -> Context.get_protocol pred_context >>= fun pred_protocol_hash -> - match Registred_protocol.get pred_protocol_hash with + match Registered_protocol.get pred_protocol_hash with | None -> fail (Unavailable_protocol { block = hash ; protocol = pred_protocol_hash }) diff --git a/src/lib_shell/block_validator.mli b/src/lib_shell/block_validator.mli index 59c2dc8a1..cd346293b 100644 --- a/src/lib_shell/block_validator.mli +++ b/src/lib_shell/block_validator.mli @@ -32,7 +32,7 @@ val fetch_and_compile_protocol: t -> ?peer:P2p_peer.Id.t -> ?timeout:float -> - Protocol_hash.t -> Registred_protocol.t tzresult Lwt.t + Protocol_hash.t -> Registered_protocol.t tzresult Lwt.t val shutdown: t -> unit Lwt.t diff --git a/src/lib_shell/node.ml b/src/lib_shell/node.ml index 3d1a1dbe5..98f62c677 100644 --- a/src/lib_shell/node.ml +++ b/src/lib_shell/node.ml @@ -547,7 +547,7 @@ module RPC = struct | None -> Lwt.fail Not_found | Some { context = ctxt } -> Context.get_protocol ctxt >>= fun protocol_hash -> - let (module Proto) = Registred_protocol.get_exn protocol_hash in + let (module Proto) = Registered_protocol.get_exn protocol_hash in Base58.complete str >>= fun l1 -> Proto.complete_b58prefix ctxt str >>= fun l2 -> Lwt.return (l1 @ l2) @@ -557,7 +557,7 @@ module RPC = struct | None -> Lwt.return None | Some rpc_context -> Context.get_protocol rpc_context.context >>= fun protocol_hash -> - let (module Proto) = Registred_protocol.get_exn protocol_hash in + let (module Proto) = Registered_protocol.get_exn protocol_hash in let dir = RPC_directory.map (fun () -> Lwt.return rpc_context) Proto.rpc_services in Lwt.return (Some (RPC_directory.map (fun _ -> ()) dir)) diff --git a/src/lib_shell/prevalidation.ml b/src/lib_shell/prevalidation.ml index adbff649d..fbc56aa33 100644 --- a/src/lib_shell/prevalidation.ml +++ b/src/lib_shell/prevalidation.ml @@ -54,7 +54,7 @@ type prevalidation_state = -> prevalidation_state and 'a proto = - (module Registred_protocol.T with type validation_state = 'a) + (module Registered_protocol.T with type validation_state = 'a) let start_prevalidation ?protocol_data @@ -70,7 +70,7 @@ let start_prevalidation Context.get_protocol predecessor_context >>= fun protocol -> let predecessor = State.Block.hash predecessor in begin - match Registred_protocol.get protocol with + match Registered_protocol.get protocol with | None -> (* FIXME. *) (* This should not happen: it should be handled in the validator. *) diff --git a/src/lib_shell/protocol_validator.ml b/src/lib_shell/protocol_validator.ml index 4253d8ba2..599d2946e 100644 --- a/src/lib_shell/protocol_validator.ml +++ b/src/lib_shell/protocol_validator.ml @@ -15,7 +15,7 @@ type 'a request = | Request_validation: { hash: Protocol_hash.t ; protocol: Protocol.t ; - } -> Registred_protocol.t tzresult request + } -> Registered_protocol.t tzresult request type message = Message: 'a request * 'a Lwt.u option -> message @@ -50,7 +50,7 @@ let rec worker_loop bv = return () | Some wakener -> if valid then - match Registred_protocol.get hash with + match Registered_protocol.get hash with | Some protocol -> Lwt.wakeup_later wakener (Ok protocol) | None -> @@ -97,7 +97,7 @@ let shutdown { canceler ; worker } = worker let validate { messages } hash protocol = - match Registred_protocol.get hash with + match Registered_protocol.get hash with | Some protocol -> lwt_debug "previously validated protocol %a (before pipe)" Protocol_hash.pp_short hash >>= fun () -> @@ -112,7 +112,7 @@ let validate { messages } hash protocol = res let fetch_and_compile_protocol pv ?peer ?timeout hash = - match Registred_protocol.get hash with + match Registered_protocol.get hash with | Some proto -> return proto | None -> begin diff --git a/src/lib_shell/protocol_validator.mli b/src/lib_shell/protocol_validator.mli index 2abcab9da..312d1ebba 100644 --- a/src/lib_shell/protocol_validator.mli +++ b/src/lib_shell/protocol_validator.mli @@ -14,7 +14,7 @@ val create: Distributed_db.t -> t val validate: t -> Protocol_hash.t -> Protocol.t -> - Registred_protocol.t tzresult Lwt.t + Registered_protocol.t tzresult Lwt.t val shutdown: t -> unit Lwt.t @@ -22,7 +22,7 @@ val fetch_and_compile_protocol: t -> ?peer:P2p_peer.Id.t -> ?timeout:float -> - Protocol_hash.t -> Registred_protocol.t tzresult Lwt.t + Protocol_hash.t -> Registered_protocol.t tzresult Lwt.t val fetch_and_compile_protocols: t -> diff --git a/src/lib_shell/test/test_locator.ml b/src/lib_shell/test/test_locator.ml index e200b7e12..e9ae9b089 100644 --- a/src/lib_shell/test/test_locator.ml +++ b/src/lib_shell/test/test_locator.ml @@ -30,7 +30,7 @@ let state_genesis_block = let chain_id = Chain_id.of_block_hash genesis_hash -module Proto = (val Registred_protocol.get_exn genesis_protocol) +module Proto = (val Registered_protocol.get_exn genesis_protocol) let incr_timestamp timestamp = Time.add timestamp (Int64.add 1L (Random.int64 10L)) diff --git a/src/lib_shell/test/test_state.ml b/src/lib_shell/test/test_state.ml index 0d9099109..112fbeddb 100644 --- a/src/lib_shell/test/test_state.ml +++ b/src/lib_shell/test/test_state.ml @@ -22,7 +22,7 @@ let genesis_protocol = let genesis_time = Time.of_seconds 0L -module Proto = (val Registred_protocol.get_exn genesis_protocol) +module Proto = (val Registered_protocol.get_exn genesis_protocol) let genesis : State.Chain.genesis = { time = genesis_time ; diff --git a/src/proto_alpha/lib_protocol/src/delegate_storage.mli b/src/proto_alpha/lib_protocol/src/delegate_storage.mli index 9de3bf677..7ed23c46f 100644 --- a/src/proto_alpha/lib_protocol/src/delegate_storage.mli +++ b/src/proto_alpha/lib_protocol/src/delegate_storage.mli @@ -30,8 +30,8 @@ val registered: Raw_context.t -> Ed25519.Public_key_hash.t -> bool Lwt.t (** Updating the delegate of a contract. When calling this function on an "implicit contract" this function - fails, unless when the registred delegate is the contract manager. - In the that case, the manager is now registred as a delegate. One + fails, unless when the registered delegate is the contract manager. + In the that case, the manager is now registered as a delegate. One cannot unregister a delegate for now. The associate contract is now 'undeletable'. *) val set: @@ -41,13 +41,13 @@ val set: type error += | Non_delegatable_contract of Contract_repr.contract (* `Permanent *) -(** Iterate on all registred delegates. *) +(** Iterate on all registered delegates. *) val fold: Raw_context.t -> init:'a -> f:(Ed25519.Public_key_hash.t -> 'a -> 'a Lwt.t) -> 'a Lwt.t -(** List all registred delegates. *) +(** List all registered delegates. *) val list: Raw_context.t -> Ed25519.Public_key_hash.t list Lwt.t (** Various functions to 'freeze' tokens. A frozen 'deposit' keeps its diff --git a/src/proto_alpha/lib_protocol/src/storage.mli b/src/proto_alpha/lib_protocol/src/storage.mli index 24fc38cca..eaf1b4258 100644 --- a/src/proto_alpha/lib_protocol/src/storage.mli +++ b/src/proto_alpha/lib_protocol/src/storage.mli @@ -185,7 +185,7 @@ module Contract : sig end -(** Set of all registred delegates. *) +(** Set of all registered delegates. *) module Delegates : Data_set_storage with type t := Raw_context.t and type elt = Ed25519.Public_key_hash.t diff --git a/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.ml b/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.ml index c80e341bf..92ac286ad 100644 --- a/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.ml +++ b/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.ml @@ -67,11 +67,11 @@ type ('q, 'i, 'o, 'e) types = ('q, 'i, 'o, 'e) Directory.types = { error : 'e Json_encoding.encoding ; } -type registred_service = Directory.registred_service = +type registered_service = Directory.registered_service = | Service : { types : ('q, 'i, 'o, 'e) types ; handler : ('q -> 'i -> ('o, 'e) Answer.t Lwt.t) ; - } -> registred_service + } -> registered_service type lookup_error = Directory.lookup_error diff --git a/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.mli b/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.mli index fae396ea9..277fe3268 100644 --- a/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.mli +++ b/vendors/ocplib-resto/lib_ezresto-directory/ezResto_directory.mli @@ -65,11 +65,11 @@ type ('q, 'i, 'o, 'e) types = { error : 'e Json_encoding.encoding ; } -type registred_service = +type registered_service = | Service : { types : ('q, 'i, 'o, 'e) types ; handler : ('q -> 'i -> ('o, 'e) Answer.t Lwt.t) ; - } -> registred_service + } -> registered_service type lookup_error = [ `Not_found (* 404 *) @@ -78,7 +78,7 @@ type lookup_error = ] (** Resolve a service. *) -val lookup: directory -> meth -> string list -> (registred_service, [> lookup_error ]) result Lwt.t +val lookup: directory -> meth -> string list -> (registered_service, [> lookup_error ]) result Lwt.t val allowed_methods: directory -> string list -> diff --git a/vendors/ocplib-resto/lib_resto-directory/resto_directory.ml b/vendors/ocplib-resto/lib_resto-directory/resto_directory.ml index 6c98c4bdf..0ceda685c 100644 --- a/vendors/ocplib-resto/lib_resto-directory/resto_directory.ml +++ b/vendors/ocplib-resto/lib_resto-directory/resto_directory.ml @@ -114,7 +114,7 @@ module Make (Encoding : ENCODING) = struct and 'key directory = 'key t and 'key static_directory = { - services : 'key registred_service_builder MethMap.t ; + services : 'key registered_service_builder MethMap.t ; subdirs : 'key static_subdirectories option } @@ -122,16 +122,16 @@ module Make (Encoding : ENCODING) = struct | Suffixes: 'key directory StringMap.t -> 'key static_subdirectories | Arg: 'a Resto.Internal.arg * ('key * 'a) directory -> 'key static_subdirectories - and registred_service = + and registered_service = | Service : { types : ('q, 'i, 'o, 'e) types ; handler : ('q -> 'i -> ('o, 'e) Answer.t Lwt.t) ; - } -> registred_service + } -> registered_service - and 'key registred_service_builder = { + and 'key registered_service_builder = { meth : Resto.meth ; description : Encoding.schema Description.service ; - builder : 'key -> registred_service ; + builder : 'key -> registered_service ; } let empty = Empty @@ -154,7 +154,7 @@ module Make (Encoding : ENCODING) = struct : type a b. (a -> b) -> b static_directory -> a static_directory = fun f t -> - { services = MethMap.map (map_registred_service f) t.services ; + { services = MethMap.map (map_registered_service f) t.services ; subdirs = map_option (map_static_subdirectories f) t.subdirs ; } @@ -169,9 +169,9 @@ module Make (Encoding : ENCODING) = struct let dir = map_directory (fun (a, x) -> f a, x) dir in Arg (arg, dir) - and map_registred_service + and map_registered_service : type a b. - (a -> b) -> b registred_service_builder -> a registred_service_builder + (a -> b) -> b registered_service_builder -> a registered_service_builder = fun f rs -> { rs with builder = (fun p -> rs.builder (f p)) } @@ -314,7 +314,7 @@ module Make (Encoding : ENCODING) = struct and describe_service : type a. - a registred_service_builder -> Encoding.schema Description.service + a registered_service_builder -> Encoding.schema Description.service = fun { description ; _ } -> description and describe_query @@ -382,7 +382,7 @@ module Make (Encoding : ENCODING) = struct let lookup : type a. a directory -> a -> meth -> string list -> - (registred_service, lookup_error) result Lwt.t + (registered_service, lookup_error) result Lwt.t = fun dir args meth path -> resolve [] dir args path >>= function | Error _ as err -> Lwt.return err diff --git a/vendors/ocplib-resto/lib_resto-directory/resto_directory.mli b/vendors/ocplib-resto/lib_resto-directory/resto_directory.mli index 015045dd6..168c779ce 100644 --- a/vendors/ocplib-resto/lib_resto-directory/resto_directory.mli +++ b/vendors/ocplib-resto/lib_resto-directory/resto_directory.mli @@ -58,11 +58,11 @@ module Make (Encoding : ENCODING) : sig error : 'error Encoding.t ; } - type registred_service = + type registered_service = | Service : { types : ('q, 'i, 'o, 'e) types ; handler : ('q -> 'i -> ('o, 'e) Answer.t Lwt.t) ; - } -> registred_service + } -> registered_service (** Dispatch tree *) type 'prefix t @@ -77,7 +77,7 @@ module Make (Encoding : ENCODING) : sig (** Resolve a service. *) val lookup: 'prefix directory -> 'prefix -> - meth -> string list -> (registred_service, [> lookup_error ]) result Lwt.t + meth -> string list -> (registered_service, [> lookup_error ]) result Lwt.t val allowed_methods: 'prefix directory -> 'prefix -> string list ->