From 6645b59c5eeb57e7df11c20e1f91782c48afc851 Mon Sep 17 00:00:00 2001 From: Victor Allombert Date: Fri, 2 Jun 2023 09:25:45 +0200 Subject: [PATCH 1/8] All: remove the Server mode from proxy --- .../proxy_delegate.mli | 8 +- src/lib_proxy/light_consensus.ml | 3 +- src/lib_proxy/light_core.ml | 2 +- src/lib_proxy/proxy.ml | 6 -- src/lib_proxy/proxy_getter.ml | 4 +- src/lib_proxy/proxy_getter.mli | 1 - src/lib_proxy/proxy_proto.ml | 7 +- src/lib_proxy/proxy_services.ml | 73 ++++--------------- src/lib_proxy/proxy_services.mli | 31 ++------ src/lib_proxy/registration.mli | 2 +- src/lib_proxy/rpc/RPC_client.mli | 4 +- src/lib_proxy/test/test_proxy.ml | 9 +-- src/proto_011_PtHangz2/lib_client/proxy.ml | 25 +------ src/proto_012_Psithaca/lib_client/proxy.ml | 25 +------ src/proto_013_PtJakart/lib_client/proxy.ml | 25 +------ src/proto_014_PtKathma/lib_client/proxy.ml | 25 +------ src/proto_015_PtLimaPt/lib_client/proxy.ml | 25 +------ src/proto_016_PtMumbai/lib_client/proxy.ml | 25 +------ src/proto_017_PtNairob/lib_client/proxy.ml | 25 +------ src/proto_018_Proxford/lib_client/proxy.ml | 25 +------ src/proto_019_PtParisB/lib_client/proxy.ml | 25 +------ src/proto_020_PsParisC/lib_client/proxy.ml | 25 +------ .../lib_client/test/test_proxy.ml | 12 +-- src/proto_021_PsquebeC/lib_client/proxy.ml | 25 +------ .../lib_client/test/test_proxy.ml | 12 +-- src/proto_alpha/lib_client/proxy.ml | 25 +------ src/proto_alpha/lib_client/test/test_proxy.ml | 12 +-- src/proto_genesis/lib_client/proxy.ml | 2 +- 28 files changed, 73 insertions(+), 415 deletions(-) diff --git a/src/lib_protocol_environment/proxy_delegate.mli b/src/lib_protocol_environment/proxy_delegate.mli index 19aceb78ac4c..f6440c77cae1 100644 --- a/src/lib_protocol_environment/proxy_delegate.mli +++ b/src/lib_protocol_environment/proxy_delegate.mli @@ -23,10 +23,10 @@ (* *) (*****************************************************************************) -(** The module that needs to be implemented for providing the delegation - feature to {!Proxy_context}. Implementors willing to add a new backend - to the client's [--mode proxy] and [tezos-proxy-server] should likely - add a new implementation of this module type. *) +(** The module that needs to be implemented for providing the + delegation feature to {!Proxy_context}. Implementors willing to + add a new backend to the client's [--mode proxy] should likely add + a new implementation of this module type. *) module type T = sig (** [proxy_dir_mem key] returns whether {!proxy_get} would return a non-leaf tree. *) val proxy_dir_mem : string list -> bool tzresult Lwt.t diff --git a/src/lib_proxy/light_consensus.ml b/src/lib_proxy/light_consensus.ml index 65473f23f2ef..315cc104ed67 100644 --- a/src/lib_proxy/light_consensus.ml +++ b/src/lib_proxy/light_consensus.ml @@ -124,8 +124,7 @@ module Make (Light_proto : Light_proto.PROTO_RPCS) = struct let check_merkle_tree_with_endpoint (uri, rpc_context) = let* other_mproof = Light_proto.merkle_tree - ({rpc_context; chain; block; mode = Client} - : Proxy.proxy_getter_input) + ({rpc_context; chain; block} : Proxy.proxy_getter_input) key Proof.Hole in diff --git a/src/lib_proxy/light_core.ml b/src/lib_proxy/light_core.ml index 36aa3370b8df..f81ce20f248d 100644 --- a/src/lib_proxy/light_core.ml +++ b/src/lib_proxy/light_core.ml @@ -118,7 +118,7 @@ let get_core (module Light_proto : Light_proto.PROTO_RPCS) | ((uri, rpc_context) as hd_endpoint) :: tl_remaining_endpoints -> ( let* proof_opt = Light_proto.merkle_tree - Proxy.{rpc_context; chain; block; mode = Client} + Proxy.{rpc_context; chain; block} key leaf_kind in diff --git a/src/lib_proxy/proxy.ml b/src/lib_proxy/proxy.ml index ffc9c47a4be3..c37981ebfa92 100644 --- a/src/lib_proxy/proxy.ml +++ b/src/lib_proxy/proxy.ml @@ -32,18 +32,12 @@ module Local = Tezos_context_memory.Context -(** Whether [octez-client] or [tezos-proxy-server] is running. *) -type mode = - | Client (** Mode when [octez-client] executes *) - | Server (** Mode when [tezos-proxy-server] executes *) - (** A dumb container, used to perform RPC calls concerning a specific chain and block. In other words this container is used to perform RPC calls of the form [/chains//blocks/] where the <...> received the value of the corresponding field of this record. *) type proxy_getter_input = { rpc_context : Tezos_rpc.Context.simple; (** How to perform RPC calls *) - mode : mode; (** Whether [octez-client] or [tezos-proxy-server] is running *) chain : Tezos_shell_services.Block_services.chain; (** The chain involved in the RPC call *) block : Tezos_shell_services.Block_services.block; diff --git a/src/lib_proxy/proxy_getter.ml b/src/lib_proxy/proxy_getter.ml index 4e3806929ad9..1f970216df21 100644 --- a/src/lib_proxy/proxy_getter.ml +++ b/src/lib_proxy/proxy_getter.ml @@ -131,7 +131,6 @@ type rpc_context_args = { printer : Tezos_client_base.Client_context.printer option; proxy_builder : proxy_builder; rpc_context : Tezos_rpc.Context.generic; - mode : Proxy.mode; chain : Tezos_shell_services.Block_services.chain; block : Tezos_shell_services.Block_services.block; } @@ -148,7 +147,6 @@ let make_delegate (ctx : rpc_context_args) let pgi : Proxy.proxy_getter_input = { rpc_context = (ctx.rpc_context :> Tezos_rpc.Context.simple); - mode = ctx.mode; chain = ctx.chain; block = ctx.block; } @@ -270,7 +268,7 @@ module Make (C : Proxy.CORE) (X : Proxy_proto.PROTO_RPC) : M = struct (* If the value is not going to be used, don't request a parent *) (requested_key, false) | Get -> ( - match X.split_key pgi.mode requested_key with + match X.split_key requested_key with | None -> (* There's no splitting for this key *) (requested_key, false) diff --git a/src/lib_proxy/proxy_getter.mli b/src/lib_proxy/proxy_getter.mli index dc12bab56cc6..8ca4384c319a 100644 --- a/src/lib_proxy/proxy_getter.mli +++ b/src/lib_proxy/proxy_getter.mli @@ -114,7 +114,6 @@ type rpc_context_args = { (** How to perform RPC calls. We need such a value, because the proxy mode performs RPCs to initialize itself (by requesting the header) and also to fill {!Tezos_protocol_environment.Proxy_context} on-demand. *) - mode : Proxy.mode; (** Whether the client or the proxy server is running. *) chain : Tezos_shell_services.Block_services.chain; (** The chain to provide RPC calls for. *) block : Tezos_shell_services.Block_services.block; diff --git a/src/lib_proxy/proxy_proto.ml b/src/lib_proxy/proxy_proto.ml index 58bd10f1c7ae..bd8870362c6f 100644 --- a/src/lib_proxy/proxy_proto.ml +++ b/src/lib_proxy/proxy_proto.ml @@ -46,21 +46,18 @@ module type PROTO_RPC = sig To speed things up, this function returns "v1" on any of these keys, to do a single request instead of two. This list is arbitrary. It was - built by initial input from \@klakplok and by experimenting. When - the proxy server was introduced, this function was generalized - to split differently according to the mode. + built by initial input from \@klakplok and by experimenting. This function guarantees that if it returns Some(prefix, suffix) then [prefix @@ suffix = key]. *) val split_key : - Proxy.mode -> Tezos_protocol_environment.Proxy_context.M.key -> (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option - (** [failure_is_permanent key] means that, if the request + (** [failure_is_permanent key] means that, if the request [rpc get /chains//blocks//context/raw/bytes/key] fails once, then it should not be retried; because this key is known to be missing all the time. It is safe to return always [false]. diff --git a/src/lib_proxy/proxy_services.ml b/src/lib_proxy/proxy_services.ml index 3ac4fba51aef..8045d4097a13 100644 --- a/src/lib_proxy/proxy_services.ml +++ b/src/lib_proxy/proxy_services.ml @@ -52,21 +52,7 @@ let hash_of_block ?cache (rpc_context : #Tezos_rpc.Context.simple) cache ; return hash -type mode = - | Light_client of Light.sources - | Proxy_client - | Proxy_server of { - sleep : float -> unit Lwt.t; - sym_block_caching_time : Ptime.span option; - on_disk_proxy_builder : - (Context_hash.t -> - Tezos_protocol_environment.Proxy_delegate.t tzresult Lwt.t) - option; - } - -let to_client_server_mode = function - | Light_client _ | Proxy_client -> Proxy.Client - | Proxy_server _ -> Proxy.Server +type mode = Light_client of Light.sources | Proxy_client let get_protocols ?expected_protocol rpc_context chain block = let open Lwt_result_syntax in @@ -119,11 +105,8 @@ let build_directory (printer : Tezos_client_base.Client_context.printer) let block_hash_cache = (* We consider that the duration of a run of a client command is below the time between blocks so that aliases (`head`, levels, - ...) don't change. Obviously, this assumption is incorrect in - a long living proxy server. *) - match mode with - | Proxy_server _ -> None - | Light_client _ | Proxy_client -> Some (Stdlib.Hashtbl.create 17) + ...) don't change. *) + Some (Stdlib.Hashtbl.create 17) in let make proxy_env chain block = match mode with @@ -142,26 +125,13 @@ let build_directory (printer : Tezos_client_base.Client_context.printer) in let module M = Proxy_getter.Make (C) (P_RPC) in Lwt.return (module M : Proxy_getter.M)) - | Proxy_client | Proxy_server {on_disk_proxy_builder = None; _} -> + | Proxy_client -> Proxy_getter.Of_rpc (fun (module P_RPC : Proxy_proto.PROTO_RPC) -> let module M = Proxy_getter.MakeProxy (P_RPC) in Lwt.return (module M : Proxy_getter.M)) - | Proxy_server {on_disk_proxy_builder = Some f; _} -> - Proxy_getter.Of_data_dir f - in - (* proxy_server case: given that a new block arrives every minute, - make the cache keep blocks from approximately the last hour. - Starting at protocol G, blocks may arrive faster than one per minute. - We can either forward the protocol's constants here, or do an - RPC call to obtain the exact value. - Anyway we're safe, having an appromixation here is fine. *) - let envs_cache = - Env_cache_lwt.create - (match mode with - | Proxy_server _ -> 64 - | Proxy_client | Light_client _ -> 16) in + let envs_cache = Env_cache_lwt.create 16 in let get_env_rpc_context chain block = let open Lwt_result_syntax in let* block_hash = @@ -196,7 +166,6 @@ let build_directory (printer : Tezos_client_base.Client_context.printer) printer = Some printer; proxy_builder = make (module Proxy_environment) chain block_key; rpc_context; - mode = to_client_server_mode mode; chain; block = block_key; } @@ -224,36 +193,22 @@ let build_directory (printer : Tezos_client_base.Client_context.printer) let open Lwt_syntax in let* res = get_env_rpc_context chain block in match res with - | Error trace -> ( + | Error trace -> (* proto_directory expects a unit Directory.t Lwt.t, and we can't give it a unit tzresult Directory.t Lwt.t, hence we throw an exception instead if we can't make the directory. - This happens notably in the proxy server case when a - request is made for a block baked on a protocol differing - from the protocol the proxy server is currently running on. - - In the proxy server case, we'd prefer to return a 404 - instead of a 500. Luckily, Resto handles the [Not_found] - exception specially and returns a 404, which our - query-forwarding middleware (see - Tezos_rpc_http.RPC_middleware) can then turn into a redirect - to the node. - In the client cases, we throw an exception (which Resto turns into a 500) and print the trace. *) - match mode with - | Proxy_server _ -> raise Not_found - | Light_client _ | Proxy_client -> - let* () = - printer#warning - "Error while building RPC directory (perhaps a protocol \ - version mismatch between block and client?): %a" - Error_monad.pp_print_trace - trace - in - raise (Rpc_dir_creation_failure trace)) + let* () = + printer#warning + "Error while building RPC directory (perhaps a protocol version \ + mismatch between block and client?): %a" + Error_monad.pp_print_trace + trace + in + raise (Rpc_dir_creation_failure trace) | Ok res -> Lwt.return res in let proto_directory = diff --git a/src/lib_proxy/proxy_services.mli b/src/lib_proxy/proxy_services.mli index 8f5307c1cdc0..706465dd4615 100644 --- a/src/lib_proxy/proxy_services.mli +++ b/src/lib_proxy/proxy_services.mli @@ -34,36 +34,21 @@ exception Rpc_dir_creation_failure of tztrace (** Whether using the light mode or the proxy mode (remember that the light mode is a different instance of the proxy mode (see srcs/lib_proxy/README_LIGHT.md for documentation) - and whether [octez-client] or [tezos-proxy-server] is running. *) + and whether [octez-client] is running. *) type mode = | Light_client of Light.sources (** [octez-client --mode light] is running *) | Proxy_client (** [octez-client --mode proxy] is running *) - | Proxy_server of { - sleep : float -> unit Lwt.t; - sym_block_caching_time : Ptime.span option; - on_disk_proxy_builder : - (Context_hash.t -> - Tezos_protocol_environment.Proxy_delegate.t tzresult Lwt.t) - option; - } - (** [tezos-proxy-server] is running. The [sleep] field is implemented - by {!Lwt_unix.sleep}. We don't want to depend on it directly - (for compiling to Javascript), hence this field. The [Ptime.span option] field - is the value of argument [--sym-block-caching-time]. The - [(Context_hash.t -> Proxy_delegate.t tzresult Lwt.t) option] - value is constructed from argument [--data-dir]: if the argument - is present, this value represents how data is looked up in the - data-dir of a running node. *) -(** [build_directory printer rpc_context env mode] returns the directory - of RPCs that is served locally by the client's light and proxy modes and - by the proxy server. Parameters are: +(** [build_directory printer rpc_context env mode] returns the + directory of RPCs that is served locally by the client's light and + proxy modes. Parameters are: - [printer] is used for logging. - [rpc_context] is used to perform RPCs to distant endpoints. - - [mode] specifies whether [octez-client] (light or proxy mode) - or [tezos-proxy-server] is running. - - [env] is a protocol-specific module used to create the context passed when executing a RPC. *) + - [mode] specifies whether [octez-client] (light or proxy mode) is + running. + - [env] is a protocol-specific module used to create the context + passed when executing a RPC. *) val build_directory : Tezos_client_base.Client_context.printer -> Tezos_rpc.Context.generic -> diff --git a/src/lib_proxy/registration.mli b/src/lib_proxy/registration.mli index 96493398b918..93efd62f42da 100644 --- a/src/lib_proxy/registration.mli +++ b/src/lib_proxy/registration.mli @@ -38,7 +38,7 @@ module type Proxy_sig = sig - A printer (for logging) - An instance of [Tezos_rpc.Context.generic], to perform RPCs - - Whether [octez-client] or [tezos-proxy-server] is running + - Whether [octez-client] is running - The chain for which the context is required - The block for which the context is required *) diff --git a/src/lib_proxy/rpc/RPC_client.mli b/src/lib_proxy/rpc/RPC_client.mli index b40c1adfd2f3..65395f920433 100644 --- a/src/lib_proxy/rpc/RPC_client.mli +++ b/src/lib_proxy/rpc/RPC_client.mli @@ -25,8 +25,8 @@ (** The class [http_local_ctxt] creates an RPC context that executes some RPCs locally and delegates others over http. Arguments are: - - an instance of [RPC_context.generic] to perform RPC calls (for delegation - over http), and whether [tezos-proxy-server] or [octez-client] is running + - an instance of [RPC_context.generic] to perform RPC calls (for + delegation over http), and whether [octez-client] is running - the protocol-dependent implementation of the proxy (the proxy mode obtains data from endpoints with protocol-dependent RPCs). *) class http_local_ctxt : diff --git a/src/lib_proxy/test/test_proxy.ml b/src/lib_proxy/test/test_proxy.ml index 99e76dc5a0c6..5f0e98a82b8b 100644 --- a/src/lib_proxy/test/test_proxy.ml +++ b/src/lib_proxy/test/test_proxy.ml @@ -60,7 +60,7 @@ let mock_proto_rpc () = (module struct let calls : Local.key Stack.t = Stack.create () - let split_key _ (k : Local.key) = + let split_key (k : Local.key) = match k with (* These constants are used in tests below *) | "split" :: "key" :: "trigger_now!" :: tail -> @@ -97,12 +97,7 @@ let mock_chain = `Main let mock_block = `Head 0 let mock_input : Tezos_proxy.Proxy.proxy_getter_input = - { - rpc_context = new mock_rpc_context; - mode = Client; - chain = mock_chain; - block = mock_block; - } + {rpc_context = new mock_rpc_context; chain = mock_chain; block = mock_block} open Assert open Lwt_assert diff --git a/src/proto_011_PtHangz2/lib_client/proxy.ml b/src/proto_011_PtHangz2/lib_client/proxy.ml index 3e1068d9ae59..cf12db01a978 100644 --- a/src/proto_011_PtHangz2/lib_client/proxy.ml +++ b/src/proto_011_PtHangz2/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_012_Psithaca/lib_client/proxy.ml b/src/proto_012_Psithaca/lib_client/proxy.ml index db20cd916ebf..10e207036989 100644 --- a/src/proto_012_Psithaca/lib_client/proxy.ml +++ b/src/proto_012_Psithaca/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_013_PtJakart/lib_client/proxy.ml b/src/proto_013_PtJakart/lib_client/proxy.ml index 1bc8a5bb8f40..642edde860da 100644 --- a/src/proto_013_PtJakart/lib_client/proxy.ml +++ b/src/proto_013_PtJakart/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_014_PtKathma/lib_client/proxy.ml b/src/proto_014_PtKathma/lib_client/proxy.ml index 0954933c0a34..19bd6a109969 100644 --- a/src/proto_014_PtKathma/lib_client/proxy.ml +++ b/src/proto_014_PtKathma/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_015_PtLimaPt/lib_client/proxy.ml b/src/proto_015_PtLimaPt/lib_client/proxy.ml index d1ee80868ae5..0b9e9f9990a9 100644 --- a/src/proto_015_PtLimaPt/lib_client/proxy.ml +++ b/src/proto_015_PtLimaPt/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_016_PtMumbai/lib_client/proxy.ml b/src/proto_016_PtMumbai/lib_client/proxy.ml index 2f1445844d70..25fc0ab057af 100644 --- a/src/proto_016_PtMumbai/lib_client/proxy.ml +++ b/src/proto_016_PtMumbai/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_017_PtNairob/lib_client/proxy.ml b/src/proto_017_PtNairob/lib_client/proxy.ml index 270b89ffbe45..e1ff8ee49192 100644 --- a/src/proto_017_PtNairob/lib_client/proxy.ml +++ b/src/proto_017_PtNairob/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_018_Proxford/lib_client/proxy.ml b/src/proto_018_Proxford/lib_client/proxy.ml index 7c891c15d303..bbefb50364bf 100644 --- a/src/proto_018_Proxford/lib_client/proxy.ml +++ b/src/proto_018_Proxford/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_019_PtParisB/lib_client/proxy.ml b/src/proto_019_PtParisB/lib_client/proxy.ml index 7df741021ab0..1eabc1638fa1 100644 --- a/src/proto_019_PtParisB/lib_client/proxy.ml +++ b/src/proto_019_PtParisB/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_020_PsParisC/lib_client/proxy.ml b/src/proto_020_PsParisC/lib_client/proxy.ml index 3e22df43b88f..2b4d8c6e11e2 100644 --- a/src/proto_020_PsParisC/lib_client/proxy.ml +++ b/src/proto_020_PsParisC/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_020_PsParisC/lib_client/test/test_proxy.ml b/src/proto_020_PsParisC/lib_client/test/test_proxy.ml index 684ac3ef7ca9..b4d115b625ca 100644 --- a/src/proto_020_PsParisC/lib_client/test/test_proxy.ml +++ b/src/proto_020_PsParisC/lib_client/test/test_proxy.ml @@ -28,11 +28,9 @@ Component: Client Invocation: dune exec src/proto_020_PsParisC/lib_client/test/main.exe \ -- --file test_proxy.ml - Subject: Test of --mode proxy and tezos-proxy-server heuristic + Subject: Test of --mode proxy heuristic *) -let proxy_mode_gen = QCheck2.Gen.oneofl Tezos_proxy.Proxy.[Client; Server] - let key_gen = (* Segments taken from the implementation of split_key in src/proto_alpha/lib_client/proxy.ml *) let keys = @@ -66,11 +64,9 @@ let test_split_key = let pp_sep fmt () = Format.fprintf fmt "/" in Format.pp_print_list ~pp_sep Format.pp_print_string in - QCheck2.Test.make - ~name:"[fst (split_key s)] is a prefix of [s]" - QCheck2.Gen.(pair proxy_mode_gen key_gen) - @@ fun (mode, key) -> - match Proxy.ProtoRpc.split_key mode key with + QCheck2.Test.make ~name:"[fst (split_key s)] is a prefix of [s]" key_gen + @@ fun key -> + match Proxy.ProtoRpc.split_key key with | None -> true | Some (shorter, _) -> if is_prefix shorter key then true diff --git a/src/proto_021_PsquebeC/lib_client/proxy.ml b/src/proto_021_PsquebeC/lib_client/proxy.ml index 92ebf43ebd5b..41be180a6a34 100644 --- a/src/proto_021_PsquebeC/lib_client/proxy.ml +++ b/src/proto_021_PsquebeC/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_021_PsquebeC/lib_client/test/test_proxy.ml b/src/proto_021_PsquebeC/lib_client/test/test_proxy.ml index 6750718538de..c7d01b9370a4 100644 --- a/src/proto_021_PsquebeC/lib_client/test/test_proxy.ml +++ b/src/proto_021_PsquebeC/lib_client/test/test_proxy.ml @@ -28,11 +28,9 @@ Component: Client Invocation: dune exec src/proto_021_PsquebeC/lib_client/test/main.exe \ -- --file test_proxy.ml - Subject: Test of --mode proxy and tezos-proxy-server heuristic + Subject: Test of --mode proxy heuristic *) -let proxy_mode_gen = QCheck2.Gen.oneofl Tezos_proxy.Proxy.[Client; Server] - let key_gen = (* Segments taken from the implementation of split_key in src/proto_alpha/lib_client/proxy.ml *) let keys = @@ -66,11 +64,9 @@ let test_split_key = let pp_sep fmt () = Format.fprintf fmt "/" in Format.pp_print_list ~pp_sep Format.pp_print_string in - QCheck2.Test.make - ~name:"[fst (split_key s)] is a prefix of [s]" - QCheck2.Gen.(pair proxy_mode_gen key_gen) - @@ fun (mode, key) -> - match Proxy.ProtoRpc.split_key mode key with + QCheck2.Test.make ~name:"[fst (split_key s)] is a prefix of [s]" key_gen + @@ fun key -> + match Proxy.ProtoRpc.split_key key with | None -> true | Some (shorter, _) -> if is_prefix shorter key then true diff --git a/src/proto_alpha/lib_client/proxy.ml b/src/proto_alpha/lib_client/proxy.ml index 2d26fc5b05ed..f9332942f2f9 100644 --- a/src/proto_alpha/lib_client/proxy.ml +++ b/src/proto_alpha/lib_client/proxy.ml @@ -24,18 +24,6 @@ (*****************************************************************************) module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - (** Split done only when the mode is [Tezos_proxy.Proxy.server]. Getting - an entire big map at once is useful for dapp developers that - iterate a lot on big maps and that use proxy servers in their - internal infra. *) - let split_server key = - match key with - (* matches paths like: - big_maps/index/i/contents/tail *) - | "big_maps" :: "index" :: i :: "contents" :: tail -> - Some (["big_maps"; "index"; i; "contents"], tail) - | _ -> None - (** Split that is always done, no matter the mode *) let split_always key = match key with @@ -51,20 +39,11 @@ module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct | "v1" :: tail -> Some (["v1"], tail) | _ -> None - let split_key (mode : Tezos_proxy.Proxy.mode) - (key : Tezos_protocol_environment.Proxy_context.M.key) : + let split_key (key : Tezos_protocol_environment.Proxy_context.M.key) : (Tezos_protocol_environment.Proxy_context.M.key * Tezos_protocol_environment.Proxy_context.M.key) option = - match split_always key with - | Some _ as res -> - res (* No need to inspect the mode, this split is always done *) - | None -> ( - match mode with - | Client -> - (* There are strictly less splits in Client mode: return immediately *) - None - | Server -> split_server key) + split_always key let failure_is_permanent = function | ["pending_migration_balance_updates"] diff --git a/src/proto_alpha/lib_client/test/test_proxy.ml b/src/proto_alpha/lib_client/test/test_proxy.ml index a7502865accc..0393904a8d70 100644 --- a/src/proto_alpha/lib_client/test/test_proxy.ml +++ b/src/proto_alpha/lib_client/test/test_proxy.ml @@ -28,11 +28,9 @@ Component: Client Invocation: dune exec src/proto_alpha/lib_client/test/main.exe \ -- --file test_proxy.ml - Subject: Test of --mode proxy and tezos-proxy-server heuristic + Subject: Test of --mode proxy heuristic *) -let proxy_mode_gen = QCheck2.Gen.oneofl Tezos_proxy.Proxy.[Client; Server] - let key_gen = (* Segments taken from the implementation of split_key in src/proto_alpha/lib_client/proxy.ml *) let keys = @@ -66,11 +64,9 @@ let test_split_key = let pp_sep fmt () = Format.fprintf fmt "/" in Format.pp_print_list ~pp_sep Format.pp_print_string in - QCheck2.Test.make - ~name:"[fst (split_key s)] is a prefix of [s]" - QCheck2.Gen.(pair proxy_mode_gen key_gen) - @@ fun (mode, key) -> - match Proxy.ProtoRpc.split_key mode key with + QCheck2.Test.make ~name:"[fst (split_key s)] is a prefix of [s]" key_gen + @@ fun key -> + match Proxy.ProtoRpc.split_key key with | None -> true | Some (shorter, _) -> if is_prefix shorter key then true diff --git a/src/proto_genesis/lib_client/proxy.ml b/src/proto_genesis/lib_client/proxy.ml index 5c470472e459..90ebfb095a34 100644 --- a/src/proto_genesis/lib_client/proxy.ml +++ b/src/proto_genesis/lib_client/proxy.ml @@ -29,7 +29,7 @@ let msg : string = empty." module ProtoRpc : Tezos_proxy.Proxy_proto.PROTO_RPC = struct - let split_key _ _ = None + let split_key _ = None let failure_is_permanent _ = false -- GitLab From 97cd79a88e33f4a1baceb1610edc20b2353b1b0f Mon Sep 17 00:00:00 2001 From: Victor Allombert Date: Fri, 2 Jun 2023 09:32:59 +0200 Subject: [PATCH 2/8] All: remove proxy_server binaries --- .gitlab/ci/pipelines/before_merging.yml | 81 +--- .gitlab/ci/pipelines/merge_train.yml | 81 +--- .../ci/pipelines/schedule_extended_test.yml | 66 +--- Makefile | 1 + dune-project | 2 - manifest/product_octez.ml | 53 --- opam/octez-proxy-server.opam | 81 ---- opam/tezos-proxy-server-config.opam | 24 -- script-inputs/ci-opam-package-tests | 14 +- script-inputs/released-executables | 1 - src/bin_proxy_server/dune | 202 ---------- src/bin_proxy_server/main_proxy_server.ml | 293 --------------- src/bin_proxy_server/proxy_server_main_run.ml | 113 ------ .../proxy_server_main_run.mli | 37 -- .../proxy_server_run_events.ml | 54 --- src/lib_octogram/tezos.ml | 5 - src/lib_proxy_server_config/dune | 14 - .../proxy_server_config.ml | 212 ----------- .../proxy_server_config.mli | 111 ------ src/lib_proxy_server_config/test/dune | 42 --- .../test/test_proxy_server_config.ml | 351 ------------------ tezt/tests/dune | 1 - 22 files changed, 25 insertions(+), 1814 deletions(-) delete mode 100644 opam/octez-proxy-server.opam delete mode 100644 opam/tezos-proxy-server-config.opam delete mode 100644 src/bin_proxy_server/dune delete mode 100644 src/bin_proxy_server/main_proxy_server.ml delete mode 100644 src/bin_proxy_server/proxy_server_main_run.ml delete mode 100644 src/bin_proxy_server/proxy_server_main_run.mli delete mode 100644 src/bin_proxy_server/proxy_server_run_events.ml delete mode 100644 src/lib_proxy_server_config/dune delete mode 100644 src/lib_proxy_server_config/proxy_server_config.ml delete mode 100644 src/lib_proxy_server_config/proxy_server_config.mli delete mode 100644 src/lib_proxy_server_config/test/dune delete mode 100644 src/lib_proxy_server_config/test/test_proxy_server_config.ml diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 5d34c60908df..f7c462b541ff 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -906,7 +906,6 @@ opam:all_6: - tezos-protocol-019-PtParisB - tezos-protocol-018-Proxford - tezos-protocol-017-PtNairob - - tezos-protocol-016-PtMumbai - octez-shell-libs - octez-riscv-pvm - octez-proto-libs @@ -978,6 +977,7 @@ opam:exec_6: parallel: matrix: - package: + - octez-version - octez-protocol-compiler opam:all_2: @@ -1048,13 +1048,13 @@ opam:all_2: parallel: matrix: - package: + - tezos-dac-node-lib - octez-smart-rollup-wasm-debugger-lib - octez-smart-rollup-node-lib - octez-smart-rollup-node-alpha - octez-smart-rollup-node-PtParisB - octez-smart-rollup-node-PtNairob - octez-smart-rollup-node-PsquebeC - - octez-smart-rollup-node-PsParisC - octez-smart-rollup-node-Proxford - octez-protocol-alpha-libs - octez-protocol-021-PsquebeC-libs @@ -1132,6 +1132,7 @@ opam:all_1: parallel: matrix: - package: + - octez-smart-rollup-node-PsParisC - octez-evm-node-libs opam:all_3: @@ -1202,7 +1203,7 @@ opam:all_3: parallel: matrix: - package: - - tezos-dac-node-lib + - octez-protocol-013-PtJakart-libs - octez-protocol-012-Psithaca-libs - octez-protocol-011-PtHangz2-libs - octez-protocol-010-PtGRANAD-libs @@ -1218,74 +1219,6 @@ opam:all_3: - octez-protocol-000-Ps9mPmXa-libs - octez-injector -opam:exec_7: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: packaging - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--opam(?:$|,)/ - when: delayed - start_in: 7 minutes - - changes: - - '**/*.dune.inc' - - '**/*.opam' - - '**/dune' - - '**/dune-project' - - '**/dune-workspace' - - '**/dune.inc' - - .gitlab/ci/jobs/packaging/opam:prepare.yml - - .gitlab/ci/jobs/packaging/opam_package.yml - - manifest/**/*.ml* - - scripts/opam-prepare-repo.sh - - scripts/version.sh - when: delayed - start_in: 7 minutes - needs: - - oc.docker:ci:amd64 - - opam:prepare - dependencies: - - oc.docker:ci:amd64 - - opam:prepare - timeout: 60 minutes - cache: - - key: opam-sccache - paths: - - $CI_PROJECT_DIR/_build/_sccache - policy: pull-push - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - before_script: - - eval $(opam env) - - mkdir -p $CI_PROJECT_DIR/opam_logs - - . ./scripts/ci/sccache-start.sh - script: - - opam remote add dev-repo ./_opam-repo-for-release - - opam install --yes ${package}.dev - - opam reinstall --yes --with-test ${package}.dev - after_script: - - eval $(opam env) - - OPAM_LOGS=opam_logs ./scripts/ci/opam_handle_output.sh - - sccache --stop-server || true - variables: - RUNTEZTALIAS: "true" - SCCACHE_DIR: $CI_PROJECT_DIR/_build/_sccache - SCCACHE_ERROR_LOG: $CI_PROJECT_DIR/opam_logs/sccache.log - SCCACHE_IDLE_TIMEOUT: "0" - CARGO_NET_OFFLINE: "false" - artifacts: - expire_in: 1 week - paths: - - opam_logs/ - when: always - retry: 2 - parallel: - matrix: - - package: - - octez-version - opam:exec_4: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: packaging @@ -1422,6 +1355,7 @@ opam:all_4: parallel: matrix: - package: + - tezos-protocol-003-PsddFKi3 - tezos-protocol-002-PsYLVpVv - tezos-protocol-001-PtCJ7pwo - tezos-protocol-000-Ps9mPmXa @@ -1433,7 +1367,6 @@ opam:all_4: - octez-rpc-process - octez-protocol-015-PtLimaPt-libs - octez-protocol-014-PtKathma-libs - - octez-protocol-013-PtJakart-libs - octez-node-config - octez-crawler @@ -1505,7 +1438,6 @@ opam:exec_1: - package: - octez-smart-rollup-wasm-debugger - octez-smart-rollup-node - - octez-proxy-server - octez-node - octez-evm-node - octez-dal-node @@ -1586,6 +1518,7 @@ opam:all_5: parallel: matrix: - package: + - tezos-protocol-016-PtMumbai - tezos-protocol-015-PtLimaPt - tezos-protocol-014-PtKathma - tezos-protocol-013-PtJakart @@ -1600,7 +1533,6 @@ opam:all_5: - tezos-protocol-005-PsBabyM1 - tezos-protocol-005-PsBABY5H - tezos-protocol-004-Pt24m4xi - - tezos-protocol-003-PsddFKi3 opam:all_7: image: ${ci_image_name}/prebuild:${ci_image_tag} @@ -1671,7 +1603,6 @@ opam:all_7: matrix: - package: - tezt-tezos - - tezos-proxy-server-config - tezos-openapi - tezos-dal-node-services - tezos-benchmark diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index 5d34c60908df..f7c462b541ff 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -906,7 +906,6 @@ opam:all_6: - tezos-protocol-019-PtParisB - tezos-protocol-018-Proxford - tezos-protocol-017-PtNairob - - tezos-protocol-016-PtMumbai - octez-shell-libs - octez-riscv-pvm - octez-proto-libs @@ -978,6 +977,7 @@ opam:exec_6: parallel: matrix: - package: + - octez-version - octez-protocol-compiler opam:all_2: @@ -1048,13 +1048,13 @@ opam:all_2: parallel: matrix: - package: + - tezos-dac-node-lib - octez-smart-rollup-wasm-debugger-lib - octez-smart-rollup-node-lib - octez-smart-rollup-node-alpha - octez-smart-rollup-node-PtParisB - octez-smart-rollup-node-PtNairob - octez-smart-rollup-node-PsquebeC - - octez-smart-rollup-node-PsParisC - octez-smart-rollup-node-Proxford - octez-protocol-alpha-libs - octez-protocol-021-PsquebeC-libs @@ -1132,6 +1132,7 @@ opam:all_1: parallel: matrix: - package: + - octez-smart-rollup-node-PsParisC - octez-evm-node-libs opam:all_3: @@ -1202,7 +1203,7 @@ opam:all_3: parallel: matrix: - package: - - tezos-dac-node-lib + - octez-protocol-013-PtJakart-libs - octez-protocol-012-Psithaca-libs - octez-protocol-011-PtHangz2-libs - octez-protocol-010-PtGRANAD-libs @@ -1218,74 +1219,6 @@ opam:all_3: - octez-protocol-000-Ps9mPmXa-libs - octez-injector -opam:exec_7: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: packaging - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--opam(?:$|,)/ - when: delayed - start_in: 7 minutes - - changes: - - '**/*.dune.inc' - - '**/*.opam' - - '**/dune' - - '**/dune-project' - - '**/dune-workspace' - - '**/dune.inc' - - .gitlab/ci/jobs/packaging/opam:prepare.yml - - .gitlab/ci/jobs/packaging/opam_package.yml - - manifest/**/*.ml* - - scripts/opam-prepare-repo.sh - - scripts/version.sh - when: delayed - start_in: 7 minutes - needs: - - oc.docker:ci:amd64 - - opam:prepare - dependencies: - - oc.docker:ci:amd64 - - opam:prepare - timeout: 60 minutes - cache: - - key: opam-sccache - paths: - - $CI_PROJECT_DIR/_build/_sccache - policy: pull-push - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - before_script: - - eval $(opam env) - - mkdir -p $CI_PROJECT_DIR/opam_logs - - . ./scripts/ci/sccache-start.sh - script: - - opam remote add dev-repo ./_opam-repo-for-release - - opam install --yes ${package}.dev - - opam reinstall --yes --with-test ${package}.dev - after_script: - - eval $(opam env) - - OPAM_LOGS=opam_logs ./scripts/ci/opam_handle_output.sh - - sccache --stop-server || true - variables: - RUNTEZTALIAS: "true" - SCCACHE_DIR: $CI_PROJECT_DIR/_build/_sccache - SCCACHE_ERROR_LOG: $CI_PROJECT_DIR/opam_logs/sccache.log - SCCACHE_IDLE_TIMEOUT: "0" - CARGO_NET_OFFLINE: "false" - artifacts: - expire_in: 1 week - paths: - - opam_logs/ - when: always - retry: 2 - parallel: - matrix: - - package: - - octez-version - opam:exec_4: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: packaging @@ -1422,6 +1355,7 @@ opam:all_4: parallel: matrix: - package: + - tezos-protocol-003-PsddFKi3 - tezos-protocol-002-PsYLVpVv - tezos-protocol-001-PtCJ7pwo - tezos-protocol-000-Ps9mPmXa @@ -1433,7 +1367,6 @@ opam:all_4: - octez-rpc-process - octez-protocol-015-PtLimaPt-libs - octez-protocol-014-PtKathma-libs - - octez-protocol-013-PtJakart-libs - octez-node-config - octez-crawler @@ -1505,7 +1438,6 @@ opam:exec_1: - package: - octez-smart-rollup-wasm-debugger - octez-smart-rollup-node - - octez-proxy-server - octez-node - octez-evm-node - octez-dal-node @@ -1586,6 +1518,7 @@ opam:all_5: parallel: matrix: - package: + - tezos-protocol-016-PtMumbai - tezos-protocol-015-PtLimaPt - tezos-protocol-014-PtKathma - tezos-protocol-013-PtJakart @@ -1600,7 +1533,6 @@ opam:all_5: - tezos-protocol-005-PsBabyM1 - tezos-protocol-005-PsBABY5H - tezos-protocol-004-Pt24m4xi - - tezos-protocol-003-PsddFKi3 opam:all_7: image: ${ci_image_name}/prebuild:${ci_image_tag} @@ -1671,7 +1603,6 @@ opam:all_7: matrix: - package: - tezt-tezos - - tezos-proxy-server-config - tezos-openapi - tezos-dal-node-services - tezos-benchmark diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index ff4105a7a9d0..916e1a22736c 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -688,7 +688,6 @@ opam:all_6: - tezos-protocol-019-PtParisB - tezos-protocol-018-Proxford - tezos-protocol-017-PtNairob - - tezos-protocol-016-PtMumbai - octez-shell-libs - octez-riscv-pvm - octez-proto-libs @@ -745,6 +744,7 @@ opam:exec_6: parallel: matrix: - package: + - octez-version - octez-protocol-compiler opam:all_2: @@ -798,13 +798,13 @@ opam:all_2: parallel: matrix: - package: + - tezos-dac-node-lib - octez-smart-rollup-wasm-debugger-lib - octez-smart-rollup-node-lib - octez-smart-rollup-node-alpha - octez-smart-rollup-node-PtParisB - octez-smart-rollup-node-PtNairob - octez-smart-rollup-node-PsquebeC - - octez-smart-rollup-node-PsParisC - octez-smart-rollup-node-Proxford - octez-protocol-alpha-libs - octez-protocol-021-PsquebeC-libs @@ -865,6 +865,7 @@ opam:all_1: parallel: matrix: - package: + - octez-smart-rollup-node-PsParisC - octez-evm-node-libs opam:all_3: @@ -918,7 +919,7 @@ opam:all_3: parallel: matrix: - package: - - tezos-dac-node-lib + - octez-protocol-013-PtJakart-libs - octez-protocol-012-Psithaca-libs - octez-protocol-011-PtHangz2-libs - octez-protocol-010-PtGRANAD-libs @@ -934,59 +935,6 @@ opam:all_3: - octez-protocol-000-Ps9mPmXa-libs - octez-injector -opam:exec_7: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: packaging - tags: - - gcp - rules: - - when: delayed - start_in: 7 minutes - needs: - - oc.docker:ci:amd64 - - opam:prepare - dependencies: - - oc.docker:ci:amd64 - - opam:prepare - timeout: 60 minutes - cache: - - key: opam-sccache - paths: - - $CI_PROJECT_DIR/_build/_sccache - policy: pull-push - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - before_script: - - eval $(opam env) - - mkdir -p $CI_PROJECT_DIR/opam_logs - - . ./scripts/ci/sccache-start.sh - script: - - opam remote add dev-repo ./_opam-repo-for-release - - opam install --yes ${package}.dev - - opam reinstall --yes --with-test ${package}.dev - after_script: - - eval $(opam env) - - OPAM_LOGS=opam_logs ./scripts/ci/opam_handle_output.sh - - sccache --stop-server || true - variables: - RUNTEZTALIAS: "true" - SCCACHE_DIR: $CI_PROJECT_DIR/_build/_sccache - SCCACHE_ERROR_LOG: $CI_PROJECT_DIR/opam_logs/sccache.log - SCCACHE_IDLE_TIMEOUT: "0" - CARGO_NET_OFFLINE: "false" - artifacts: - expire_in: 1 week - paths: - - opam_logs/ - when: always - retry: 2 - parallel: - matrix: - - package: - - octez-version - opam:exec_4: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: packaging @@ -1091,6 +1039,7 @@ opam:all_4: parallel: matrix: - package: + - tezos-protocol-003-PsddFKi3 - tezos-protocol-002-PsYLVpVv - tezos-protocol-001-PtCJ7pwo - tezos-protocol-000-Ps9mPmXa @@ -1102,7 +1051,6 @@ opam:all_4: - octez-rpc-process - octez-protocol-015-PtLimaPt-libs - octez-protocol-014-PtKathma-libs - - octez-protocol-013-PtJakart-libs - octez-node-config - octez-crawler @@ -1159,7 +1107,6 @@ opam:exec_1: - package: - octez-smart-rollup-wasm-debugger - octez-smart-rollup-node - - octez-proxy-server - octez-node - octez-evm-node - octez-dal-node @@ -1223,6 +1170,7 @@ opam:all_5: parallel: matrix: - package: + - tezos-protocol-016-PtMumbai - tezos-protocol-015-PtLimaPt - tezos-protocol-014-PtKathma - tezos-protocol-013-PtJakart @@ -1237,7 +1185,6 @@ opam:all_5: - tezos-protocol-005-PsBabyM1 - tezos-protocol-005-PsBABY5H - tezos-protocol-004-Pt24m4xi - - tezos-protocol-003-PsddFKi3 opam:all_7: image: ${ci_image_name}/prebuild:${ci_image_tag} @@ -1291,7 +1238,6 @@ opam:all_7: matrix: - package: - tezt-tezos - - tezos-proxy-server-config - tezos-openapi - tezos-dal-node-services - tezos-benchmark diff --git a/Makefile b/Makefile index f97414a68178..36d21e2d3308 100644 --- a/Makefile +++ b/Makefile @@ -199,6 +199,7 @@ clean-old-names: @rm -f tezos-codec @rm -f tezos-protocol-compiler @rm -f tezos-proxy-server + @rm -f octez-proxy-server @rm -f tezos-baker-012-Psithaca @rm -f tezos-accuser-012-Psithaca @rm -f tezos-baker-013-PtJakart diff --git a/dune-project b/dune-project index 54bc3db5fe91..1184c6fc3c3e 100644 --- a/dune-project +++ b/dune-project @@ -61,7 +61,6 @@ (package (name octez-protocol-021-PsquebeC-libs)) (package (name octez-protocol-alpha-libs)) (package (name octez-protocol-compiler)) -(package (name octez-proxy-server)) (package (name octez-riscv-api)) (package (name octez-riscv-pvm)) (package (name octez-riscv-pvm-test)(allow_empty)) @@ -145,7 +144,6 @@ (package (name tezos-protocol-demo-counter)) (package (name tezos-protocol-demo-noops)) (package (name tezos-protocol-genesis)) -(package (name tezos-proxy-server-config)) (package (name tezos-sc-rollup-node-test)(allow_empty)) (package (name tezos-scoru-wasm-regressions)(allow_empty)) (package (name tezos-smart-rollup-node-lib-test)(allow_empty)) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index ca81b62d483e..ba98d49eead8 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -4109,29 +4109,6 @@ let _octez_proxy_tests = uri; ] -let octez_proxy_server_config = - public_lib - "tezos-proxy-server-config" - ~path:"src/lib_proxy_server_config" - ~synopsis:"Tezos: proxy server configuration" - ~deps:[octez_base |> open_ ~m:"TzPervasives"; octez_stdlib_unix; uri] - -let _octez_proxy_server_config_tests = - tezt - ["test_proxy_server_config"] - ~path:"src/lib_proxy_server_config/test" - ~opam:"tezos-proxy-server-config" - ~deps: - [ - octez_base |> open_ ~m:"TzPervasives"; - octez_base_unix; - octez_proxy_server_config; - octez_test_helpers |> open_; - qcheck_alcotest; - alcotezt; - uri; - ] - let octez_client_base_unix = octez_shell_lib "client-base-unix" @@ -7744,36 +7721,6 @@ let _octez_codec = ]) ~linkall:true -let _octez_proxy_server = - public_exe - "octez-proxy-server" - ~path:"src/bin_proxy_server" - ~internal_name:"main_proxy_server" - ~synopsis:"Octez: `octez-proxy-server` binary" - ~release_status:Released - ~with_macos_security_framework:true - ~deps: - ([ - octez_base |> open_ ~m:"TzPervasives" |> open_; - octez_base_unix; - octez_stdlib_unix |> open_; - octez_rpc; - cmdliner; - lwt_exit; - lwt_unix; - octez_proxy; - octez_proxy_server_config; - octez_rpc_http_client_unix; - octez_rpc_http_server; - octez_shell_services; - (* TODO: use context_ops ~kind:`Disk instead of shell_context *) - octez_shell_context; - octez_version_value; - uri; - ] - @ Protocol.all_optionally [Protocol.client; Protocol.plugin]) - ~linkall:true - let _octez_snoop = public_exe "octez-snoop" diff --git a/opam/octez-proxy-server.opam b/opam/octez-proxy-server.opam deleted file mode 100644 index a1ac5efe6634..000000000000 --- a/opam/octez-proxy-server.opam +++ /dev/null @@ -1,81 +0,0 @@ -# This file was automatically generated, do not edit. -# Edit file manifest/main.ml instead. -opam-version: "2.0" -maintainer: "contact@tezos.com" -authors: ["Tezos devteam"] -homepage: "https://www.tezos.com/" -bug-reports: "https://gitlab.com/tezos/tezos/issues" -dev-repo: "git+https://gitlab.com/tezos/tezos.git" -license: "MIT" -depends: [ - "dune" { >= "3.11.1" } - "ocaml" { >= "4.14" } - "octez-libs" { = version } - "cmdliner" { >= "1.1.0" } - "lwt-exit" - "lwt" { >= "5.7.0" } - "octez-shell-libs" { = version } - "tezos-proxy-server-config" { = version } - "octez-version" { = version } - "uri" { >= "3.1.0" } -] -depopts: [ - "tezos-client-genesis" - "tezos-client-demo-counter" - "octez-protocol-000-Ps9mPmXa-libs" - "octez-protocol-001-PtCJ7pwo-libs" - "octez-protocol-002-PsYLVpVv-libs" - "octez-protocol-003-PsddFKi3-libs" - "octez-protocol-004-Pt24m4xi-libs" - "octez-protocol-005-PsBabyM1-libs" - "octez-protocol-006-PsCARTHA-libs" - "octez-protocol-007-PsDELPH1-libs" - "octez-protocol-008-PtEdo2Zk-libs" - "octez-protocol-009-PsFLoren-libs" - "octez-protocol-010-PtGRANAD-libs" - "octez-protocol-011-PtHangz2-libs" - "octez-protocol-012-Psithaca-libs" - "octez-protocol-013-PtJakart-libs" - "octez-protocol-014-PtKathma-libs" - "octez-protocol-015-PtLimaPt-libs" - "octez-protocol-016-PtMumbai-libs" - "octez-protocol-017-PtNairob-libs" - "octez-protocol-018-Proxford-libs" - "octez-protocol-019-PtParisB-libs" - "octez-protocol-020-PsParisC-libs" - "octez-protocol-021-PsquebeC-libs" - "octez-protocol-alpha-libs" -] -conflicts: [ - "tezos-client-genesis" { != version } - "tezos-client-demo-counter" { != version } - "octez-protocol-000-Ps9mPmXa-libs" { != version } - "octez-protocol-001-PtCJ7pwo-libs" { != version } - "octez-protocol-002-PsYLVpVv-libs" { != version } - "octez-protocol-003-PsddFKi3-libs" { != version } - "octez-protocol-004-Pt24m4xi-libs" { != version } - "octez-protocol-005-PsBabyM1-libs" { != version } - "octez-protocol-006-PsCARTHA-libs" { != version } - "octez-protocol-007-PsDELPH1-libs" { != version } - "octez-protocol-008-PtEdo2Zk-libs" { != version } - "octez-protocol-009-PsFLoren-libs" { != version } - "octez-protocol-010-PtGRANAD-libs" { != version } - "octez-protocol-011-PtHangz2-libs" { != version } - "octez-protocol-012-Psithaca-libs" { != version } - "octez-protocol-013-PtJakart-libs" { != version } - "octez-protocol-014-PtKathma-libs" { != version } - "octez-protocol-015-PtLimaPt-libs" { != version } - "octez-protocol-016-PtMumbai-libs" { != version } - "octez-protocol-017-PtNairob-libs" { != version } - "octez-protocol-018-Proxford-libs" { != version } - "octez-protocol-019-PtParisB-libs" { != version } - "octez-protocol-020-PsParisC-libs" { != version } - "octez-protocol-021-PsquebeC-libs" { != version } - "octez-protocol-alpha-libs" { != version } -] -build: [ - ["rm" "-r" "vendors" "contrib"] - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -synopsis: "Octez: `octez-proxy-server` binary" diff --git a/opam/tezos-proxy-server-config.opam b/opam/tezos-proxy-server-config.opam deleted file mode 100644 index a5c0eb8f0ed7..000000000000 --- a/opam/tezos-proxy-server-config.opam +++ /dev/null @@ -1,24 +0,0 @@ -# This file was automatically generated, do not edit. -# Edit file manifest/main.ml instead. -opam-version: "2.0" -maintainer: "contact@tezos.com" -authors: ["Tezos devteam"] -homepage: "https://www.tezos.com/" -bug-reports: "https://gitlab.com/tezos/tezos/issues" -dev-repo: "git+https://gitlab.com/tezos/tezos.git" -license: "MIT" -depends: [ - "dune" { >= "3.11.1" } - "ocaml" { >= "4.14" } - "octez-libs" { = version } - "uri" { >= "3.1.0" } - "tezt" { with-test & >= "4.1.0" & < "5.0.0" } - "qcheck-alcotest" { with-test & >= "0.20" } - "octez-alcotezt" { with-test & = version } -] -build: [ - ["rm" "-r" "vendors" "contrib"] - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -synopsis: "Tezos: proxy server configuration" diff --git a/script-inputs/ci-opam-package-tests b/script-inputs/ci-opam-package-tests index 7e543b140319..9b24773ea23a 100644 --- a/script-inputs/ci-opam-package-tests +++ b/script-inputs/ci-opam-package-tests @@ -34,7 +34,7 @@ octez-protocol-009-PsFLoren-libs all 3 octez-protocol-010-PtGRANAD-libs all 3 octez-protocol-011-PtHangz2-libs all 3 octez-protocol-012-Psithaca-libs all 3 -octez-protocol-013-PtJakart-libs all 4 +octez-protocol-013-PtJakart-libs all 3 octez-protocol-014-PtKathma-libs all 4 octez-protocol-015-PtLimaPt-libs all 4 octez-protocol-016-PtMumbai-libs all 2 @@ -45,7 +45,6 @@ octez-protocol-020-PsParisC-libs all 2 octez-protocol-021-PsquebeC-libs all 2 octez-protocol-alpha-libs all 2 octez-protocol-compiler exec 6 -octez-proxy-server exec 1 octez-riscv-api all 7 octez-riscv-pvm all 6 octez-rpc-process all 4 @@ -54,7 +53,7 @@ octez-shell-libs all 6 octez-signer exec 4 octez-smart-rollup-node exec 1 octez-smart-rollup-node-Proxford all 2 -octez-smart-rollup-node-PsParisC all 2 +octez-smart-rollup-node-PsParisC all 1 octez-smart-rollup-node-PsquebeC all 2 octez-smart-rollup-node-PtNairob all 2 octez-smart-rollup-node-PtParisB all 2 @@ -63,20 +62,20 @@ octez-smart-rollup-node-lib all 2 octez-smart-rollup-wasm-debugger exec 1 octez-smart-rollup-wasm-debugger-lib all 2 octez-smart-rollup-wasm-debugger-plugin all 7 -octez-version exec 7 +octez-version exec 6 tezos-benchmark all 7 tezos-client-demo-counter all 4 tezos-client-genesis all 4 tezos-dac-client-lib all 4 tezos-dac-lib all 4 -tezos-dac-node-lib all 3 +tezos-dac-node-lib all 2 tezos-dal-node-lib all 4 tezos-dal-node-services all 7 tezos-openapi all 7 tezos-protocol-000-Ps9mPmXa all 4 tezos-protocol-001-PtCJ7pwo all 4 tezos-protocol-002-PsYLVpVv all 4 -tezos-protocol-003-PsddFKi3 all 5 +tezos-protocol-003-PsddFKi3 all 4 tezos-protocol-004-Pt24m4xi all 5 tezos-protocol-005-PsBABY5H all 5 tezos-protocol-005-PsBabyM1 all 5 @@ -91,7 +90,7 @@ tezos-protocol-012-Psithaca all 5 tezos-protocol-013-PtJakart all 5 tezos-protocol-014-PtKathma all 5 tezos-protocol-015-PtLimaPt all 5 -tezos-protocol-016-PtMumbai all 6 +tezos-protocol-016-PtMumbai all 5 tezos-protocol-017-PtNairob all 6 tezos-protocol-018-Proxford all 6 tezos-protocol-019-PtParisB all 6 @@ -101,5 +100,4 @@ tezos-protocol-alpha all 6 tezos-protocol-demo-counter all 6 tezos-protocol-demo-noops all 6 tezos-protocol-genesis all 6 -tezos-proxy-server-config all 7 tezt-tezos all 7 diff --git a/script-inputs/released-executables b/script-inputs/released-executables index a93616671f26..12c073789ed7 100644 --- a/script-inputs/released-executables +++ b/script-inputs/released-executables @@ -5,7 +5,6 @@ octez-dac-client octez-dac-node octez-dal-node octez-signer -octez-proxy-server octez-codec octez-client octez-admin-client diff --git a/src/bin_proxy_server/dune b/src/bin_proxy_server/dune deleted file mode 100644 index 34013587bca7..000000000000 --- a/src/bin_proxy_server/dune +++ /dev/null @@ -1,202 +0,0 @@ -; This file was automatically generated, do not edit. -; Edit file manifest/main.ml instead. - -(executable - (name main_proxy_server) - (public_name octez-proxy-server) - (package octez-proxy-server) - (instrumentation (backend bisect_ppx)) - (libraries - octez-libs.base - octez-libs.base.unix - octez-libs.stdlib-unix - octez-libs.rpc - cmdliner - lwt-exit - lwt.unix - octez-shell-libs.proxy - tezos-proxy-server-config - octez-libs.rpc-http-client-unix - octez-libs.rpc-http-server - octez-shell-libs.shell-services - octez-shell-libs.shell-context - octez-version.value - uri - (select void_for_linking-tezos-client-genesis from - (tezos-client-genesis -> void_for_linking-tezos-client-genesis.empty) - (-> void_for_linking-tezos-client-genesis.empty)) - (select void_for_linking-tezos-client-demo-counter from - (tezos-client-demo-counter -> void_for_linking-tezos-client-demo-counter.empty) - (-> void_for_linking-tezos-client-demo-counter.empty)) - (select void_for_linking-octez-protocol-000-Ps9mPmXa-libs-client from - (octez-protocol-000-Ps9mPmXa-libs.client -> void_for_linking-octez-protocol-000-Ps9mPmXa-libs-client.empty) - (-> void_for_linking-octez-protocol-000-Ps9mPmXa-libs-client.empty)) - (select void_for_linking-octez-protocol-001-PtCJ7pwo-libs-client from - (octez-protocol-001-PtCJ7pwo-libs.client -> void_for_linking-octez-protocol-001-PtCJ7pwo-libs-client.empty) - (-> void_for_linking-octez-protocol-001-PtCJ7pwo-libs-client.empty)) - (select void_for_linking-octez-protocol-002-PsYLVpVv-libs-client from - (octez-protocol-002-PsYLVpVv-libs.client -> void_for_linking-octez-protocol-002-PsYLVpVv-libs-client.empty) - (-> void_for_linking-octez-protocol-002-PsYLVpVv-libs-client.empty)) - (select void_for_linking-octez-protocol-003-PsddFKi3-libs-client from - (octez-protocol-003-PsddFKi3-libs.client -> void_for_linking-octez-protocol-003-PsddFKi3-libs-client.empty) - (-> void_for_linking-octez-protocol-003-PsddFKi3-libs-client.empty)) - (select void_for_linking-octez-protocol-004-Pt24m4xi-libs-client from - (octez-protocol-004-Pt24m4xi-libs.client -> void_for_linking-octez-protocol-004-Pt24m4xi-libs-client.empty) - (-> void_for_linking-octez-protocol-004-Pt24m4xi-libs-client.empty)) - (select void_for_linking-octez-protocol-005-PsBabyM1-libs-client from - (octez-protocol-005-PsBabyM1-libs.client -> void_for_linking-octez-protocol-005-PsBabyM1-libs-client.empty) - (-> void_for_linking-octez-protocol-005-PsBabyM1-libs-client.empty)) - (select void_for_linking-octez-protocol-006-PsCARTHA-libs-client from - (octez-protocol-006-PsCARTHA-libs.client -> void_for_linking-octez-protocol-006-PsCARTHA-libs-client.empty) - (-> void_for_linking-octez-protocol-006-PsCARTHA-libs-client.empty)) - (select void_for_linking-octez-protocol-007-PsDELPH1-libs-client from - (octez-protocol-007-PsDELPH1-libs.client -> void_for_linking-octez-protocol-007-PsDELPH1-libs-client.empty) - (-> void_for_linking-octez-protocol-007-PsDELPH1-libs-client.empty)) - (select void_for_linking-octez-protocol-007-PsDELPH1-libs-plugin from - (octez-protocol-007-PsDELPH1-libs.plugin -> void_for_linking-octez-protocol-007-PsDELPH1-libs-plugin.empty) - (-> void_for_linking-octez-protocol-007-PsDELPH1-libs-plugin.empty)) - (select void_for_linking-octez-protocol-008-PtEdo2Zk-libs-client from - (octez-protocol-008-PtEdo2Zk-libs.client -> void_for_linking-octez-protocol-008-PtEdo2Zk-libs-client.empty) - (-> void_for_linking-octez-protocol-008-PtEdo2Zk-libs-client.empty)) - (select void_for_linking-octez-protocol-008-PtEdo2Zk-libs-plugin from - (octez-protocol-008-PtEdo2Zk-libs.plugin -> void_for_linking-octez-protocol-008-PtEdo2Zk-libs-plugin.empty) - (-> void_for_linking-octez-protocol-008-PtEdo2Zk-libs-plugin.empty)) - (select void_for_linking-octez-protocol-009-PsFLoren-libs-client from - (octez-protocol-009-PsFLoren-libs.client -> void_for_linking-octez-protocol-009-PsFLoren-libs-client.empty) - (-> void_for_linking-octez-protocol-009-PsFLoren-libs-client.empty)) - (select void_for_linking-octez-protocol-009-PsFLoren-libs-plugin from - (octez-protocol-009-PsFLoren-libs.plugin -> void_for_linking-octez-protocol-009-PsFLoren-libs-plugin.empty) - (-> void_for_linking-octez-protocol-009-PsFLoren-libs-plugin.empty)) - (select void_for_linking-octez-protocol-010-PtGRANAD-libs-client from - (octez-protocol-010-PtGRANAD-libs.client -> void_for_linking-octez-protocol-010-PtGRANAD-libs-client.empty) - (-> void_for_linking-octez-protocol-010-PtGRANAD-libs-client.empty)) - (select void_for_linking-octez-protocol-010-PtGRANAD-libs-plugin from - (octez-protocol-010-PtGRANAD-libs.plugin -> void_for_linking-octez-protocol-010-PtGRANAD-libs-plugin.empty) - (-> void_for_linking-octez-protocol-010-PtGRANAD-libs-plugin.empty)) - (select void_for_linking-octez-protocol-011-PtHangz2-libs-client from - (octez-protocol-011-PtHangz2-libs.client -> void_for_linking-octez-protocol-011-PtHangz2-libs-client.empty) - (-> void_for_linking-octez-protocol-011-PtHangz2-libs-client.empty)) - (select void_for_linking-octez-protocol-011-PtHangz2-libs-plugin from - (octez-protocol-011-PtHangz2-libs.plugin -> void_for_linking-octez-protocol-011-PtHangz2-libs-plugin.empty) - (-> void_for_linking-octez-protocol-011-PtHangz2-libs-plugin.empty)) - (select void_for_linking-octez-protocol-012-Psithaca-libs-client from - (octez-protocol-012-Psithaca-libs.client -> void_for_linking-octez-protocol-012-Psithaca-libs-client.empty) - (-> void_for_linking-octez-protocol-012-Psithaca-libs-client.empty)) - (select void_for_linking-octez-protocol-012-Psithaca-libs-plugin from - (octez-protocol-012-Psithaca-libs.plugin -> void_for_linking-octez-protocol-012-Psithaca-libs-plugin.empty) - (-> void_for_linking-octez-protocol-012-Psithaca-libs-plugin.empty)) - (select void_for_linking-octez-protocol-013-PtJakart-libs-client from - (octez-protocol-013-PtJakart-libs.client -> void_for_linking-octez-protocol-013-PtJakart-libs-client.empty) - (-> void_for_linking-octez-protocol-013-PtJakart-libs-client.empty)) - (select void_for_linking-octez-protocol-013-PtJakart-libs-plugin from - (octez-protocol-013-PtJakart-libs.plugin -> void_for_linking-octez-protocol-013-PtJakart-libs-plugin.empty) - (-> void_for_linking-octez-protocol-013-PtJakart-libs-plugin.empty)) - (select void_for_linking-octez-protocol-014-PtKathma-libs-client from - (octez-protocol-014-PtKathma-libs.client -> void_for_linking-octez-protocol-014-PtKathma-libs-client.empty) - (-> void_for_linking-octez-protocol-014-PtKathma-libs-client.empty)) - (select void_for_linking-octez-protocol-014-PtKathma-libs-plugin from - (octez-protocol-014-PtKathma-libs.plugin -> void_for_linking-octez-protocol-014-PtKathma-libs-plugin.empty) - (-> void_for_linking-octez-protocol-014-PtKathma-libs-plugin.empty)) - (select void_for_linking-octez-protocol-015-PtLimaPt-libs-client from - (octez-protocol-015-PtLimaPt-libs.client -> void_for_linking-octez-protocol-015-PtLimaPt-libs-client.empty) - (-> void_for_linking-octez-protocol-015-PtLimaPt-libs-client.empty)) - (select void_for_linking-octez-protocol-015-PtLimaPt-libs-plugin from - (octez-protocol-015-PtLimaPt-libs.plugin -> void_for_linking-octez-protocol-015-PtLimaPt-libs-plugin.empty) - (-> void_for_linking-octez-protocol-015-PtLimaPt-libs-plugin.empty)) - (select void_for_linking-octez-protocol-016-PtMumbai-libs-client from - (octez-protocol-016-PtMumbai-libs.client -> void_for_linking-octez-protocol-016-PtMumbai-libs-client.empty) - (-> void_for_linking-octez-protocol-016-PtMumbai-libs-client.empty)) - (select void_for_linking-octez-protocol-016-PtMumbai-libs-plugin from - (octez-protocol-016-PtMumbai-libs.plugin -> void_for_linking-octez-protocol-016-PtMumbai-libs-plugin.empty) - (-> void_for_linking-octez-protocol-016-PtMumbai-libs-plugin.empty)) - (select void_for_linking-octez-protocol-017-PtNairob-libs-client from - (octez-protocol-017-PtNairob-libs.client -> void_for_linking-octez-protocol-017-PtNairob-libs-client.empty) - (-> void_for_linking-octez-protocol-017-PtNairob-libs-client.empty)) - (select void_for_linking-octez-protocol-017-PtNairob-libs-plugin from - (octez-protocol-017-PtNairob-libs.plugin -> void_for_linking-octez-protocol-017-PtNairob-libs-plugin.empty) - (-> void_for_linking-octez-protocol-017-PtNairob-libs-plugin.empty)) - (select void_for_linking-octez-protocol-018-Proxford-libs-client from - (octez-protocol-018-Proxford-libs.client -> void_for_linking-octez-protocol-018-Proxford-libs-client.empty) - (-> void_for_linking-octez-protocol-018-Proxford-libs-client.empty)) - (select void_for_linking-octez-protocol-018-Proxford-libs-plugin from - (octez-protocol-018-Proxford-libs.plugin -> void_for_linking-octez-protocol-018-Proxford-libs-plugin.empty) - (-> void_for_linking-octez-protocol-018-Proxford-libs-plugin.empty)) - (select void_for_linking-octez-protocol-019-PtParisB-libs-client from - (octez-protocol-019-PtParisB-libs.client -> void_for_linking-octez-protocol-019-PtParisB-libs-client.empty) - (-> void_for_linking-octez-protocol-019-PtParisB-libs-client.empty)) - (select void_for_linking-octez-protocol-019-PtParisB-libs-plugin from - (octez-protocol-019-PtParisB-libs.plugin -> void_for_linking-octez-protocol-019-PtParisB-libs-plugin.empty) - (-> void_for_linking-octez-protocol-019-PtParisB-libs-plugin.empty)) - (select void_for_linking-octez-protocol-020-PsParisC-libs-client from - (octez-protocol-020-PsParisC-libs.client -> void_for_linking-octez-protocol-020-PsParisC-libs-client.empty) - (-> void_for_linking-octez-protocol-020-PsParisC-libs-client.empty)) - (select void_for_linking-octez-protocol-020-PsParisC-libs-plugin from - (octez-protocol-020-PsParisC-libs.plugin -> void_for_linking-octez-protocol-020-PsParisC-libs-plugin.empty) - (-> void_for_linking-octez-protocol-020-PsParisC-libs-plugin.empty)) - (select void_for_linking-octez-protocol-021-PsquebeC-libs-client from - (octez-protocol-021-PsquebeC-libs.client -> void_for_linking-octez-protocol-021-PsquebeC-libs-client.empty) - (-> void_for_linking-octez-protocol-021-PsquebeC-libs-client.empty)) - (select void_for_linking-octez-protocol-021-PsquebeC-libs-plugin from - (octez-protocol-021-PsquebeC-libs.plugin -> void_for_linking-octez-protocol-021-PsquebeC-libs-plugin.empty) - (-> void_for_linking-octez-protocol-021-PsquebeC-libs-plugin.empty)) - (select void_for_linking-octez-protocol-alpha-libs-client from - (octez-protocol-alpha-libs.client -> void_for_linking-octez-protocol-alpha-libs-client.empty) - (-> void_for_linking-octez-protocol-alpha-libs-client.empty)) - (select void_for_linking-octez-protocol-alpha-libs-plugin from - (octez-protocol-alpha-libs.plugin -> void_for_linking-octez-protocol-alpha-libs-plugin.empty) - (-> void_for_linking-octez-protocol-alpha-libs-plugin.empty))) - (link_flags - (:standard) - (:include %{workspace_root}/static-link-flags.sexp) - (:include %{workspace_root}/macos-link-flags.sexp) - (-linkall)) - (flags - (:standard) - -open Tezos_base.TzPervasives - -open Tezos_base - -open Tezos_stdlib_unix)) - -(rule - (action - (progn - (write-file void_for_linking-tezos-client-genesis.empty "") - (write-file void_for_linking-tezos-client-demo-counter.empty "") - (write-file void_for_linking-octez-protocol-000-Ps9mPmXa-libs-client.empty "") - (write-file void_for_linking-octez-protocol-001-PtCJ7pwo-libs-client.empty "") - (write-file void_for_linking-octez-protocol-002-PsYLVpVv-libs-client.empty "") - (write-file void_for_linking-octez-protocol-003-PsddFKi3-libs-client.empty "") - (write-file void_for_linking-octez-protocol-004-Pt24m4xi-libs-client.empty "") - (write-file void_for_linking-octez-protocol-005-PsBabyM1-libs-client.empty "") - (write-file void_for_linking-octez-protocol-006-PsCARTHA-libs-client.empty "") - (write-file void_for_linking-octez-protocol-007-PsDELPH1-libs-client.empty "") - (write-file void_for_linking-octez-protocol-007-PsDELPH1-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-008-PtEdo2Zk-libs-client.empty "") - (write-file void_for_linking-octez-protocol-008-PtEdo2Zk-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-009-PsFLoren-libs-client.empty "") - (write-file void_for_linking-octez-protocol-009-PsFLoren-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-010-PtGRANAD-libs-client.empty "") - (write-file void_for_linking-octez-protocol-010-PtGRANAD-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-011-PtHangz2-libs-client.empty "") - (write-file void_for_linking-octez-protocol-011-PtHangz2-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-012-Psithaca-libs-client.empty "") - (write-file void_for_linking-octez-protocol-012-Psithaca-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-013-PtJakart-libs-client.empty "") - (write-file void_for_linking-octez-protocol-013-PtJakart-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-014-PtKathma-libs-client.empty "") - (write-file void_for_linking-octez-protocol-014-PtKathma-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-015-PtLimaPt-libs-client.empty "") - (write-file void_for_linking-octez-protocol-015-PtLimaPt-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-016-PtMumbai-libs-client.empty "") - (write-file void_for_linking-octez-protocol-016-PtMumbai-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-017-PtNairob-libs-client.empty "") - (write-file void_for_linking-octez-protocol-017-PtNairob-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-018-Proxford-libs-client.empty "") - (write-file void_for_linking-octez-protocol-018-Proxford-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-019-PtParisB-libs-client.empty "") - (write-file void_for_linking-octez-protocol-019-PtParisB-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-020-PsParisC-libs-client.empty "") - (write-file void_for_linking-octez-protocol-020-PsParisC-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-021-PsquebeC-libs-client.empty "") - (write-file void_for_linking-octez-protocol-021-PsquebeC-libs-plugin.empty "") - (write-file void_for_linking-octez-protocol-alpha-libs-client.empty "") - (write-file void_for_linking-octez-protocol-alpha-libs-plugin.empty "")))) diff --git a/src/bin_proxy_server/main_proxy_server.ml b/src/bin_proxy_server/main_proxy_server.ml deleted file mode 100644 index 03056b05e80b..000000000000 --- a/src/bin_proxy_server/main_proxy_server.ml +++ /dev/null @@ -1,293 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs. *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -open Cmdliner -module Proxy_server_config = Tezos_proxy_server_config.Proxy_server_config - -(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 - Remove backwards compatible Tezos symlinks. *) -let () = - (* warn_if_argv0_name_not_octez *) - let executable_name = Filename.basename Sys.argv.(0) in - let prefix = "tezos-" in - if TzString.has_prefix executable_name ~prefix then - let expected_name = - let len_prefix = String.length prefix in - "octez-" - ^ String.sub - executable_name - len_prefix - (String.length executable_name - len_prefix) - in - Format.eprintf - "@[@{@{Warning@}@}@,\ - The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ - The name @{<kwd>%s@} is now@,\ - deprecated, and it will be removed in a future release. Please update@,\ - your scripts to use the new name.@]@\n\ - @." - executable_name - expected_name - executable_name - else () - -let name = "octez-proxy-server" - -let config : string option Term.t = - let doc = - "The configuration file. Fields (see corresponding options): endpoint \ - (string), rpc_addr (string), rpc_tls (string), sym_block_caching_time \ - (int), and data_dir (string)." - in - let docv = "CONFIG" in - Arg.(value & opt (some string) None & info ["c"; "config"] ~docv ~doc) - -let endpoint : string option Term.t = - let doc = "The node to do requests to for obtaining data when needed." in - let docv = "ENDPOINT" in - Arg.(value & opt (some string) None & info ["E"; "endpoint"] ~docv ~doc) - -let log_requests = - let doc = "Log all requests to the node." in - let docv = "LOG_REQUESTS" in - Arg.(value & flag & info ["l"; "log-requests"] ~docv ~doc) - -let rpc_addr : string option Term.t = - let doc = "The URL at which this RPC server instance can be reached." in - let docv = "RPC_ADDR" in - Arg.(value & opt (some string) None & info ["rpc-addr"] ~docv ~doc) - -let rpc_tls : string option Term.t = - let doc = - "Enable TLS for this RPC server with the provided certificate and key." - in - let docv = "RPC_TLS" in - Arg.(value & opt (some string) None & info ["rpc-tls"] ~docv ~doc) - -let data_dir : string option Term.t = - let doc = - "Path to the data-dir of a running octez-node, for reading the `context` \ - subdirectory to obtain data instead of using the ../raw/bytes RPC (hereby \ - reducing the node's IO)." - in - let docv = "DATA_DIR" in - Arg.(value & opt (some string) None & info ["d"; "data-dir"] ~docv ~doc) - -let sym_block_caching_time : Ptime.span option Term.t = - let doc = - "The duration (in seconds) during which data for a symbolic block \ - identifier (like head) is kept. Smaller values increase the endpoint's \ - load but give more up-to-date data. If omitted, defaulted to \ - time_between_blocks (and causes extra RPCs to the endpoint to retrieve \ - this value)." - in - let docv = "SYM_BLOCK_CACHING_TIME" in - Term.(app @@ const @@ Option.map @@ Ptime.Span.of_int_s) - Arg.( - value & opt (some int) None & info ["sym-block-caching-time"] ~docv ~doc) - -let load_config_from_file (config_file : string) = - let open Lwt_result_syntax in - let* json = Lwt_utils_unix.Json.read_file config_file in - let open Proxy_server_config in - match destruct_config json with - | CannotDeserialize -> - failwith - "%s cannot be parsed. To fix it, take inspiration from a valid file, \ - like this one :%s" - config_file - example_config - | Invalid msg -> failwith "%s" msg - | Valid config_from_file -> return config_from_file - -(** [get_runtime] unions the arguments coming from the config file - and the command line, and translates the result to - a value of type [Proxy_server_config.runtime]. *) -let get_runtime config_from_file config_args = - let open Lwt_result_syntax in - let open Proxy_server_config in - let config = - match config_from_file with - | None -> - (* No config file: all data comes from command line arguments *) - config_args - | Some config_from_file -> - (* Config file specified: override it with command line arguments *) - Proxy_server_config.union_right_bias config_from_file config_args - in - match to_runtime config with - | Error msg -> failwith "%s" msg - | Ok runtime -> return runtime - -let main_promise (config_file : string option) - (config_args : Proxy_server_config.t) (log_requests : bool) : - int tzresult Lwt.t = - let open Lwt_result_syntax in - let* (config_from_file : Proxy_server_config.t option) = - Option.map_es load_config_from_file config_file - in - let open Proxy_server_config in - let* { - endpoint; - rpc_server_address; - rpc_server_port; - rpc_server_tls; - sym_block_caching_time; - data_dir = data_dir_opt; - } = - get_runtime config_from_file config_args - in - let open Tezos_rpc_http in - let open Tezos_rpc_http_client_unix in - let logger = - if log_requests then RPC_client_unix.full_logger Format.err_formatter - else RPC_client_unix.null_logger - in - let rpc_config : RPC_client_unix.config = - {media_type = Media_type.Command_line.Any; endpoint; logger} - in - let printer = - let logger channel msg : unit Lwt.t = - if channel = "stderr" then - let*! () = Lwt_io.eprintf "%s" msg in - Lwt_io.(flush stderr) - else - let*! () = Lwt_io.printf "%s" msg in - Lwt_io.(flush stdout) - in - new Tezos_client_base.Client_context.simple_printer logger - in - let http_ctxt = - new RPC_client_unix.http_ctxt rpc_config Media_type.all_media_types - in - (* This should probably be extracted into Lwt_result or similar. *) - let lift_lwt (a : 'a Lwt.t) : 'a tzresult Lwt.t = - let*! r = a in - return r - in - (* The context index, which we try to read if and only if the --data-dir *) - (* argument has been passed. *) - let* (context_index : Tezos_context.Context.index option) = - Option.map_es - (fun data_dir -> - let context_path = Filename.concat data_dir "context" in - Lwt.catch - (fun () -> - lift_lwt - (Tezos_shell_context.Proxy_delegate_maker.make_index - ~context_path)) - (function - | Index_unix.Private.Raw.Not_written -> - failwith - "error reading data-dir: %s is not a valid context directory" - context_path - | Unix.Unix_error (Unix.EBADF, _, _) -> - failwith - "error reading data-dir: %s does not exist" - context_path - | e -> - failwith - "unexpected error %s while reading context directory %s" - (Printexc.to_string e) - context_path)) - data_dir_opt - in - (* Now we build the function that the proxy server can use to build a proxy - delegate later, using [Tezos_shell_context.Proxy_delegate_maker.*] functions. - This lets it not depend directly on [Tezos_shell_context]: if it did, it - would break compilation of octez-client to JavaScript. *) - let on_disk_proxy_builder = - Option.map - (fun index ctx_hash -> - (* Sync first so we don't observe a stale state. *) - let*! () = Tezos_context.Context.sync index in - Tezos_shell_context.Proxy_delegate_maker.of_index ~index ctx_hash) - context_index - in - let dir = - let sleep = Lwt_unix.sleep in - Tezos_proxy.Proxy_services.build_directory - printer - http_ctxt - (Tezos_proxy.Proxy_services.Proxy_server - {sleep; sym_block_caching_time; on_disk_proxy_builder}) - None - in - let server_args : Proxy_server_main_run.args = - { - address = rpc_server_address; - port = rpc_server_port; - tls_cert_and_key = rpc_server_tls; - forwarding_endpoint = endpoint; - } - in - Proxy_server_main_run.run dir server_args - -let main (config_file : string option) (log_requests : bool) - (endpoint : string option) (rpc_addr : string option) - (rpc_tls : string option) (sym_block_caching_time : Ptime.span option) - (data_dir : string option) = - let config_args = - Proxy_server_config.make - ~endpoint:(Option.map Uri.of_string endpoint) - ~rpc_addr:(Option.map Uri.of_string rpc_addr) - ~rpc_tls - ~sym_block_caching_time - ~data_dir - in - Lwt_main.run - (let open Lwt_syntax in - let* r = - Lwt_exit.wrap_and_error - @@ main_promise config_file config_args log_requests - in - match r with - | Ok (Ok _) -> - let+ _ = Lwt_exit.exit_and_wait 0 in - `Ok () - | Ok (Error err) -> - let+ _ = Lwt_exit.exit_and_wait 2 in - `Error (false, Format.asprintf "%a" pp_print_trace err) - | Error exit_status -> - Lwt.return (`Error (false, Format.asprintf "Exited %d" exit_status))) - -let term : unit Term.t = - Term.( - ret - (const main $ config $ log_requests $ endpoint $ rpc_addr $ rpc_tls - $ sym_block_caching_time $ data_dir)) - -let info = - let doc = "Launches a server that is a readonly frontend to a Tezos node" in - let man = - [ - `S Manpage.s_bugs; - `P "Report issues to https://gitlab.com/tezos/tezos/-/issues"; - ] - in - let version = Tezos_version_value.Bin_version.octez_version_string in - Cmd.info name ~version ~doc ~exits:Cmd.Exit.defaults ~man - -let () = exit (Cmd.eval (Cmd.v info term)) diff --git a/src/bin_proxy_server/proxy_server_main_run.ml b/src/bin_proxy_server/proxy_server_main_run.ml deleted file mode 100644 index c4ed9772bede..000000000000 --- a/src/bin_proxy_server/proxy_server_main_run.ml +++ /dev/null @@ -1,113 +0,0 @@ -(*****************************************************************************) -(* *) -(* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2021 Nomadic Labs, <contact@nomadic-labs.com> *) -(* Copyright (c) 2024 TriliTech <contact@trili.tech> *) -(* *) -(*****************************************************************************) - -module Events = Proxy_server_run_events - -type error += Proxy_server_RPC_Port_already_in_use of P2p_point.Id.t list - -type args = { - address : P2p_addr.t; - port : int; - tls_cert_and_key : (string * string) option; - forwarding_endpoint : Uri.t; -} - -let () = - register_error_kind - `Permanent - ~id:"main.run.port_already_in_use" - ~title:"Cannot start proxy server: RPC port already in use" - ~description:"Another process is running on the same RPC port." - ~pp:(fun ppf addrlist -> - Format.fprintf - ppf - "Another process is probably running on one of these addresses (%a). \ - Please choose another RPC port." - (Format.pp_print_list P2p_point.Id.pp) - addrlist) - Data_encoding.(obj1 (req "addrlist" (list P2p_point.Id.encoding))) - (function - | Proxy_server_RPC_Port_already_in_use addrlist -> Some addrlist - | _ -> None) - (fun addrlist -> Proxy_server_RPC_Port_already_in_use addrlist) - -let launch_rpc_server dir {address; port; tls_cert_and_key; forwarding_endpoint} - = - let open Lwt_result_syntax in - let host = Ipaddr.V6.to_string address in - let mode = - match tls_cert_and_key with - | None -> `TCP (`Port port) - | Some (cert, key) -> - `TLS (`Crt_file_path cert, `Key_file_path key, `No_password, `Port port) - in - let server = - Tezos_rpc_http_server.RPC_server.init_server - dir - ~media_types:Tezos_rpc_http.Media_type.all_media_types - in - let forwarder_resources = - Tezos_rpc_http_server.RPC_middleware.init_forwarder () - in - let middleware = - Tezos_rpc_http_server.RPC_middleware.proxy_server_query_forwarder - forwarder_resources - forwarding_endpoint - in - let callback conn req body = - let*! () = - Events.(emit accepted_conn_proxy_server) - (Int32.of_int (Unix.getpid ()), Cohttp.Connection.to_string (snd conn)) - in - let callback_fn = Tezos_rpc_http_server.RPC_server.resto_callback server in - middleware callback_fn conn req body - in - Lwt.catch - (fun () -> - let*! () = - Tezos_rpc_http_server.RPC_server.launch - ~host - server - ~callback - ~conn_closed:(fun (_, con) -> - Events.(emit__dont_wait__use_with_care conn_closed_proxy_server) - (Int32.of_int (Unix.getpid ()), Cohttp.Connection.to_string con)) - mode - in - Lwt.return_ok server) - (function - | Unix.Unix_error (EADDRINUSE, "bind", "") -> - tzfail (Proxy_server_RPC_Port_already_in_use [(address, port)]) - | exn -> fail_with_exn exn) - -let run dir ({address; port; _} as args) = - let open Lwt_result_syntax in - let*! () = Tezos_base_unix.Internal_event_unix.init () in - let node_downer = - Lwt_exit.register_clean_up_callback ~loc:__LOC__ (fun _ -> - Events.(emit shutting_down_proxy_server) ()) - in - let* rpc = launch_rpc_server dir args in - let rpc_downer = - Lwt_exit.register_clean_up_callback - ~loc:__LOC__ - ~after:[node_downer] - (fun _ -> - let*! () = Events.(emit shutting_down_rpc_server) () in - Tezos_rpc_http_server.RPC_server.shutdown rpc) - in - let*! () = - Events.(emit starting_rpc_server) (P2p_addr.to_string address, port) - in - let _ = - Lwt_exit.register_clean_up_callback - ~loc:__LOC__ - ~after:[rpc_downer] - (fun _exit_status -> Tezos_base_unix.Internal_event_unix.close ()) - in - Lwt_utils.never_ending () diff --git a/src/bin_proxy_server/proxy_server_main_run.mli b/src/bin_proxy_server/proxy_server_main_run.mli deleted file mode 100644 index e39b7feb57ea..000000000000 --- a/src/bin_proxy_server/proxy_server_main_run.mli +++ /dev/null @@ -1,37 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs, <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Configuration of the server spawned by [run] *) -type args = { - address : P2p_addr.t; (** The address of the server *) - port : int; (** The port of the server *) - tls_cert_and_key : (string * string) option; - (** The paths to the certificate and the key to use for TLS *) - forwarding_endpoint : Uri.t; - (** The endpoint of the main node to forward unsupported requests to *) -} - -(** [run dir args] launches a server honoring [dir], configured by [args] *) -val run : unit Tezos_rpc.Directory.t -> args -> 'a tzresult Lwt.t diff --git a/src/bin_proxy_server/proxy_server_run_events.ml b/src/bin_proxy_server/proxy_server_run_events.ml deleted file mode 100644 index 60fb966506a5..000000000000 --- a/src/bin_proxy_server/proxy_server_run_events.ml +++ /dev/null @@ -1,54 +0,0 @@ -(*****************************************************************************) -(* *) -(* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2021 Nomadic Labs, <contact@nomadic-labs.com> *) -(* Copyright (c) 2024 TriliTech <contact@trili.tech> *) -(* *) -(*****************************************************************************) - -include Internal_event.Simple - -let section = ["proxy_server_run"] - -let starting_rpc_server = - declare_2 - ~section - ~name:"starting_proxy_rpc_server" - ~msg:"starting proxy RPC server on {host}:{port}" - ~level:Notice - ("host", Data_encoding.string) - ("port", Data_encoding.uint16) - -let shutting_down_proxy_server = - declare_0 - ~section - ~name:"shutting_down_proxy_server" - ~msg:"shutting down the proxy server" - ~level:Notice - () - -let shutting_down_rpc_server = - declare_0 - ~section - ~name:"shutting_down_rpc_server" - ~msg:"shutting down the proxy RPC server" - ~level:Notice - () - -let accepted_conn_proxy_server = - declare_2 - ~section - ~name:"accepted_conn" - ~msg:"[pid:{pid}] ({con}) accepted connection at proxy server" - ~level:Debug - ("pid", Data_encoding.int32) - ("con", Data_encoding.string) - -let conn_closed_proxy_server = - declare_2 - ~section - ~name:"conn_closed" - ~msg:"[pid:{pid}] ({con}) got connection closed at proxy server" - ~level:Debug - ("pid", Data_encoding.int32) - ("con", Data_encoding.string) diff --git a/src/lib_octogram/tezos.ml b/src/lib_octogram/tezos.ml index 397c6133bea3..98a0891b3a93 100644 --- a/src/lib_octogram/tezos.ml +++ b/src/lib_octogram/tezos.ml @@ -200,9 +200,6 @@ let wait_for_l1_level_on_endpoint target_level endpoint = let wait_for_l1_level cli_endpoint level = match cli_endpoint with | Client.Node node -> Node.wait_for_level node level - | Client.Proxy_server proxy_server -> - Proxy_server.as_rpc_endpoint proxy_server - |> wait_for_l1_level_on_endpoint level | Client.Foreign_endpoint endpoint -> wait_for_l1_level_on_endpoint level endpoint @@ -3063,8 +3060,6 @@ module Start_octez_baker = struct Lwt.return (node_data_dir, fe) | None, Client.Node node -> Lwt.return (Node.data_dir node, Node.as_rpc_endpoint node) - | _, Client.Proxy_server _ -> - Test.fail "Proxy_server not supported as a Node endpoint for baking" | Some _, Client.Node _ -> Test.fail "Should not provide both a node data dir and an 'owned' node" diff --git a/src/lib_proxy_server_config/dune b/src/lib_proxy_server_config/dune deleted file mode 100644 index 70c723b128cf..000000000000 --- a/src/lib_proxy_server_config/dune +++ /dev/null @@ -1,14 +0,0 @@ -; This file was automatically generated, do not edit. -; Edit file manifest/main.ml instead. - -(library - (name tezos_proxy_server_config) - (public_name tezos-proxy-server-config) - (instrumentation (backend bisect_ppx)) - (libraries - octez-libs.base - octez-libs.stdlib-unix - uri) - (flags - (:standard) - -open Tezos_base.TzPervasives)) diff --git a/src/lib_proxy_server_config/proxy_server_config.ml b/src/lib_proxy_server_config/proxy_server_config.ml deleted file mode 100644 index 1bf20b15092e..000000000000 --- a/src/lib_proxy_server_config/proxy_server_config.ml +++ /dev/null @@ -1,212 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs. <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -type t = { - endpoint : Uri.t option; - rpc_addr : Uri.t option; - rpc_tls : string option; - sym_block_caching_time : Ptime.span option; - data_dir : string option; -} - -let pp ppf {endpoint; rpc_addr; rpc_tls; sym_block_caching_time; data_dir} = - let pp_uri_opt = Format.pp_print_option Uri.pp in - Format.fprintf - ppf - "@[<v>endpoint=%a@,\ - rpc_addr=%a@,\ - rpc_tls=%a@,\ - sym_block_caching_time=%a@,\ - data_dir=%a@]" - pp_uri_opt - endpoint - pp_uri_opt - rpc_addr - (Format.pp_print_option Format.pp_print_string) - rpc_tls - (Format.pp_print_option Ptime.Span.pp) - sym_block_caching_time - (Format.pp_print_option Format.pp_print_string) - data_dir - -let example_config = - {|{"endpoint": "http://127.0.0.1:18731", "rpc_addr": "http://127.0.0.1:18732", "sym_block_caching_time": 60}|} - -let encoding : t Data_encoding.t = - let open Data_encoding in - let of_span s = Option.bind s Ptime.Span.to_int_s in - conv - (fun t -> - ( Option.map Uri.to_string t.endpoint, - Option.map Uri.to_string t.rpc_addr, - t.rpc_tls, - Option.map Int32.of_int @@ of_span t.sym_block_caching_time, - t.data_dir )) - (fun (endpoint, rpc_addr, rpc_tls, sym_block_caching_time, data_dir) -> - { - endpoint = Option.map Uri.of_string endpoint; - rpc_addr = Option.map Uri.of_string rpc_addr; - rpc_tls; - sym_block_caching_time = - Option.map - (fun x -> Ptime.Span.of_int_s @@ Int32.to_int x) - sym_block_caching_time; - data_dir; - }) - (obj5 - (opt "endpoint" string) - (opt "rpc_addr" string) - (opt "rpc_tls" string) - (opt "sym_block_caching_time" int32) - (opt "data_dir" string)) - -let make ~endpoint ~rpc_addr ~rpc_tls ~sym_block_caching_time ~data_dir : t = - {endpoint; rpc_addr; rpc_tls; sym_block_caching_time; data_dir} - -let sym_block_caching_time_error sym_block_caching_time = - match sym_block_caching_time with - | Some sym_block_caching_time - when Ptime.Span.(compare sym_block_caching_time zero <= 0) -> - Some - (Format.asprintf - {|--sym-block-caching-time argument and sym_block_caching_time field must be strictly positive, but found %a|} - Ptime.Span.pp - sym_block_caching_time) - | _ -> None - -type 'a destructed = Valid of 'a | Invalid of string | CannotDeserialize - -let destruct_config json = - match Data_encoding.Json.destruct encoding json with - | cfg -> ( - match sym_block_caching_time_error cfg.sym_block_caching_time with - | Some err -> Invalid err - | None -> Valid cfg) - | exception _ -> CannotDeserialize - -let union_right_bias (t1 : t) (t2 : t) = - { - endpoint = Option.either t2.endpoint t1.endpoint; - rpc_addr = Option.either t2.rpc_addr t1.rpc_addr; - rpc_tls = Option.either t2.rpc_tls t1.rpc_tls; - sym_block_caching_time = - Option.either t2.sym_block_caching_time t1.sym_block_caching_time; - data_dir = Option.either t2.data_dir t1.data_dir; - } - -type runtime = { - endpoint : Uri.t; - rpc_server_address : P2p_addr.t; - rpc_server_port : int; - rpc_server_tls : (string * string) option; - sym_block_caching_time : Ptime.span option; - data_dir : string option; -} - -(** Given the value of the [--rpc-addr] argument (or the [rpc_addr] CONFIG field), - return the address and the port of the server that should be spawned. *) -let address_and_port_for_runtime rpc_addr = - let open Result in - let wrong_rpc_addr looked_for = - error - @@ Format.asprintf - {|Wrong "--rpc-addr" argument or "rpc_addr" field: %a. %s cannot be determined|} - Uri.pp - rpc_addr - looked_for - in - match (Uri.host rpc_addr, Uri.port rpc_addr) with - | None, _ -> wrong_rpc_addr "Hostname" - | _, None -> wrong_rpc_addr "Port" - | Some rpc_server_address, Some rpc_server_port -> ( - match P2p_addr.of_string_opt rpc_server_address with - | Some rpc_server_address -> Ok (rpc_server_address, rpc_server_port) - | None -> - error - @@ Format.asprintf - {|Cannot convert hostname of "--rpc-addr" argument or "rpc_addr" field to P2p_addr: %s|} - rpc_server_address) - -(** Given the value of the [--rpc-tls] argument (or the [rpc_tls] CONFIG field), - return the paths to the certificate and the key for use by TLS *) -let tls_for_runtime = - let open Result in - let regexp_str = "(.*),(.*)" in - let regexp = Re.compile (Re.Perl.re regexp_str) in - fun rpc_tls -> - match Re.exec_opt regexp rpc_tls with - | None -> - error - @@ Format.asprintf - {|Value of "--rpc-tls" argument or "rpc_tls" field cannot be parsed: %s doesn't match regexp %s|} - rpc_tls - regexp_str - | Some group -> ok (Re.Group.get group 1, Re.Group.get group 2) - -(** Helper to lift a validation function [f : 'a -> ('b * _) result] over - an optional value. *) -let opt_res_to_res_opt = function - | None -> - (* No data to validate: no error, no data. *) - Ok None - | Some (Ok x) -> - (* Data was successfully validated: no error, some data. *) - Ok (Some x) - | Some (Error x) -> - (* Data could not be successfully validated: an error and no data *) - Error x - -let to_runtime - ({endpoint; rpc_addr; rpc_tls; sym_block_caching_time; data_dir} : t) : - (runtime, string) result = - (* Validating sym_block_caching_time is required if it was specified - on the command line. In this case it wasn't validated yet. *) - let open Result_syntax in - match - (endpoint, rpc_addr, sym_block_caching_time_error sym_block_caching_time) - with - | None, _, _ -> - fail - {|Endpoint not specified: pass argument --endpoint or specify "endpoint" field in CONFIG file|} - | _, None, _ -> - fail - {|RPC address not specified: pass argument --rpc-addr or specify "rpc_addr" field in CONFIG file|} - | _, _, Some err -> fail err - | Some endpoint, Some rpc_addr, None -> - let* rpc_server_address, rpc_server_port = - address_and_port_for_runtime rpc_addr - in - let* rpc_server_tls = - Option.map tls_for_runtime rpc_tls |> opt_res_to_res_opt - in - Ok - { - endpoint; - rpc_server_address; - rpc_server_port; - rpc_server_tls; - sym_block_caching_time; - data_dir; - } diff --git a/src/lib_proxy_server_config/proxy_server_config.mli b/src/lib_proxy_server_config/proxy_server_config.mli deleted file mode 100644 index 6466da1b8bc1..000000000000 --- a/src/lib_proxy_server_config/proxy_server_config.mli +++ /dev/null @@ -1,111 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs. <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** This type corresponds to the content of the [CONFIG] file, as - well as the aggregations of the corresponding command line arguments. - Once it is built and, it is transformed into a value of type - [runtime] which represents what the APIs actually needs. *) -type t = private { - endpoint : Uri.t option; - (** The node to delegate RPCs to. Name was chosen - to be the same as in [octez-client] *) - rpc_addr : Uri.t option; - (** The address that the proxy server serves. Name - was chosen to be the same as in [octez-node run] *) - rpc_tls : string option; - (** A string of the form ["crt,key"] where [crt] is the path - to the TLS certificate to use and [key] is the path to the key - to use. Name was chosen to be the same as in [octez-node run] *) - sym_block_caching_time : Ptime.span option; - (** The time during which data for a symbolic block identifier - (like [head], [head~1]) is kept. Smaller values increase [endpoint]'s - load but yield more up-to-date to clients. Higher values - decrease [endpoint]'s load but make clients observe slightly deprecated - values. If omitted, defaulted to [time_between_blocks]. - - If you are not sure what to do, do not specify it; i.e. - do not pass [--sym-block-caching-time]. If your node's load - is too high, pass a bigger value than [time_between_blocks] (if - your clients are fine seeing slightly deprecated values) *) - data_dir : string option; - (** Path to the data-dir of a running octez-node. If specified, we use - the [context] subdirectory to obtain data instead of using the - [../raw/bytes] RPC call (hereby reducing the node's IO). *) -} - -(** Pretty printer for [t] *) -val pp : Format.formatter -> t -> unit - -(** A value of type [t] after having been appropriately validated and - prepared for being passed to the various APIs that need them - (hence some types are slightly different than in [t]). *) -type runtime = private { - endpoint : Uri.t; (** The node to delegate RPCs to. *) - rpc_server_address : P2p_addr.t; (** The address of the server *) - rpc_server_port : int; (** The port of the server *) - rpc_server_tls : (string * string) option; - (** The paths to the certificate and key to use for TLS *) - sym_block_caching_time : Ptime.span option; - (** The duration during which data of symbolic blocks is kept *) - data_dir : string option; - (** Path to the data-dir of a running octez-node. If specified, we use - the [context] subdirectory to obtain data instead of using the - [../raw/bytes] RPC call (hereby reducing the node's IO). *) -} - -(** [make endpoint rpc_addr rpc_tls sym_block_caching_time] - creates an instance of [t] from the flags that are available - on the command line. See [t] for the documentation of parameters. *) -val make : - endpoint:Uri.t option -> - rpc_addr:Uri.t option -> - rpc_tls:string option -> - sym_block_caching_time:Ptime.span option -> - data_dir:string option -> - t - -(** Valid config file: if passed to [destruct_config], [Valid] is returned. *) -val example_config : string - -(** Encoding of what may happen when deserializing a JSON value - whose OCaml type is ['a] *) -type 'a destructed = - | Valid of 'a (** File could be parsed and validated *) - | Invalid of string - (** File could be parsed but not validated. Message is detailed. *) - | CannotDeserialize (** Deserializing the JSON failed. *) - -(** [destruct_config json] returns a [t] from raw [json]. - Returns [Ok] in case of success, or [Error msg] if validation fails. *) -val destruct_config : Data_encoding.json -> t destructed - -(** [merge_right_bias t1 t2] returns the union of data of [t1] and [t2] - (taking the [Some] case on fields of type [option]). If data is - present on both side, take data from [t2] *) -val union_right_bias : t -> t -> t - -(** [to_runtime t] returns a [runtime] from a [t]. - Returns [Ok] in case of success, or [Error msg] if validation fails. *) -val to_runtime : t -> (runtime, string) result diff --git a/src/lib_proxy_server_config/test/dune b/src/lib_proxy_server_config/test/dune deleted file mode 100644 index 1e325525cff4..000000000000 --- a/src/lib_proxy_server_config/test/dune +++ /dev/null @@ -1,42 +0,0 @@ -; This file was automatically generated, do not edit. -; Edit file manifest/main.ml instead. - -(library - (name src_lib_proxy_server_config_test_tezt_lib) - (instrumentation (backend bisect_ppx)) - (libraries - tezt.core - octez-libs.base - octez-libs.base.unix - tezos-proxy-server-config - octez-libs.test-helpers - qcheck-alcotest - octez-alcotezt - uri) - (library_flags (:standard -linkall)) - (flags - (:standard) - -open Tezt_core - -open Tezt_core.Base - -open Tezos_base.TzPervasives - -open Tezos_test_helpers - -open Octez_alcotezt) - (modules test_proxy_server_config)) - -(executable - (name main) - (instrumentation (backend bisect_ppx --bisect-sigterm)) - (libraries - src_lib_proxy_server_config_test_tezt_lib - tezt) - (modules main)) - -(rule - (alias runtest) - (package tezos-proxy-server-config) - (enabled_if (<> false %{env:RUNTEZTALIAS=true})) - (action (run %{dep:./main.exe} /flaky /ci_disabled))) - -(rule - (targets main.ml) - (action (with-stdout-to %{targets} (echo "let () = Tezt.Test.run ()")))) diff --git a/src/lib_proxy_server_config/test/test_proxy_server_config.ml b/src/lib_proxy_server_config/test/test_proxy_server_config.ml deleted file mode 100644 index 493dfafd6d19..000000000000 --- a/src/lib_proxy_server_config/test/test_proxy_server_config.ml +++ /dev/null @@ -1,351 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - - ------- - Component: Client - Invocation: dune exec src/lib_proxy_server_config/test/main.exe \ - -- --file test_proxy_server_config.ml - Description: Test various functions and types regarding the configuration - of [tezos-proxy-server] -*) - -open Tezos_proxy_server_config - -(** Lift a generator of ['a] to ['a option] by always creating [Some] values *) -let to_some gen = QCheck2.Gen.(map Option.some gen) - -(** A generator that generates valid values for the [rpc_addr] field *) -let rpc_addr_gen = - let open QCheck2.Gen in - let octet = 0 -- 255 in - (fun i j k l port -> - let host = - Format.sprintf - "%s" - (String.concat "." @@ List.map Int.to_string [i; j; k; l]) - in - let str = Format.sprintf "http://%s:%d" host port in - Uri.of_string str) - <$> octet <*> octet <*> octet <*> octet <*> 1 -- 32768 - -let path_gen = - let open QCheck2.Gen in - (* Generate something that looks like a Unix path *) - let* size = 1 -- 8 in - let+ s = list_repeat size (string_size ~gen:(char_range 'a' 'z') (1 -- 8)) in - String.concat "/" ("" :: s) - -(** A generator that generates valid values for the [rpc_tls] field *) -let rpc_tls_gen = - QCheck2.Gen.( - let+ cert, key = pair path_gen path_gen in - cert ^ "," ^ key) - -(** A generator that generates valid values for the - [sym_block_caching_time] field *) -let sym_block_caching_time_gen = QCheck2.Gen.(Ptime.Span.of_int_s <$> 1 -- 256) - -(** A generator that generates random strings for the - [data_dir_gen] field. This is still useful, since we are only - checking command-line option handling here. *) -let data_dir_gen = path_gen - -(** A generator for [Proxy_server_config.t] that is parameterized - by the subgenerators *) -let proxy_server_config_gen endpoint_gen rpc_addr_gen rpc_tls_gen - sym_block_caching_time_gen data_dir_gen = - QCheck2.Gen.( - let* endpoint = endpoint_gen in - let* rpc_addr = rpc_addr_gen in - let* rpc_tls = rpc_tls_gen in - let* sym_block_caching_time = sym_block_caching_time_gen in - let+ data_dir = data_dir_gen in - Proxy_server_config.make - ~endpoint - ~rpc_addr - ~rpc_tls - ~sym_block_caching_time - ~data_dir) - -(** A printer for [Proxy_server_config.t], to provide to [QCheck2.Test.make] calls *) -let print_config config = Format.asprintf "%a" Proxy_server_config.pp config - -(** A printer for pairs of [Proxy_server_config.t], to provide to [QCheck2.Test.make] calls *) -let print_configs (cfg1, cfg2) = - Format.asprintf - "(%a, %a)" - Proxy_server_config.pp - cfg1 - Proxy_server_config.pp - cfg2 - -module UnionRightBias = struct - let gen = - QCheck2.Gen.( - proxy_server_config_gen - (opt Qcheck2_helpers.endpoint_gen) - (opt Qcheck2_helpers.endpoint_gen) - (opt rpc_tls_gen) - (opt sym_block_caching_time_gen) - (opt data_dir_gen)) - - let reflexive = - QCheck2.Test.make ~name:"[union_right_bias t t] = t" ~print:print_config gen - @@ fun expected -> - Qcheck2_helpers.qcheck_eq' - ~pp:Proxy_server_config.pp - ~expected - ~actual:Proxy_server_config.(union_right_bias expected expected) - () - - let right_bias = - QCheck2.Test.make - ~name:"[union_right_bias] is right biased" - ~print:print_configs - QCheck2.Gen.(pair gen gen) - @@ fun (config1, config2) -> - let union = Proxy_server_config.union_right_bias config1 config2 in - let right opt1 opt2 = - match (opt1, opt2) with _, Some _ -> opt2 | _ -> opt1 - in - let endpoint ({endpoint = x; _} : Proxy_server_config.t) = x in - let rpc_addr ({rpc_addr = x; _} : Proxy_server_config.t) = x in - let rpc_tls ({rpc_tls = x; _} : Proxy_server_config.t) = x in - let sym_block_caching_time - ({sym_block_caching_time = x; _} : Proxy_server_config.t) = - x - in - let data_dir ({data_dir = x; _} : Proxy_server_config.t) = x in - let check_field f = - Qcheck2_helpers.qcheck_eq (right (f config1) (f config2)) (f union) - in - check_field endpoint && check_field rpc_addr && check_field rpc_tls - && check_field sym_block_caching_time - && check_field data_dir - - let associative = - QCheck2.Test.make - ~name: - "union_right_bias t1 (union_right_bias t2 t3) = union_right_bias \ - (union_right_bias t1 t2) t3" - ~print:(fun (cfg1, cfg2, cfg3) -> - Format.asprintf - "(%a, %a, %a)" - Proxy_server_config.pp - cfg1 - Proxy_server_config.pp - cfg2 - Proxy_server_config.pp - cfg3) - QCheck2.Gen.(triple gen gen gen) - @@ fun (cfg1, cfg2, cfg3) -> - let open Proxy_server_config in - let left = union_right_bias cfg1 (union_right_bias cfg2 cfg3) in - let right = union_right_bias (union_right_bias cfg1 cfg2) cfg3 in - Qcheck2_helpers.qcheck_eq ~pp:Proxy_server_config.pp left right - - (** Helper for doing generic operations over fields of values of - [Proxy_server_config.t] *) - type field = Field : 'a option -> field - - let fields (t : Proxy_server_config.t) = - [ - Field t.endpoint; - Field t.rpc_addr; - Field t.rpc_tls; - Field t.sym_block_caching_time; - Field t.data_dir; - ] - - let common_some t1 t2 = - let combination = Stdlib.List.combine (fields t1) (fields t2) in - List.exists - (fun (Field v1, Field v2) -> Option.(is_some v1 && is_some v2)) - combination - - let disjoint_commutative = - QCheck2.Test.make - ~name: - "t1 and t2 do not have a common Some ==> [union_right_bias t1 t2] = \ - [union_right_bias t2 t1]" - ~print:print_configs - QCheck2.Gen.(pair gen gen) - @@ fun (cfg1, cfg2) -> - let open Proxy_server_config in - QCheck2.assume @@ not @@ common_some cfg1 cfg2 ; - Qcheck2_helpers.qcheck_eq - (union_right_bias cfg1 cfg2) - (union_right_bias cfg2 cfg1) -end - -let test_example () = - let fail msg_opt = - let suffix = - Option.fold - ~none:", but an unknown error happened" - ~some:(fun msg -> ", but received error: " ^ msg) - msg_opt - in - QCheck2.Test.fail_reportf - "[example_config] should be parseable and validated%s." - suffix - in - let json = - Data_encoding.Json.from_string Proxy_server_config.example_config - in - match json with - | Error msg -> fail (Some msg) - | Ok json -> ( - match Proxy_server_config.destruct_config json with - | Proxy_server_config.Valid _ -> () - | Proxy_server_config.Invalid msg -> fail (Some msg) - | Proxy_server_config.CannotDeserialize -> fail None) - -(** This generator is such that [Proxy_server_config.to_runtime] - succeeds on generated values (if optional argument are left - to their defaults), as tested in [test_good_gen_to_runtime_ok] below. - It acts both as: - - - a test of the subgenerators (in particular [Qcheck2_helpers.endpoint_gen]) - - a specification of [to_runtime]. *) -let good_proxy_server_config_gen - ?(sym_block_caching_time_gen = QCheck2.Gen.(opt sym_block_caching_time_gen)) - () = - proxy_server_config_gen - (* [endpoint] is required *) - (to_some @@ Qcheck2_helpers.endpoint_gen) - (* [rpc-addr] is required *) - (to_some rpc_addr_gen) - QCheck2.Gen.(opt rpc_tls_gen) - sym_block_caching_time_gen - QCheck2.Gen.(opt data_dir_gen) - -let test_good_gen_to_runtime_ok = - QCheck2.Test.make - ~name:"[to_runtime] returns [Ok] on expected values" - ~print:print_config - (good_proxy_server_config_gen ()) - @@ fun config -> - match Proxy_server_config.to_runtime config with - | Ok _ -> true - | Error msg -> - QCheck2.Test.fail_reportf - "Expected [to_runtime] to succeed, but it failed as follows: %s." - msg - -let test_union_preserves_to_runtime_ok = - let gen = good_proxy_server_config_gen () in - let to_runtime_is_ok config = - Proxy_server_config.to_runtime config |> Result.is_ok - in - QCheck2.Test.make - ~name:"[union_right_bias] preserves [Result.is_ok to_runtime]" - ~print:print_configs - QCheck2.Gen.(pair gen gen) - @@ fun (config1, config2) -> - (* These asserts must hold by [test_good_gen_to_runtime_ok] *) - assert (to_runtime_is_ok config1) ; - assert (to_runtime_is_ok config2) ; - let union = Proxy_server_config.union_right_bias config1 config2 in - Qcheck2_helpers.qcheck_eq' - ~pp:Format.pp_print_bool - ~expected:true - ~actual:(to_runtime_is_ok union) - () - -let test_to_runtime_err_implies_union_to_runtime_err = - let url_gen = Qcheck2_helpers.endpoint_gen in - let gen = - let open QCheck2.Gen in - (* For this test we wanna have both valid configs and invalid ones *) - let rpc_addr_gen = oneof [rpc_addr_gen; url_gen] in - let rpc_tls_gen = oneof [string; rpc_tls_gen] in - proxy_server_config_gen - (opt url_gen) - (opt rpc_addr_gen) - (opt rpc_tls_gen) - (opt (Ptime.Span.of_int_s <$> int)) - (opt data_dir_gen) - in - let to_runtime_is_err config = - Proxy_server_config.to_runtime config |> Result.is_error - in - QCheck2.Test.make - ~name: - "[Result.is_err to_runtime (union_right_bias conf1 conf2)] ==> \ - [Result.is_err to_runtime conf1 || Result.is_err to_runtime conf2]" - ~print:print_configs - QCheck2.Gen.(pair gen gen) - @@ fun (config1, config2) -> - let union = Proxy_server_config.union_right_bias config1 config2 in - QCheck2.assume @@ to_runtime_is_err union ; - Qcheck2_helpers.qcheck_eq' - ~pp:Format.pp_print_bool - ~expected:true - ~actual:(to_runtime_is_err config1 || to_runtime_is_err config2) - () - -let test_wrong_sym_block_caching_time = - let sym_block_caching_time_gen = - (* generate negative times: *) - to_some QCheck2.Gen.(Ptime.Span.of_int_s <$> neg_int) - in - QCheck2.Test.make - ~name:"if [sym_block_caching_time] is <= 0, then [to_runtime] fails" - ~print:print_config - (good_proxy_server_config_gen ~sym_block_caching_time_gen ()) - @@ fun config -> - match Proxy_server_config.to_runtime config with - | Ok _ -> - QCheck2.Test.fail_report "Expected [to_runtime] to fail, but it succeeded" - | Error _ -> true - -let () = - Alcotest.run - ~__FILE__ - "Proxy_server_config" - [ - ( "union_right_bias", - Qcheck2_helpers.qcheck_wrap - UnionRightBias. - [reflexive; right_bias; associative; disjoint_commutative] ); - ( "example", - [ - Alcotest.test_case - "[example_config] is successfully parsed and validated" - `Quick - test_example; - ] ); - ( "to_runtime", - Qcheck2_helpers.qcheck_wrap - [ - test_good_gen_to_runtime_ok; - test_wrong_sym_block_caching_time; - test_union_preserves_to_runtime_ok; - test_to_runtime_err_implies_union_to_runtime_err; - ] ); - ] diff --git a/tezt/tests/dune b/tezt/tests/dune index 75a332f74d43..eba143a8de80 100644 --- a/tezt/tests/dune +++ b/tezt/tests/dune @@ -85,7 +85,6 @@ src_lib_rpc_http_test_tezt_lib src_lib_riscv_pvm_test_tezt_lib src_lib_requester_test_tezt_lib - src_lib_proxy_server_config_test_tezt_lib src_lib_proxy_test_helpers_shell_services_test_tezt_lib src_lib_proxy_test_tezt_lib src_lib_protocol_environment_test_shell_context_tezt_lib -- GitLab From 92f27333a45504c5ed011d7e131969e767e8f801 Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Wed, 7 Aug 2024 14:52:36 +0200 Subject: [PATCH 3/8] Doc: remove proxy-server --- docs/CHANGES.rst | 3 - docs/Makefile | 2 - docs/introduction/howtouse.rst | 1 - docs/releases/version-10.rst | 3 +- docs/shell/cli-commands.rst | 9 - docs/user/proxy-server.rst | 305 --------------------------------- docs/user/setup-node.rst | 6 - 7 files changed, 1 insertion(+), 328 deletions(-) delete mode 100644 docs/user/proxy-server.rst diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst index 36a801a738c3..bdf091adf079 100644 --- a/docs/CHANGES.rst +++ b/docs/CHANGES.rst @@ -2842,9 +2842,6 @@ Proxy server up the protocol from the backing node when it starts. Proxy servers can be started and destroyed at will, making them easy to deploy. - Please refer to the :doc:`online documentation <user/proxy-server>` - for further details. - Version 9.7 =========== diff --git a/docs/Makefile b/docs/Makefile index 561b0c4bb94b..3ede0e192f6d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -67,8 +67,6 @@ manuals: \ @ ../octez-dac-client man -verbosity 3 -format html | sed "s#${HOME}#\$$HOME#g" > api/octez-dac-client.html @../octez-node --help | grep -v '^Octez-node' | grep -v 'OCTEZ-NODE(1)' | \ ./scripts/man2txt.py -r > api/octez-node.txt - @../octez-proxy-server --help | grep -v '^Octez-proxy-server' | grep -v 'OCTEZ-PROXY-SERVER(1)' | \ - ./scripts/man2txt.py -r > api/octez-proxy-server.txt @../octez-smart-rollup-node man -verbosity 3 -format html | \ sed "s#${HOME}#\$$HOME#g" > api/octez-smart-rollup-node.html @../octez-dal-node --help | grep -v '^Octez-dal-node' | grep -v 'OCTEZ-DAL-NODE(1)' | \ diff --git a/docs/introduction/howtouse.rst b/docs/introduction/howtouse.rst index 236230b1aa5f..18cd85227b31 100644 --- a/docs/introduction/howtouse.rst +++ b/docs/introduction/howtouse.rst @@ -23,7 +23,6 @@ After a successful compilation, you should have the following binaries: (see :ref:`signer`); - ``octez-smart-rollup-node``: executable for using and running a smart rollup node as Layer 2 (see :doc:`../shell/smart_rollup_node`); - ``octez-smart-rollup-wasm-debugger``: debugger for smart rollup kernels (see :doc:`../shell/smart_rollup_node`) -- ``octez-proxy-server``: a readonly frontend to ``octez-node`` designed to lower the load of full nodes (see :doc:`../user/proxy-server`) - ``octez-codec``: a utility for documenting the data encodings and for performing data encoding/decoding (see `Codec`_) - ``octez-protocol-compiler``: a domain-specific compiler for Tezos protocols (see `Protocol compiler`_) - ``octez-snoop``: a tool for modeling the performance of any piece of OCaml code, based on benchmarking (see :doc:`../developer/snoop`) diff --git a/docs/releases/version-10.rst b/docs/releases/version-10.rst index baea0baded15..36d6873b9a81 100644 --- a/docs/releases/version-10.rst +++ b/docs/releases/version-10.rst @@ -28,8 +28,7 @@ this only impacts RPC calls from remote hosts, not RPCs calls on the about ACLs. This version also notably introduces a new *light* mode for the -client, and a new executable -:doc:`tezos-proxy-server<../user/proxy-server>`. See full +client, and a new executable ``tezos-proxy-server``. See full `Changelog`_ for more details. Version 10.1 restores the broadcasting of endorsements received before diff --git a/docs/shell/cli-commands.rst b/docs/shell/cli-commands.rst index 996d8e51417d..cfa0633acf1d 100644 --- a/docs/shell/cli-commands.rst +++ b/docs/shell/cli-commands.rst @@ -63,15 +63,6 @@ For more details on the node invocation and configuration, see :doc:`../user/nod .. include:: ../api/octez-node.txt -.. _proxy_server_manual: - -Proxy server manual -=================== - -The command line of the :doc:`Octez proxy server <../user/proxy-server>` is documented in Unix ``man`` format, as shown below. You can also obtain this manual by running ``octez-proxy-server --help``. - -.. include:: ../api/octez-proxy-server.txt - .. _dac_node_manual: DAC node manual (Experimental) diff --git a/docs/user/proxy-server.rst b/docs/user/proxy-server.rst deleted file mode 100644 index 56d207a32897..000000000000 --- a/docs/user/proxy-server.rst +++ /dev/null @@ -1,305 +0,0 @@ -Proxy server ------------- - -This page describes the *proxy server*, a readonly frontend to ``octez-node`` -which is designed to lower the load of full nodes. It can be run separately from -a node and will handle some RPC requests by itself. It is named after two -things: - -* The :doc:`proxy mode<proxy>` of the client on which it builds upon. -* Regular HTTP proxies, as proxy servers are meant to be deployed - in front of a node, to lower the node's load. - -Even though the proxy server only serves a subset of the RPCs a full node can serve (detailed :ref:`below <what_the_proxy_server_serves>`), it can transparently act as a replacement for a full node, by redirecting to the node the RPC requests that it cannot handle itself, as described :ref:`below <unsupported_rpcs>`. - -Launching a proxy server -~~~~~~~~~~~~~~~~~~~~~~~~ - -The proxy server is implemented by the ``octez-proxy-server`` executable. -The minimal arguments to the proxy server are ``--endpoint`` -and ``--rpc-addr``: - -* ``--endpoint`` specifies the URL of the RPC server of the underlying node, that is uses - for obtaining data (via RPCs of the form - ``/chains/<chain_id>/blocks/<block_id>/context/raw/bytes``), - and for redirecting the requests it cannot handle. -* ``--rpc-addr`` specifies the URL that the proxy server should serve. - -An important option is ``--data-dir``: - -* ``--data-dir`` specifies the directory of the node from - which to obtain data directly (without RPCs). Of course, this option can only be used when the proxy server - has access to the node's data directory. - In this case, the proxy server will reduce the number of RPC calls to the - node, thereby reducing its I/O consumption. - -The full command-line API is detailed :ref:`below <additional_arguments>`. - -.. _sandbox_example: - -Examples with the sandbox -~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this section, we show examples of using a proxy server in -the :doc:`sandboxed node<sandbox>`. For convenience, we repeat -instructions for the sandboxed mode here, but refer the reader to the -sandboxed mode page for further details. - -In a first terminal, start a sandboxed node: - -:: - - $ ./src/bin_node/octez-sandboxed-node.sh 1 --connections 1 - April 21 11:05:32.789 - node.config.validation: the node configuration has been successfully validated. - Created /tmp/octez-node.Uzq5aGAN/config.json for network: sandbox. - ... - -Note in the trace above that the sandbox node wrote some configuration file in a working directory, that you may need to know later on. - -Leave this first terminal running. In a second terminal, prepare the appropriate -environment for running a proxy server: - -:: - - $ eval `./src/bin_client/octez-init-sandboxed-client.sh 1` - $ octez-activate-alpha - $ octez-client bake for bootstrap1 - -To avoid warnings being printed in upcoming commands (optional): - -:: - - $ export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=y - -You're now ready to run a proxy server, as shown below. -We specify debug variables in ``TEZOS_LOG`` to see what the proxy server -is doing (see the :doc:`proxy mode<proxy>` page for more details). - -:: - - $ export TEZOS_LOG="proxy_rpc_ctxt->debug; proxy_rpc->debug; proxy_server_run->debug; proxy_getter->debug; proxy_services->debug" - $ ./octez-proxy-server --endpoint http://127.0.0.1:18731 --rpc-addr http://127.0.0.1:18732 - Apr 21 11:09:22.092 - proxy_server_run: starting proxy RPC server on 127.0.0.1:18732 - -Now, start a third terminal, and ask the client to request data from the proxy server: - -:: - - $ export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=y - $ ./octez-client --endpoint http://127.0.0.1:18732 rpc get /chains/main/blocks/head/context/contracts - [ "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN", - "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv", - "tz1faswCTDciRzE4oJ9jn2Vm2dvjeyA9fUzU", - "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx", - "tz1b7tUupMgCNw2cCLpKTkSD1NZzB5TkP2sv" ] - -In the proxy server's terminal, you should see this output (tree sizes may vary): - -:: - - Apr 21 11:10:07.474 - proxy_rpc: chains/<main>/blocks/<head>/header - Apr 21 11:10:07.474 - proxy_rpc: proxy cache created for chain main and block head - Apr 21 11:10:07.476 - proxy_getter: Cache miss: (v1/constants) - Apr 21 11:10:07.476 - proxy_getter: split_key heuristic triggers, getting v1 instead of v1/constants - Apr 21 11:10:07.476 - proxy_rpc: /chains/<main>/blocks/<head>/context/raw/bytes/v1 - Apr 21 11:10:07.477 - proxy_rpc: received tree of size 2 - Apr 21 11:10:07.477 - proxy_getter: Cache hit: (v1/cycle_eras) - Apr 21 11:10:07.477 - proxy_getter: Cache miss: (pending_migration_balance_updates) - Apr 21 11:10:07.477 - proxy_rpc: /chains/<main>/blocks/<head>/context/raw/bytes/pending_migration_balance_updates - Apr 21 11:10:07.477 - proxy_getter: Cache miss: (pending_migration_operation_results) - Apr 21 11:10:07.477 - proxy_rpc: /chains/<main>/blocks/<head>/context/raw/bytes/pending_migration_operation_results - Apr 21 11:10:07.478 - proxy_getter: Cache miss: (contracts/index) - Apr 21 11:10:07.478 - proxy_rpc: /chains/<main>/blocks/<head>/context/raw/bytes/contracts/index - Apr 21 11:10:07.479 - proxy_rpc: received tree of size 115 - -.. _redirected_requests: - -Lines of the form ``proxy_rpc: /chains/<main>/blocks/<head>/context/raw/bytes/...`` -show requests that the proxy server sends to the node to obtain data. - -Now, in the third terminal, retrieve the contracts again: - -:: - - $ ./octez-client --endpoint http://127.0.0.1:18732 rpc get /chains/main/blocks/head/context/contracts - [ "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN", - "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv", - "tz1faswCTDciRzE4oJ9jn2Vm2dvjeyA9fUzU", - "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx", - "tz1b7tUupMgCNw2cCLpKTkSD1NZzB5TkP2sv" ] - $ ./octez-client --endpoint http://127.0.0.1:18732 rpc get /chains/main/blocks/head/context/contracts - # ... same output ... - -In the meantime, in the proxy server's terminal, you should see: - -:: - - Apr 21 11:14:06.511 - proxy_getter: Cache hit: (v1/constants) - Apr 21 11:14:06.512 - proxy_getter: Cache hit: (v1/cycle_eras) - Apr 21 11:14:06.512 - proxy_getter: Cache hit: (pending_migration_balance_updates) - Apr 21 11:14:06.512 - proxy_getter: Cache hit: (pending_migration_operation_results) - Apr 21 11:14:06.512 - proxy_getter: Cache hit: (contracts/index) - -This show that the proxy server is answering the request -without delegating anything to the node: there is no ``proxy_rpc`` line. -The proxy server is reusing the data it obtained for ``<head>`` from -the first request. - -Reducing RPC calls: ``--data-dir`` -"""""""""""""""""""""""""""""""""" - -To make the proxy server read the node's data-dir instead of doing -``/chains/<main>/blocks/<head>/context/raw/bytes`` RPC calls, kill -the proxy server you have launched :ref:`above <sandbox_example>`), -and restart it as follows: - -:: - - $ ./octez-proxy-server --endpoint http://127.0.0.1:18731 --rpc-addr http://127.0.0.1:18732 --data-dir <node_data_dir> - protocol of proxy unspecified, using the node's protocol: ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK - Apr 21 11:09:22.092 - proxy_server_run: starting proxy RPC server on 127.0.0.1:18732 - -You can obtain the value for the ``--data-dir`` argument by looking at the -output of the terminal where ``octez-node`` was launched -(see :ref:`above <sandbox_example>`). - -Now, in the third terminal (the client's terminal), redo the request -to retrieve contracts: - -:: - - $ ./octez-client --endpoint http://127.0.0.1:18732 rpc get /chains/main/blocks/head/context/contracts - # ... same output as above ... - -Now the output in the proxy server terminal should be: - -:: - - Apr 21 11:22:44.359 - proxy_rpc: chains/<main>/blocks/<head>/header - Apr 21 11:22:44.360 - proxy_rpc: proxy cache created for chain main and block head - -There are far fewer ``proxy_rpc`` lines! That is because the proxy -server obtained its data by reading the node's data-dir, instead of performing RPC calls. - -.. _additional_arguments: - -Additional arguments -~~~~~~~~~~~~~~~~~~~~ - -We describe the entire list of options and arguments of the proxy server, also available in more concise form in the :ref:`proxy_server_manual`: - -* ``-c`` and ``--config`` specify the JSON file to use an input - for the configuration. This JSON file is an object like this: - ``{"endpoint": "http://127.0.0.1:18731", "rpc_addr": "http://127.0.0.1:18732", "sym_block_caching_time": 60}``. - This file can specify all command line arguments except ``-l``/``--log-requests``. - If an argument if specified both in the configuration file and on the command line, - the command line takes precedence. -* ``-d`` and ``--data-dir`` specify the path of the data directory of - the node. If specified, the proxy server obtains data by reading the disk - instead of performing the ``/chains/<chain_id>/blocks/<block_id>/context/raw/bytes`` - RPC. If possible (i.e. if the proxy server can access the node's - disk), this option should be used, because it reduces IO consumption - of the node. - - Note that this argument doesn't make ``--endpoint`` optional, because the - proxy server still needs to do RPC calls to obtain block headers. Further - work removing all RPC calls is described in issue - `2502 <https://gitlab.com/tezos/tezos/-/issues/2502>`_. -* ``-E`` and ``--endpoint`` specify the URL of the RPC server of the node - to do requests to obtain data (RPCs of the form - ``/chains/<chain_id>/blocks/<block_id>/context/raw/bytes``). -* ``-l`` and ``--log-requests`` specify to print the requests that are - delegated to the node, in a verbose manner. -* ``--rpc-addr`` specifies the URL that the proxy server should serve. -* ``--rpc-tls`` specifies that the proxy server must use TLS. It should - be a string of the form ``crt_file,key_file`` where ``crt_file`` is the path - to the TLS certificate to use and ``key_file`` is the path to the key - to use. -* ``--sym-block-caching-time`` specifies - the duration during which data for a symbolic block identifier - (like ``head``, ``head~1``) is kept. Smaller values increase the endpoint's - load but yield more up-to-date to clients. Higher values - decrease the endpoint's load but make clients observe slightly deprecated - values. If omitted, the value is defaulted to ``time_between_blocks``. As - ``time_between_blocks`` is hence regularly requested from the node, this incurs - a higher load of the node. - -All these options can either be specified in the configuration -file or on the command line. However, the union of the configuration file -and the command line should specify the endpoint to use and the RPC address to serve. - -.. _what_the_proxy_server_serves: - -Supported RPCs -~~~~~~~~~~~~~~ - -The proxy server itself only serves protocol-specific RPCs (listed -`here <https://tezos.gitlab.io/alpha/rpc.html#protocol-alpha>`_ for protocol Alpha), -but not all of them: since the proxy server is a readonly frontend for the -underlying node, it only serves the readonly requests (``GET`` requests, as -well as a subset of the ``POST`` requests). - -Because computations done by the proxy server are protocol-dependent, the proxy mode must choose a specific protocol: the same as the underlying node. -However, the proxy mode does not support all protocols. -Execute ``octez-client list proxy protocols`` to see the supported protocols. -It is expected that, at any -given time, the proxy server supports ``Alpha``, the current protocol -of Mainnet and the current protocol proposal on Mainnet at the time of release. - -.. _unsupported_rpcs: - -Unsupported RPCs -~~~~~~~~~~~~~~~~ - -Requests that are not readonly can only be handled by a full node. However, the proxy server accepts any RPC: if the RPC is not supported -by the proxy server, it will redirect it to the node, which -will then handle the request. - -This can be viewed in the proxy server log, as demonstrated :ref:`above <redirected_requests>`. - -Clearly, making such requests to the proxy server does not decrease the load of -the node. However, it does allow the -use of a single endpoint for all RPC requests, which may be convenient for -some use cases. -In turn, it adds a slight delay to the HTTP -request, unless the redirect is cached by the client. - -Deployment -~~~~~~~~~~ - -As a proxy server is a readonly frontend to a node, you can spawn multiple -proxy servers in front of a single node. - -As described above, the proxy server configures himself to the same protocol as the underlying node. As a consequence, -when the underlying node changes protocol, the proxy server will also switch to the new protocol, **unless** the proxy server executable does not contain the new protocol. -This may happen, for instance, if the executable was compiled before this protocol was even injected. -As there is no dynamic linking of new protocols in the proxy server, it will -start failing for RPCs -concerning blocks of the new protocol. -The solution in this case is to restart the proxy server using a more recent executable. - -More generally, we recommend to automatically -restart proxy servers that have a high ratio of failures. -Restarting a proxy server is always fine; they can be thrown away at any -moment. - -.. warning:: - - The proxy is a pure proxy, in that it does not do any security filtering of RPC requests. - Thus, if you put a proxy in front of a local node not restricting local RPCs and expose this proxy to the public, you potentially introduce a DoS vulnerability. - -Heuristics -~~~~~~~~~~ - -The proxy server uses several heuristics to optimize its own work and/or decrease the node's load. -For example, there is a heuristic -to make big map queries faster, which is useful when many queries to siblings keys of a given -big map are done in burst. - -The heuristics for protocol Alpha are implemented in file -:src:`proxy.ml <src/proto_alpha/lib_client/proxy.ml>`, in function ``split_key`` and associates. For example, -any request of the form ``big_maps/index/i/contents/tail`` is transformed -into a request of the form ``big_maps/index/i/contents`` to obtain data for all -possible values of ``tail`` at once. -For the moment, the heuristics cannot be specified on the command line, but -this can be implemented in the future. diff --git a/docs/user/setup-node.rst b/docs/user/setup-node.rst index 753f764047b3..970172bfe2ad 100644 --- a/docs/user/setup-node.rst +++ b/docs/user/setup-node.rst @@ -7,7 +7,6 @@ A node in the Tezos network provides different configuration possibilities: - specify the Tezos network to connect to, which can be the Mainnet or different test networks. - configure the amount of history kept by the node according to different tradeoffs, using history modes - rapidly catch up with a given (main or test) network by loading network snapshots -- set up one or several proxy servers to decrease the load of the node by serving some RPC requests themselves - set up infrastructure for continuosly monitoring the node to help spotting operational or efficiency issues - set up infrastructure for continuosly monitoring the chain consensus spotting operational or efficiency issues @@ -33,11 +32,6 @@ These possibilities are described in the following pages. snapshots -.. toctree:: - :maxdepth: 2 - - proxy-server - .. toctree:: :maxdepth: 2 -- GitLab From 74444718cea2a130c658003fb06cd1ffa007ab18 Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Wed, 7 Aug 2024 14:55:42 +0200 Subject: [PATCH 4/8] Tests: remove proxy-server --- tezt/lib_tezos/client.ml | 20 +- tezt/lib_tezos/client.mli | 1 - tezt/lib_tezos/constant.ml | 3 - tezt/lib_tezos/operation_core.ml | 11 +- tezt/lib_tezos/proxy_server.ml | 162 --------------- tezt/lib_tezos/proxy_server.mli | 100 --------- tezt/tests/RPC_test.ml | 40 +--- tezt/tests/main.ml | 1 - tezt/tests/proxy.ml | 22 +- tezt/tests/proxy_server_test.ml | 336 ------------------------------- 10 files changed, 16 insertions(+), 680 deletions(-) delete mode 100644 tezt/lib_tezos/proxy_server.ml delete mode 100644 tezt/lib_tezos/proxy_server.mli delete mode 100644 tezt/tests/proxy_server_test.ml diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index 489b32e73199..2872b1bf8a8a 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -27,16 +27,12 @@ open Runnable.Syntax open Cli_arg -type endpoint = - | Node of Node.t - | Proxy_server of Proxy_server.t - | Foreign_endpoint of Endpoint.t +type endpoint = Node of Node.t | Foreign_endpoint of Endpoint.t type media_type = Json | Binary | Any let rpc_port = function | Node n -> Node.rpc_port n - | Proxy_server ps -> Proxy_server.rpc_port ps | Foreign_endpoint fe -> Endpoint.rpc_port fe type mode = @@ -98,7 +94,6 @@ let with_dal_node ?dal_node t = {t with dal_node} let endpoint_wait_for ?where endpoint event filter = match endpoint with | Node node -> Node.wait_for ?where node event filter - | Proxy_server ps -> Proxy_server.wait_for ?where ps event filter | Foreign_endpoint _ -> Test.fail "Cannot wait_for with a Foreign_endpoint" let next_name = ref 1 @@ -113,12 +108,10 @@ let () = Test.declare_reset_function @@ fun () -> next_name := 1 let runner endpoint = match endpoint with | Node node -> Node.runner node - | Proxy_server ps -> Proxy_server.runner ps | Foreign_endpoint _ -> None let scheme = function | Node n -> Node.rpc_scheme n - | Proxy_server _ -> Proxy_server.rpc_scheme | Foreign_endpoint fe -> Endpoint.rpc_scheme fe let address ?(hostname = false) ?from peer = @@ -737,9 +730,7 @@ let activate_protocol ?endpoint ?block ?protocol ?protocol_hash ?fitness ?key client |> Process.check -let node_of_endpoint = function - | Node n -> Some n - | Proxy_server _ | Foreign_endpoint _ -> None +let node_of_endpoint = function Node n -> Some n | Foreign_endpoint _ -> None let node_of_client_mode = function | Client (Some endpoint, _) -> node_of_endpoint endpoint @@ -4289,13 +4280,6 @@ let publish_dal_commitment ?hooks ?(wait = "none") ?burn_cap ~src ~commitment let as_foreign_endpoint = function | Node node -> Node.as_rpc_endpoint node | Foreign_endpoint fe -> fe - | Proxy_server ps -> - Endpoint. - { - scheme = Proxy_server.rpc_scheme; - host = Proxy_server.rpc_host; - port = Proxy_server.rpc_port ps; - } let get_receipt_for ~operation ?(check_previous = 10) client = spawn_command client diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index 1e11d82d06a7..21b7cd4a74dc 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -31,7 +31,6 @@ module Time = Tezos_base.Time.System (** Values that can be passed to the client's [--endpoint] argument *) type endpoint = | Node of Node.t (** A full-fledged node *) - | Proxy_server of Proxy_server.t (** A proxy server *) | Foreign_endpoint of Endpoint.t (** A service not managed by Tezt *) (** Values that can be passed to the client's [--adaptive-issuance-vote] argument *) diff --git a/tezt/lib_tezos/constant.ml b/tezt/lib_tezos/constant.ml index e2850dd53661..98accd3e6415 100644 --- a/tezt/lib_tezos/constant.ml +++ b/tezt/lib_tezos/constant.ml @@ -34,9 +34,6 @@ let octez_admin_client = Uses.octez_admin_client let octez_node = Uses.octez_node -let octez_proxy_server = - Uses.make ~tag:"proxy_server" ~path:"./octez-proxy-server" - let octez_codec = Uses.make ~tag:"codec" ~path:"./octez-codec" let octez_snoop = Uses.make ~tag:"snoop" ~path:"./octez-snoop" diff --git a/tezt/lib_tezos/operation_core.ml b/tezt/lib_tezos/operation_core.ml index 55d14ec5e6ef..d310189c8498 100644 --- a/tezt/lib_tezos/operation_core.ml +++ b/tezt/lib_tezos/operation_core.ml @@ -154,10 +154,10 @@ let inject ?(dont_wait = false) ?(request = `Inject) ?force ?protocol ?signature let mode = Client.get_mode client in match Client.mode_to_endpoint mode with | None -> Test.fail "Operation.inject: Endpoint expected" - | Some (Proxy_server _ | Foreign_endpoint _) -> + | Some (Foreign_endpoint _) -> Test.fail - "Operation.inject: Node endpoint expected instead of proxy server \ - or foreign endpoint" + "Operation.inject: Node endpoint expected instead of foreign \ + endpoint" | Some (Node node) -> Node.wait_for_request ~request node in let* runnable = spawn_inject ?force ?protocol ?signature t client in @@ -206,10 +206,9 @@ let inject_operations ?protocol ?(request = `Inject) ?(force = false) ?error let mode = Client.get_mode client in match Client.mode_to_endpoint mode with | None -> Test.fail "Operation.inject: Endpoint expected" - | Some (Proxy_server _ | Foreign_endpoint _) -> + | Some (Foreign_endpoint _) -> Test.fail - "Operation.inject: Node endpoint expected instead of proxy server or \ - foreign endpoint" + "Operation.inject: Node endpoint expected instead of foreign endpoint" | Some (Node node) -> Node.wait_for_request ~request node in let rpc = diff --git a/tezt/lib_tezos/proxy_server.ml b/tezt/lib_tezos/proxy_server.ml deleted file mode 100644 index 3d1c300813b7..000000000000 --- a/tezt/lib_tezos/proxy_server.ml +++ /dev/null @@ -1,162 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -type argument = - (* If you're considering adding [--endpoint] and [--rpc-addr], - beware that, for the moment, they are automatically computed in - {!create} below *) - | Data_dir - | Symbolic_block_caching_time of int - -module Parameters = struct - type persistent_state = { - arguments : string list; - mutable pending_ready : unit option Lwt.u list; - rpc_port : int; - runner : Runner.t option; - } - - type session_state = {mutable ready : bool} - - let base_default_name = "proxy_server" - - let default_colors = Log.Color.[|FG.gray; BG.gray|] -end - -let rpc_host = Constant.default_host - -let rpc_scheme = "http" - -open Parameters -include Daemon.Make (Parameters) - -let trigger_ready t value = - let pending = t.persistent_state.pending_ready in - t.persistent_state.pending_ready <- [] ; - List.iter (fun pending -> Lwt.wakeup_later pending value) pending - -let set_ready t = - (match t.status with - | Not_running -> () - | Running status -> status.session_state.ready <- true) ; - trigger_ready t (Some ()) - -let handle_event t ({name; _} : event) = - match name with "starting_proxy_rpc_server.v0" -> set_ready t | _ -> () - -(** Returns the [--endpoint] and [--rpc-addr] arguments corresponding to [?rpc_port] - and [node]. Also returns the chosen rpc port, in case it was omitted - and got generated. *) -let connection_arguments_and_port ?rpc_port node = - let rpc_port = - match rpc_port with None -> Port.fresh () | Some port -> port - in - ( [ - "--endpoint"; - sf "http://%s:%d" Constant.default_host (Node.rpc_port node); - (* "-l"; <- to debug RPC delegations to the node - - Note that if you want to debug the proxy server's RPC server, - set TEZOS_LOG to "rpc->debug", just like you would do with a node. - *) - "--rpc-addr"; - Format.sprintf "%s://%s:%d" rpc_scheme rpc_host rpc_port; - ], - rpc_port ) - -let spawn ?rpc_port ?(args = []) node = - let args = (connection_arguments_and_port ?rpc_port node |> fst) @ args in - Process.spawn - ~name:Parameters.base_default_name - ~color:Parameters.default_colors.(0) - (Uses.path Constant.octez_proxy_server) - args - -let create ?runner ?name ?rpc_port ?(args = []) node = - let path = Uses.path Constant.octez_proxy_server in - let user_arguments = - List.map - (function - | Data_dir -> ["--data-dir"; Node.data_dir node] - | Symbolic_block_caching_time s -> - ["--sym-block-caching-time"; Int.to_string s]) - args - |> List.concat - in - let arguments, rpc_port = - connection_arguments_and_port ?rpc_port node |> fun (args, rpc_port) -> - (args @ user_arguments, rpc_port) - in - let t = - create ?runner ~path ?name {arguments; pending_ready = []; rpc_port; runner} - in - on_event t (handle_event t) ; - return t - -let rpc_port ({persistent_state; _} : t) = persistent_state.rpc_port - -let runner node = node.persistent_state.runner - -let run ?(on_terminate = fun _ -> ()) ?event_level ?event_sections_levels - endpoint arguments = - let arguments = endpoint.persistent_state.arguments @ arguments in - let on_terminate status = - on_terminate status ; - unit - in - run - ?event_level - ?event_sections_levels - endpoint - {ready = false} - arguments - ~on_terminate - -let check_event ?where node name promise = - let* result = promise in - match result with - | None -> - raise (Terminated_before_event {daemon = node.name; event = name; where}) - | Some x -> return x - -let wait_for_ready t = - match t.status with - | Running {session_state = {ready = true}; _} -> unit - | Not_running | Running {session_state = {ready = false}; _} -> - let promise, resolver = Lwt.task () in - t.persistent_state.pending_ready <- - resolver :: t.persistent_state.pending_ready ; - check_event t "starting_proxy_rpc_server.v0" promise - -let init ?runner ?name ?rpc_port ?event_level ?event_sections_levels ?args node - = - let* endpoint = create ?runner ?name ?rpc_port ?args node in - let* () = run ?event_level ?event_sections_levels endpoint [] in - let* () = wait_for_ready endpoint in - return endpoint - -let as_rpc_endpoint t = - let state = t.persistent_state in - {Endpoint.scheme = rpc_scheme; host = rpc_host; port = state.rpc_port} diff --git a/tezt/lib_tezos/proxy_server.mli b/tezt/lib_tezos/proxy_server.mli deleted file mode 100644 index 1ecdb26f1770..000000000000 --- a/tezt/lib_tezos/proxy_server.mli +++ /dev/null @@ -1,100 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** A proxy server instance *) -type t - -(** Command-line arguments of [octez-proxy-server]. - - Not all arguments are available here, because it was not needed so far. *) -type argument = - | Data_dir - (** Whether to pass [--data-dir], to read the node's data-dir from disk, - instead of using a RPC. This case doesn't need a parameter, because it is computed - automatically from the {!Node.t} value in {!init}. Think - of this argument as a Boolean flag (not an argument) whether to pass - [--data-dir] to [octez-proxy-server]. *) - | Symbolic_block_caching_time of int - (** Time interval (in seconds) during which data for a symbolic block - identifier (like HEAD) is kept. A symbolic identifier - is a block identifier that it not a hash and which hence - cannot be safely used as a key in any form of cache. *) - -(** Get the RPC port of a proxy server. It's the port to - do requests to. *) -val rpc_port : t -> int - -(** Get the RPC host of a proxy server. It's the host to - do requests to. Its value is [Constant.default_host]. *) -val rpc_host : string - -(** Get the RPC scheme of a proxy server. Its value is ["http"]. *) -val rpc_scheme : string - -(** Get the runner associated to a proxy server. - - Return [None] if the proxy server runs on the local machine. *) -val runner : t -> Runner.t option - -(** [spawn ?rpc_port node] spawns a new proxy server that serves - the given port and delegates its queries to [node]. - - This function is meant to be used by callers that need finer control - than what {!init} allows. *) -val spawn : ?rpc_port:int -> ?args:string list -> Node.t -> Process.t - -(** [init ?runner ?name ?rpc_port ?event_level ?args node] creates and starts a proxy server - that serves the given port and delegates its queries to [node]. - - [event_level] specifies the verbosity of the file descriptor sink. - - [event_sections_levels] specifies the verbosity for events in sections whose - prefix is in the list. See {!Node.run} for description. *) -val init : - ?runner:Runner.t -> - ?name:string -> - ?rpc_port:int -> - ?event_level:Daemon.Level.default_level -> - ?event_sections_levels:(string * Daemon.Level.level) list -> - ?args:argument list -> - Node.t -> - t Lwt.t - -(** Raw events. *) -type event = {name : string; value : JSON.t; timestamp : float} - -(** Add a callback to be called whenever the proxy_server emits an event. - - This callback is never removed. - - You can have multiple [on_event] handlers, although - the order in which they trigger is unspecified. *) -val on_event : t -> (event -> unit) -> unit - -(** See [Daemon.Make.wait_for]. *) -val wait_for : ?where:string -> t -> string -> (JSON.t -> 'a option) -> 'a Lwt.t - -(** Expose the RPC server address of this proxy server as a foreign endpoint. *) -val as_rpc_endpoint : t -> Endpoint.t diff --git a/tezt/tests/RPC_test.ml b/tezt/tests/RPC_test.ml index e0da2e486875..f6310e4f55a7 100644 --- a/tezt/tests/RPC_test.ml +++ b/tezt/tests/RPC_test.ml @@ -49,10 +49,6 @@ let hooks = Tezos_regression.hooks - what ~uses to add to the test. *) let metadata_of_test_mode = function | `Client -> (`Client, "client", []) - | `Client_data_dir_proxy_server -> - (`Client, "proxy_server_data_dir", [Constant.octez_proxy_server]) - | `Client_rpc_proxy_server -> - (`Client, "proxy_server_rpc", [Constant.octez_proxy_server]) | `Light -> (`Light, "light", []) | `Proxy -> (`Proxy, "proxy", []) @@ -66,24 +62,8 @@ let patch_protocol_parameters protocol = function in Lwt.return_some file -let initialize_chain_for_test client = function - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server -> - (* Because the proxy server doesn't support genesis. *) - Client.bake_for_and_wait client - | `Client | `Light | `Proxy -> unit - let endpoint_of_test_mode_tag node = function | `Client | `Light | `Proxy -> Lwt.return_some Client.(Node node) - | (`Client_rpc_proxy_server | `Client_data_dir_proxy_server) as - proxy_server_mode -> - let args = - Some - (match proxy_server_mode with - | `Client_rpc_proxy_server -> [Proxy_server.Data_dir] - | `Client_data_dir_proxy_server -> []) - in - let* proxy_server = Proxy_server.init ?args node in - Lwt.return_some Client.(Proxy_server proxy_server) (* A helper to register a RPC test environment with a node and a client for the given protocol version. @@ -121,7 +101,6 @@ let check_rpc_regression ~test_mode_tag ~test_function ?supports client_mode_tag () in - let* () = initialize_chain_for_test client test_mode_tag in let* endpoint = endpoint_of_test_mode_tag node test_mode_tag in let* _ = test_function test_mode_tag protocol ?endpoint client in unit @@ -148,7 +127,6 @@ let check_rpc ~test_mode_tag ~test_function ?parameter_overrides ?nodes_args client_mode_tag () in - let* () = initialize_chain_for_test client test_mode_tag in let* endpoint = endpoint_of_test_mode_tag node test_mode_tag in let* _ = test_function test_mode_tag protocol ?endpoint client in unit @@ -1218,9 +1196,6 @@ let test_network test_mode_tag _protocol ?endpoint client = unit in match test_mode_tag with - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server -> - Log.info "Skipping network RPCs" ; - unit | `Light -> (* In light mode, the node is already connected to another node: use that as peer *) let* peers = Client.RPC.call ?endpoint client @@ RPC.get_network_peers in @@ -1676,7 +1651,7 @@ let register protocols = ~test_function:test_misc_protocol ~parameter_overrides:consensus_threshold ; (match test_mode_tag with - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server | `Light -> () + | `Light -> () | _ -> check_rpc_regression "mempool" @@ -1692,7 +1667,6 @@ let register protocols = ~nodes_args:[Connections 1] ; (match test_mode_tag with (* No worker RPCs in these modes *) - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server -> () | _ -> check_rpc "workers" @@ -1700,7 +1674,6 @@ let register protocols = ~parameter_overrides:consensus_threshold) ; (match test_mode_tag with (* No misc shell RPCs in these modes *) - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server -> () | _ -> check_rpc "misc_shell" @@ -1708,7 +1681,6 @@ let register protocols = ~parameter_overrides:consensus_threshold) ; (match test_mode_tag with (* No chain RPCs in these modes *) - | `Client_data_dir_proxy_server | `Client_rpc_proxy_server -> () | _ -> check_rpc "chain" @@ -1716,15 +1688,7 @@ let register protocols = ~parameter_overrides:consensus_threshold) ; check_rpc "deprecated" ~test_function:test_deprecated in - List.iter - (register protocols) - [ - `Client; - `Light; - `Proxy; - `Client_data_dir_proxy_server; - `Client_rpc_proxy_server; - ] ; + List.iter (register protocols) [`Client; `Light; `Proxy] ; let addresses = ["localhost"; "127.0.0.1"] in let mk_title list_type address = diff --git a/tezt/tests/main.ml b/tezt/tests/main.ml index 15da14726ce0..54fae8c62afc 100644 --- a/tezt/tests/main.ml +++ b/tezt/tests/main.ml @@ -179,7 +179,6 @@ let register_protocol_tests_that_use_supports_correctly () = Prevalidator.register ~protocols ; Protocol_limits.register ~protocols ; Proxy.register ~protocols ; - Proxy_server_test.register ~protocols ; Rpc_process.register ~protocols ; RPC_test.register protocols ; Rpc_versioning_attestation.register ~protocols ; diff --git a/tezt/tests/proxy.ml b/tezt/tests/proxy.ml index 85c20be10d6c..1811d70947e7 100644 --- a/tezt/tests/proxy.ml +++ b/tezt/tests/proxy.ml @@ -386,21 +386,10 @@ module Location = struct type clients = {vanilla : Client.t; alternative : Client.t} type alt_mode = - | Vanilla_proxy_server - (** A vanilla client ([--mode client]) but whose [--endpoint] is - a [octez-proxy-server] *) | Light (** A light client ([--mode light]) *) | Proxy (** A proxy client ([--mode proxy]) *) - (** Whether an alternative client is expected to execute RPCs locally *) - let executes_locally = function - | Vanilla_proxy_server -> false - | Light | Proxy -> true - - let alt_mode_to_string = function - | Vanilla_proxy_server -> "vanilla_proxy_server_endpoint" - | Light -> "light" - | Proxy -> "proxy" + let alt_mode_to_string = function Light -> "light" | Proxy -> "proxy" let chain_id = "main" @@ -562,9 +551,12 @@ module Location = struct (* Unknown matches on the left-hand side: there should be no match in the vanilla output, because the vanilla client doesn't deal with alternative stuff. That is why [Unknown] is matched here. *) - | Unknown, Unknown when not (executes_locally alt_mode) -> - log_same_answer () ; - Lwt.return_unit + | Unknown, Unknown -> + (* Not expected as RPCs are executed locally for all + existing clients. *) + Test.fail + "%s client is expected to execute RPC locally" + alt_mode_string | Unknown, Local -> log_same_answer () ; Log.info diff --git a/tezt/tests/proxy_server_test.ml b/tezt/tests/proxy_server_test.ml deleted file mode 100644 index 34b859bb6385..000000000000 --- a/tezt/tests/proxy_server_test.ml +++ /dev/null @@ -1,336 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs <contact@nomadic-labs.com> *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(* Testing - ------- - Component: Proxy server - Invocation: dune exec tezt/tests/main.exe -- --file proxy_server_test.ml - Subject: Test the proxy server: [big_map_get] is aimed at testing the - big map RPC and comparing performances with a node. Other - tests test the proxy server alone. - Dependencies: tezt/tests/proxy.ml -*) - -let team = Tag.layer1 - -(** Creates a client that uses a [octez-proxy-server] as its endpoint. Also - returns the node backing the proxy server, and the proxy server itself. *) -let init ?nodes_args ?parameter_file ~protocol () = - let* node, client = - Client.init_with_protocol ?nodes_args ?parameter_file `Client ~protocol () - in - let* () = Client.bake_for_and_wait client in - let* proxy_server = Proxy_server.init node in - Client.set_mode (Client (Some (Proxy_server proxy_server), None)) client ; - return (node, proxy_server, client) - -(* An event handler that checks that the 'split_key' heuristic of the - proxy mode is correctly implemented. In this case, the test - is that the proxy server requests the content of the context - [/big_maps/index/4] as soon a it receives a request for a *longer* path - such as [big_maps/index/4/contents/HASH/len]. If not, the proxy - server will perform multiple requests of the form [/big_maps/index/4/...] - in a sequence, and this handler will fail, because it checks - that normalized requests occur only once. To see this in action, - execute this test in a terminal with TEZOS_LOG set as follows: - - export TEZOS_LOG="*proxy_rpc*->debug; proxy_getter->debug; proxy_services->debug" - - and look for log lines like these ones: - - [proxy_server1] proxy_getter: Cache miss (get): - [proxy_server1] proxy_getter: (big_maps/index/4/contents/cdd4c905017896384895ed1bedc894abb078d002aff3b5c4f213b30ca884a2b8/len) - [proxy_server1] proxy_getter: split_key heuristic triggers, getting big_maps/index/4/contents instead of - [proxy_server1] proxy_getter: big_maps/index/4/contents/cdd4c905017896384895ed1bedc894abb078d002aff3b5c4f213b30ca884a2b8/len - - Note that this handler cannot be attached to all proxy server tests, - because it only works in tests - in which the proxy server doesn't discard data attached to - symbolic block identifiers (like head). If the proxy discards data, - then it will do multiple times the same request, which breaks the - property checked by this handler. *) -let heuristic_event_handler () : Proxy_server.event -> unit = - let seens = ref String_set.empty in - let event_to_path json = - let fail = Test.fail "Unexpected JSON within %s (%d)" (JSON.encode json) in - match JSON.unannotate json with - | `A sub -> - List.map (function `String segment -> segment | _ -> fail 1) sub - | _ -> fail 2 - in - fun event -> - (* kind=true: because we are interested in "Get" events, - see [Proxy_getter] *) - if event.name = "cache_miss.v0" && JSON.(event.value |-> "kind" |> as_bool) - then - let segments = event_to_path JSON.(event.value |-> "key") in - let normalized = Proxy.normalize segments |> String.concat "/" in - if String_set.mem normalized !seens then - Test.fail - "Request of the form %s/... done twice. Last request is %s" - normalized - @@ String.concat "/" segments - else seens := String_set.add normalized !seens - -(** [readonly_client] only performs reads to the node's storage, while - [client] has full access *) -let big_map_get ?(big_map_size = 10) ?nb_gets ~protocol mode () = - Log.info "Test advanced originated contract" ; - let* parameter_file = - Protocol.write_parameter_file - ~base:(Either.right (protocol, None)) - [(["hard_storage_limit_per_operation"], `String_of_int 99999999)] - in - let* node, client = - Client.init_with_protocol ~parameter_file ~protocol `Client () - in - let* (endpoint : Client.endpoint option) = - match mode with - | `Node -> return None - | (`Proxy_server_rpc | `Proxy_server_data_dir) as proxy_server_mode -> - (* When checking the split_key heuristic with {!heuristic_event_handler}, - we don't want data to be discarded. Hence we keep data for - 60 seconds. Any duration longer than the test duration is fine. As - this test takes approximately 10 seconds, - using 60 seconds here is safe. *) - let approximate_test_duration = 10 in - let sym_block_caching_time = 6 * approximate_test_duration in - let args = - Proxy_server.[Symbolic_block_caching_time sym_block_caching_time] - @ - match proxy_server_mode with - | `Proxy_server_rpc -> [] - | `Proxy_server_data_dir -> Proxy_server.[Data_dir] - in - let* () = Client.bake_for_and_wait client in - (* We want Debug level events, for [heuristic_event_handler] - to work properly *) - let* proxy_server = Proxy_server.init ~args ~event_level:`Debug node in - Proxy_server.on_event proxy_server @@ heuristic_event_handler () ; - return @@ Some (Client.Proxy_server proxy_server) - in - let nb_gets = Option.value ~default:big_map_size nb_gets in - let entries : (string * int) list = - List.init big_map_size (fun i -> (Format.sprintf "\"%04i\"" i, i)) - in - let entries_s = - List.map (fun (k, v) -> sf "Elt %s %s " k @@ Int.to_string v) entries - in - let init = "{" ^ String.concat ";" entries_s ^ "}" in - let* _alias, contract_id = - Client.originate_contract_at - ~amount:Tez.zero - ~src:"bootstrap1" - ~init - ~burn_cap:Tez.(of_int 9999999) - client - ["mini_scenarios"; "big_map_all"] - protocol - in - let* () = Client.bake_for_and_wait client in - let* mockup_client = Client.init_mockup ~protocol () in - let* _ = - Client.RPC.call ?endpoint client - @@ RPC.get_chain_block_context_contract_script ~id:contract_id () - in - let* _ = - Client.RPC.call ?endpoint client - @@ RPC.get_chain_block_context_contract_storage ~id:contract_id () - in - let* indices_exprs = - let compute_index_expr index = - let* {script_expr_hash; _} = - Client.hash_data ~data:index ~typ:"string" mockup_client - in - return script_expr_hash - in - let get_index_expr index = - match String_map.find_opt index Proxy_server_test_data.key_to_expr with - | None -> - Log.warn - "Need to compute expr of key %s: prefer to put this in \ - Proxy_server_test_data" - index ; - compute_index_expr index - | Some res -> Lwt.return res - in - Lwt_list.map_s get_index_expr @@ (Base.take nb_gets entries |> List.map fst) - in - let get_one_value key_hash = - let* _ = - Client.RPC.call ?endpoint client - @@ RPC.get_chain_block_context_big_map - ~id: - (* This big_map id can be found in origination response - e.g. "New map(4) of type (big_map string nat)". - In this dumb test we know it is always 4. *) - "4" - ~key_hash - () - in - Lwt.return_unit - in - Lwt_list.iter_s get_one_value indices_exprs - -let test_equivalence = - let open Proxy.Location in - let alt_mode = Vanilla_proxy_server in - Protocol.register_test - ~__FILE__ - ~title:"(Vanilla, proxy_server endpoint) Compare RPC get" - ~tags:(team :: compare_tags alt_mode) - ~uses:(fun _protocol -> [Constant.octez_proxy_server]) - @@ fun protocol -> - let* node, _, alternative = init ~protocol () in - let vanilla = Client.create ~endpoint:(Node node) () in - let clients = {vanilla; alternative} in - let tz_log = [("proxy_rpc", "debug"); ("proxy_getter", "debug")] in - check_equivalence ~tz_log alt_mode clients - -let test_wrong_data_dir = - Protocol.register_test - ~__FILE__ - ~title:"proxy_server wrong data_dir" - ~tags:[team; "data_dir"] - ~uses:(fun _protocol -> [Constant.octez_proxy_server]) - @@ fun protocol -> - let* node, _client = Client.init_with_protocol `Client ~protocol () in - let wrong_data_dir = Temp.dir "empty" in - let args = ["--data-dir"; wrong_data_dir] in - let process = Proxy_server.spawn ~args node in - let* stderr = Process.check_and_read_stderr ~expect_failure:true process in - let re_str = "No_such_file_or_directory" in - let good_match = stderr =~ rex re_str in - if not good_match then - Test.fail - "Unexpected error message: %s. It doesn't match the regexp %S" - stderr - re_str - else Lwt.return_unit - -let test_proxy_server_serve_unsupported = - Protocol.register_test - ~__FILE__ - ~title:"proxy_server serve unsupported curl" - ~tags:[team; "redirect"] - ~uses:(fun _protocol -> [Constant.octez_proxy_server]) - @@ fun protocol -> - let* node, _client = Client.init_with_protocol `Client ~protocol () in - let* _ps = Proxy_server.init node in - let p = - sf - "http://%s:%d/chains/main/blocks/head/header" - Constant.default_host - (Proxy_server.rpc_port _ps) - in - let r = Process.spawn "curl" ["-v"; p] in - let* err = Process.check_and_read_stderr r in - let re_str = "200 OK" in - let good_match = err =~ rex re_str in - if not good_match then - Test.fail - "Unexpected error message: %s. It doesn't match the regexp %S" - err - re_str - else Lwt.return_unit - -let test_multi_protocols = - Protocol.register_test - ~__FILE__ - ~title:"proxy_server multi protocols" - ~tags:[team; "multi_protocols"] - ~uses:(fun _protocol -> [Constant.octez_proxy_server]) - ~supports:Has_predecessor - @@ Protocol.with_predecessor - @@ fun ~previous_protocol:from_protocol ~protocol:to_protocol -> - (* Create a context with 3 blocks in [from_protocol] and 2 blocks in [to_protocol] *) - let patch_config = - Node.Config_file.set_sandbox_network_with_user_activated_upgrades - [(4, to_protocol)] - in - let* node = Node.init ~patch_config [Synchronisation_threshold 0] in - let* client = Client.init ~endpoint:(Node node) () in - let* () = Client.activate_protocol ~protocol:from_protocol client in - let* () = repeat 5 (fun () -> Client.bake_for_and_wait client) in - (* Launch the proxy server and plug the client to it *) - let* proxy_server = Proxy_server.init node in - Client.set_mode (Client (Some (Proxy_server proxy_server), None)) client ; - let check_attestation_levels ~__LOC__ ?block ~expected_level () = - let check levels = - let returned_level = JSON.(levels |> geti 0 |> get "level" |> as_int) in - Check.( - (expected_level = returned_level) - int - ~error_msg: - (sf - "%s: Unexpected level returned in proxy_server multi protocol \ - test, expected %%L instead of %%R" - __LOC__)) - in - let* proto_attestation_rights = - Client.RPC.call client - @@ RPC.get_chain_block_helper_attestation_rights ?block () - in - check proto_attestation_rights ; - unit - in - (* Ensure the proxy serves a query to a block in [to_protocol] *) - let* () = check_attestation_levels ~__LOC__ ~block:"3" ~expected_level:3 () in - (* Ensure the proxy serves a query to a block in [from_protocol] *) - let* () = - check_attestation_levels ~__LOC__ ~block:"head~1" ~expected_level:5 () - in - unit - -let register ~protocols = - let register mode = - let mode_string = - match mode with - | `Node -> "node" - | `Proxy_server_rpc -> "proxy_server" - | `Proxy_server_data_dir -> "proxy_server_data_dir" - in - let mode_tags, uses = - match mode with - | `Node -> (["node"], []) - | `Proxy_server_rpc -> ([], [Constant.octez_proxy_server]) - | `Proxy_server_data_dir -> - (["proxy_server_data_dir"], [Constant.octez_proxy_server]) - in - Protocol.register_test - ~__FILE__ - ~title:(sf "big_map_perf (%s)" mode_string) - ~tags:(team :: "bigmapperf" :: mode_tags) - ~uses:(fun _protocol -> uses) - (fun protocol -> big_map_get ~protocol mode ()) - protocols - in - register `Node ; - register `Proxy_server_data_dir ; - register `Proxy_server_rpc ; - test_proxy_server_serve_unsupported protocols ; - test_equivalence protocols ; - test_wrong_data_dir protocols ; - test_multi_protocols protocols -- GitLab From 57163655f78150e3279a6f5fdcfa23e8c49a0fd9 Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Fri, 2 Jun 2023 09:36:07 +0200 Subject: [PATCH 5/8] Manifest: remove context dependency from tezos-proxy --- manifest/product_octez.ml | 1 - src/lib_proxy/dune | 1 - 2 files changed, 2 deletions(-) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index ba98d49eead8..3b2ac981ca2a 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -4029,7 +4029,6 @@ let octez_proxy = octez_protocol_environment; octez_rpc; octez_shell_services; - octez_context_memory; uri; ] diff --git a/src/lib_proxy/dune b/src/lib_proxy/dune index 1e4d1802b346..f0d43f951738 100644 --- a/src/lib_proxy/dune +++ b/src/lib_proxy/dune @@ -14,7 +14,6 @@ octez-proto-libs.protocol-environment octez-libs.rpc octez-shell-libs.shell-services - octez-libs.tezos-context.memory uri) (flags (:standard) -- GitLab From 46a26fec1ab877ee3962ebbd7d1a5868f07e52f7 Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Wed, 7 Aug 2024 15:14:13 +0200 Subject: [PATCH 6/8] Scripts/packing: remove octez-proxy-server --- .dockerignore | 2 -- .gitignore | 2 -- scripts/packaging/octez/.gitignore | 1 - scripts/packaging/octez/debian/octez-node.install | 1 - scripts/packaging/octez/debian/octez-node.manpages | 1 - scripts/packaging/octez/debian/rules | 1 - scripts/pkg-common/node-binaries | 1 - 7 files changed, 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 18e4fb08aa2f..97614f624efe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -21,7 +21,6 @@ tezos-admin-client tezos-baker-* tezos-endorser-* tezos-accuser-* -tezos-proxy-server tezos-signer tezos-smart-rollup-node-* tezos-smart-rollup-client-* @@ -33,7 +32,6 @@ octez-admin-client octez-baker-* octez-endorser-* octez-accuser-* -octez-proxy-server octez-signer octez-smart-rollup-node* octez-smart-rollup-client-* diff --git a/.gitignore b/.gitignore index f44f4c3124de..fe6c65fbce79 100644 --- a/.gitignore +++ b/.gitignore @@ -34,8 +34,6 @@ __pycache__ /octez-endorser-* /tezos-accuser-* /octez-accuser-* -/tezos-proxy-server -/octez-proxy-server /tezos-signer /octez-signer /tezos-sandbox diff --git a/scripts/packaging/octez/.gitignore b/scripts/packaging/octez/.gitignore index 4ab303aed837..a4fe65a6e7df 100644 --- a/scripts/packaging/octez/.gitignore +++ b/scripts/packaging/octez/.gitignore @@ -33,7 +33,6 @@ debian/substvars binaries manpages/octez-node.1 manpages/octez-dal-node.1 -manpages/octez-proxy-server.1 zcash-params debian/octez-client/ diff --git a/scripts/packaging/octez/debian/octez-node.install b/scripts/packaging/octez/debian/octez-node.install index c57da6b33602..fa0919382b0e 100644 --- a/scripts/packaging/octez/debian/octez-node.install +++ b/scripts/packaging/octez/debian/octez-node.install @@ -1,2 +1 @@ binaries/octez-node /usr/bin/ -binaries/octez-proxy-server /usr/bin/ diff --git a/scripts/packaging/octez/debian/octez-node.manpages b/scripts/packaging/octez/debian/octez-node.manpages index b7a2035834f7..34988bcf7ca5 100644 --- a/scripts/packaging/octez/debian/octez-node.manpages +++ b/scripts/packaging/octez/debian/octez-node.manpages @@ -1,2 +1 @@ manpages/octez-node.1 -manpages/octez-proxy-server.1 diff --git a/scripts/packaging/octez/debian/rules b/scripts/packaging/octez/debian/rules index 563f24921eb9..2eff9a363e75 100755 --- a/scripts/packaging/octez/debian/rules +++ b/scripts/packaging/octez/debian/rules @@ -5,7 +5,6 @@ override_dh_auto_build: binaries/octez-node --help=groff > manpages/octez-node.1 - binaries/octez-proxy-server --help=groff > manpages/octez-proxy-server.1 binaries/octez-dal-node --help=groff > manpages/octez-dal-node.1 dh_auto_build --parallel diff --git a/scripts/pkg-common/node-binaries b/scripts/pkg-common/node-binaries index c7d9f218aabf..6bc4c22e4487 100644 --- a/scripts/pkg-common/node-binaries +++ b/scripts/pkg-common/node-binaries @@ -1,2 +1 @@ octez-node -octez-proxy-server -- GitLab From dd31917cfa95284536942a2ce08d995876906cbf Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Wed, 7 Aug 2024 15:55:20 +0200 Subject: [PATCH 7/8] Tests/regression: remove proxy-server --- .../runtime-dependency-tags.out | 1 - ...PC regression tests- adaptive_issuance.out | 70 --- ...a_dir) RPC regression tests- contracts.out | 553 ------------------ ...a_dir) RPC regression tests- delegates.out | 122 ---- ...r) RPC regression tests- misc_protocol.out | 137 ----- ..._data_dir) RPC regression tests- votes.out | 78 --- ...PC regression tests- adaptive_issuance.out | 70 --- ...r_rpc) RPC regression tests- contracts.out | 553 ------------------ ...r_rpc) RPC regression tests- delegates.out | 122 ---- ...c) RPC regression tests- misc_protocol.out | 137 ----- ...erver_rpc) RPC regression tests- votes.out | 78 --- ...PC regression tests- adaptive_issuance.out | 70 --- ...a_dir) RPC regression tests- contracts.out | 553 ------------------ ...a_dir) RPC regression tests- delegates.out | 102 ---- ...r) RPC regression tests- misc_protocol.out | 137 ----- ..._data_dir) RPC regression tests- votes.out | 78 --- ...PC regression tests- adaptive_issuance.out | 70 --- ...r_rpc) RPC regression tests- contracts.out | 553 ------------------ ...r_rpc) RPC regression tests- delegates.out | 102 ---- ...c) RPC regression tests- misc_protocol.out | 137 ----- ...erver_rpc) RPC regression tests- votes.out | 78 --- ...PC regression tests- adaptive_issuance.out | 70 --- ...a_dir) RPC regression tests- contracts.out | 553 ------------------ ...a_dir) RPC regression tests- delegates.out | 122 ---- ...r) RPC regression tests- misc_protocol.out | 137 ----- ..._data_dir) RPC regression tests- votes.out | 78 --- ...PC regression tests- adaptive_issuance.out | 70 --- ...r_rpc) RPC regression tests- contracts.out | 553 ------------------ ...r_rpc) RPC regression tests- delegates.out | 122 ---- ...c) RPC regression tests- misc_protocol.out | 137 ----- ...erver_rpc) RPC regression tests- votes.out | 78 --- 31 files changed, 5721 deletions(-) delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- votes.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- votes.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- votes.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- votes.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- votes.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- contracts.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- delegates.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out delete mode 100644 tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- votes.out diff --git a/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out b/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out index bd3c40d23539..d022a358500b 100644 --- a/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out +++ b/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out @@ -21,7 +21,6 @@ dsn_node: octez-dsn-node evm_node: octez-evm-node node: octez-node protocol_compiler: octez-protocol-compiler -proxy_server: octez-proxy-server signer: octez-signer smart_rollup_node: octez-smart-rollup-node wasm_debugger: octez-smart-rollup-wasm-debugger diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- delegates.out deleted file mode 100644 index 28829e740f34..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- delegates.out +++ /dev/null @@ -1,122 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "deactivated": false, "is_forbidden": false, - "participation": - { "expected_cycle_activity": 409, "minimal_cycle_activity": 272, - "missed_slots": 0, "missed_levels": 0, - "remaining_allowed_missed_slots": 137, - "expected_attesting_rewards": "1065036" }, "grace_period": 5, - "active_staking_parameters": - { "limit_of_staking_over_baking_millionth": 0, - "edge_of_baking_over_staking_billionth": 1000000000 }, - "pending_staking_parameters": [], "baking_power": "4000000000000", - "total_staked": "200000000000", "total_delegated": "3800000000000", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, - "own_full_balance": "4000000000000", "own_staked": "200000000000", - "own_delegated": "3800000000000", "external_staked": "0", - "external_delegated": "0", - "total_unstaked_per_cycle": [ { "cycle": 0, "deposit": "0" } ], - "denunciations": [], "estimated_shared_pending_slashed_amount": "0", - "staking_denominator": "0", "current_voting_power": "4000000000000", - "voting_power": "4000000000000", - "voting_info": - { "voting_power": "4000000000000", "remaining_proposals": 20 }, - "consensus_key": - { "active": - { "pkh": "[PUBLIC_KEY_HASH]", - "pk": "[PUBLIC_KEY]" } }, - "stakers": - [ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ], - "delegators": [ "[PUBLIC_KEY_HASH]" ] } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out deleted file mode 100644 index 4cb0c56fe997..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1386666", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 101, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 5, - "cache_sampler_state_cycles": 5, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 151200, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 112, - "smart_rollup_max_lookahead_in_blocks": 324000, - "smart_rollup_max_active_outbox_levels": 151200, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 75600, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- delegates.out deleted file mode 100644 index 28829e740f34..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- delegates.out +++ /dev/null @@ -1,122 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "deactivated": false, "is_forbidden": false, - "participation": - { "expected_cycle_activity": 409, "minimal_cycle_activity": 272, - "missed_slots": 0, "missed_levels": 0, - "remaining_allowed_missed_slots": 137, - "expected_attesting_rewards": "1065036" }, "grace_period": 5, - "active_staking_parameters": - { "limit_of_staking_over_baking_millionth": 0, - "edge_of_baking_over_staking_billionth": 1000000000 }, - "pending_staking_parameters": [], "baking_power": "4000000000000", - "total_staked": "200000000000", "total_delegated": "3800000000000", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, - "own_full_balance": "4000000000000", "own_staked": "200000000000", - "own_delegated": "3800000000000", "external_staked": "0", - "external_delegated": "0", - "total_unstaked_per_cycle": [ { "cycle": 0, "deposit": "0" } ], - "denunciations": [], "estimated_shared_pending_slashed_amount": "0", - "staking_denominator": "0", "current_voting_power": "4000000000000", - "voting_power": "4000000000000", - "voting_info": - { "voting_power": "4000000000000", "remaining_proposals": 20 }, - "consensus_key": - { "active": - { "pkh": "[PUBLIC_KEY_HASH]", - "pk": "[PUBLIC_KEY]" } }, - "stakers": - [ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ], - "delegators": [ "[PUBLIC_KEY_HASH]" ] } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out deleted file mode 100644 index 4cb0c56fe997..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1386666", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 101, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 5, - "cache_sampler_state_cycles": 5, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 151200, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 112, - "smart_rollup_max_lookahead_in_blocks": 324000, - "smart_rollup_max_active_outbox_levels": 151200, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 75600, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- delegates.out deleted file mode 100644 index 29602dc55a14..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- delegates.out +++ /dev/null @@ -1,102 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "full_balance": "4000000000000", "current_frozen_deposits": "200000000000", - "frozen_deposits": "200000000000", "staking_balance": "4000000000000", - "delegated_contracts": [ "[PUBLIC_KEY_HASH]" ], - "delegated_balance": "0", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, "deactivated": false, - "grace_period": 5, "pending_denunciations": false, - "total_delegated_stake": "0", "staking_denominator": "0", - "voting_power": "4000000000000", "remaining_proposals": 20, - "active_consensus_key": "[PUBLIC_KEY_HASH]" } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out deleted file mode 100644 index 01b7d506f3af..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1733333", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 86, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 8, - "cache_sampler_state_cycles": 8, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 120960, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 90, - "smart_rollup_max_lookahead_in_blocks": 259200, - "smart_rollup_max_active_outbox_levels": 120960, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 60480, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_data_dir) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- delegates.out deleted file mode 100644 index 29602dc55a14..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- delegates.out +++ /dev/null @@ -1,102 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "full_balance": "4000000000000", "current_frozen_deposits": "200000000000", - "frozen_deposits": "200000000000", "staking_balance": "4000000000000", - "delegated_contracts": [ "[PUBLIC_KEY_HASH]" ], - "delegated_balance": "0", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, "deactivated": false, - "grace_period": 5, "pending_denunciations": false, - "total_delegated_stake": "0", "staking_denominator": "0", - "voting_power": "4000000000000", "remaining_proposals": 20, - "active_consensus_key": "[PUBLIC_KEY_HASH]" } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out deleted file mode 100644 index 01b7d506f3af..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1733333", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 86, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 8, - "cache_sampler_state_cycles": 8, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 120960, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 90, - "smart_rollup_max_lookahead_in_blocks": 259200, - "smart_rollup_max_active_outbox_levels": 120960, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 60480, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Parisc- (mode proxy_server_rpc) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- delegates.out deleted file mode 100644 index 28829e740f34..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- delegates.out +++ /dev/null @@ -1,122 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "deactivated": false, "is_forbidden": false, - "participation": - { "expected_cycle_activity": 409, "minimal_cycle_activity": 272, - "missed_slots": 0, "missed_levels": 0, - "remaining_allowed_missed_slots": 137, - "expected_attesting_rewards": "1065036" }, "grace_period": 5, - "active_staking_parameters": - { "limit_of_staking_over_baking_millionth": 0, - "edge_of_baking_over_staking_billionth": 1000000000 }, - "pending_staking_parameters": [], "baking_power": "4000000000000", - "total_staked": "200000000000", "total_delegated": "3800000000000", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, - "own_full_balance": "4000000000000", "own_staked": "200000000000", - "own_delegated": "3800000000000", "external_staked": "0", - "external_delegated": "0", - "total_unstaked_per_cycle": [ { "cycle": 0, "deposit": "0" } ], - "denunciations": [], "estimated_shared_pending_slashed_amount": "0", - "staking_denominator": "0", "current_voting_power": "4000000000000", - "voting_power": "4000000000000", - "voting_info": - { "voting_power": "4000000000000", "remaining_proposals": 20 }, - "consensus_key": - { "active": - { "pkh": "[PUBLIC_KEY_HASH]", - "pk": "[PUBLIC_KEY]" } }, - "stakers": - [ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ], - "delegators": [ "[PUBLIC_KEY_HASH]" ] } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out deleted file mode 100644 index 16599d651348..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1386666", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 101, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 8, - "cache_sampler_state_cycles": 8, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 151200, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 112, - "smart_rollup_max_lookahead_in_blocks": 324000, - "smart_rollup_max_active_outbox_levels": 151200, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 75600, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_data_dir) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out deleted file mode 100644 index dccc7e28785e..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out +++ /dev/null @@ -1,70 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/total_supply -"20000001416766" - -./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake -"1000000000000" - -./octez-client rpc get /chains/main/blocks/head/context/total_currently_staked -{ "delegates": "1000000016667", "delegators": "0", "overstaked": "0" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate -"210.260" - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_exact -{ "numerator": "700868433120000", "denominator": "3333333569461" } - -./octez-client rpc get /chains/main/blocks/head/context/issuance/issuance_per_minute -"80007812" - -./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -5 - -./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance -[ { "cycle": 0, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 1, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" }, - { "cycle": 2, "baking_reward_fixed_portion": "333333", - "baking_reward_bonus_per_slot": "1302", - "attesting_reward_per_slot": "2604", "seed_nonce_revelation_tip": "260", - "vdf_revelation_tip": "260" } ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/stakers' -[ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/context/issuance/current_yearly_rate_details -{ "static": - { "numerator": "700868433120000", "denominator": "3333333569461" }, - "dynamic": { "numerator": "0", "denominator": "1" } } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/total_delegated_stake' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_denominator' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/staking_numerator' -"0" diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- contracts.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- contracts.out deleted file mode 100644 index f0233dd45418..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- contracts.out +++ /dev/null @@ -1,553 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "3800000000000", - "delegate": "[PUBLIC_KEY_HASH]", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"3800000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "0", "counter": "0" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "100000000", "counter": "1" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"100000000" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"1" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' -{ "balance": "99999566", "delegate": "[PUBLIC_KEY_HASH]", - "counter": "4" } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/balance' -"99999566" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/counter' -"4" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/manager_key' -"[PUBLIC_KEY]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/delegate' -"[PUBLIC_KEY_HASH]" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/entrypoints' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/script' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/storage' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": - { "prim": "Some", "args": [ { "string": "initial storage" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": {} } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "parameter", "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": [ { "prim": "option", "args": [ { "prim": "string" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "CAR" }, { "prim": "SOME" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ], - "storage": { "prim": "Some", "args": [ { "string": "initial storage" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Some", "args": [ { "string": "initial storage" } ] } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]' -{ "balance": "0", - "script": - { "code": - [ { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", - "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": - [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": - "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": - { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/counter' -Fatal error: - No service found at this URL - - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/manager_key' -Fatal error: - No service found at this URL - - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "int": "0" - }, - "type": { - "prim": "int" - } -}' -null - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/entrypoints' -{ "entrypoints": - { "rem_right": { "prim": "string" }, "rem_left": { "prim": "string" }, - "rem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%rem_left" ] }, - { "prim": "string", "annots": [ "%rem_right" ] } ] }, - "mem_right": { "prim": "string" }, "mem_left": { "prim": "string" }, - "mem": - { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", "annots": [ "%mem_right" ] } ] }, - "default": { "prim": "unit" }, - "add_right": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add_left": - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - "add": - { "prim": "or", - "args": - [ { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": [ { "prim": "string" }, { "prim": "nat" } ], - "annots": [ "%add_right" ] } ] } } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/script' -{ "code": - [ { "prim": "storage", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] }, - { "prim": "big_map", - "args": [ { "prim": "string" }, { "prim": "nat" } ] } ] } ] }, - { "prim": "parameter", - "args": - [ { "prim": "or", - "args": - [ { "prim": "unit", "annots": [ "%default" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "string", "annots": [ "%mem_left" ] }, - { "prim": "string", - "annots": [ "%mem_right" ] } ], - "annots": [ "%mem" ] }, - { "prim": "or", - "args": - [ { "prim": "or", - "args": - [ { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_left" ] }, - { "prim": "pair", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ], - "annots": [ "%add_right" ] } ], - "annots": [ "%add" ] }, - { "prim": "or", - "args": - [ { "prim": "string", - "annots": [ "%rem_left" ] }, - { "prim": "string", - "annots": [ "%rem_right" ] } ], - "annots": [ "%rem" ] } ] } ] } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DROP" }, { "prim": "DUP" }, - { "prim": "CAR" }, - { "prim": "PUSH", - "args": [ { "prim": "mutez" }, { "int": "0" } ] }, - { "prim": "NONE", "args": [ { "prim": "key_hash" } ] }, - { "prim": "CREATE_CONTRACT", - "args": - [ [ { "prim": "parameter", - "args": [ { "prim": "string" } ] }, - { "prim": "storage", - "args": - [ { "prim": "big_map", - "args": - [ { "prim": "string" }, - { "prim": "nat" } ] } ] }, - { "prim": "code", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DROP" }, - { "prim": "NIL", - "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] }, - { "prim": "DIP", "args": [ [ { "prim": "DROP" } ] ] }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "SWAP" }, { "prim": "CONS" }, - { "prim": "PAIR" } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ] ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": [ [ { "prim": "DUP" } ] ] }, - { "prim": "MEM" }, - [ { "prim": "IF", - "args": - [ [], - [ [ { "prim": "UNIT" }, - { "prim": "FAILWITH" } ] ] ] } ], - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "UNPAIR" }, - { "prim": "DIP", - "args": - [ { "int": "2" }, - [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "SOME" } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ], - [ { "prim": "IF_LEFT", - "args": - [ [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" } ], - [ { "prim": "DIP", - "args": - [ [ { "prim": "UNPAIR" }, - { "prim": "SWAP" } ] ] }, - { "prim": "DIP", - "args": - [ [ { "prim": "NONE", - "args": - [ { "prim": "nat" } ] } ] ] }, - { "prim": "UPDATE" }, - { "prim": "SWAP" } ] ] } ] ] } ] ] }, - { "prim": "PAIR" }, - { "prim": "NIL", "args": [ { "prim": "operation" } ] }, - { "prim": "PAIR" } ] ] } ] ] } ], - "storage": { "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } } - -./octez-client rpc get '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/storage' -{ "prim": "Pair", "args": [ { "int": "4" }, { "int": "5" } ] } - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "test" - }, - "type": { - "prim": "string" - } -}' -null - -./octez-client rpc post '/chains/main/blocks/head/context/contracts/[CONTRACT_HASH]/big_map_get' with '{ - "key": { - "string": "dup" - }, - "type": { - "prim": "string" - } -}' -null diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- delegates.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- delegates.out deleted file mode 100644 index 28829e740f34..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- delegates.out +++ /dev/null @@ -1,122 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/contracts -[ "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[CONTRACT_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get /chains/main/blocks/head/context/delegates -[ "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]", - "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -{ "deactivated": false, "is_forbidden": false, - "participation": - { "expected_cycle_activity": 409, "minimal_cycle_activity": 272, - "missed_slots": 0, "missed_levels": 0, - "remaining_allowed_missed_slots": 137, - "expected_attesting_rewards": "1065036" }, "grace_period": 5, - "active_staking_parameters": - { "limit_of_staking_over_baking_millionth": 0, - "edge_of_baking_over_staking_billionth": 1000000000 }, - "pending_staking_parameters": [], "baking_power": "4000000000000", - "total_staked": "200000000000", "total_delegated": "3800000000000", - "min_delegated_in_current_cycle": - { "amount": "3800000000000", - "level": - { "level": 1, "level_position": 0, "cycle": 0, "cycle_position": 0, - "expected_commitment": false } }, - "own_full_balance": "4000000000000", "own_staked": "200000000000", - "own_delegated": "3800000000000", "external_staked": "0", - "external_delegated": "0", - "total_unstaked_per_cycle": [ { "cycle": 0, "deposit": "0" } ], - "denunciations": [], "estimated_shared_pending_slashed_amount": "0", - "staking_denominator": "0", "current_voting_power": "4000000000000", - "voting_power": "4000000000000", - "voting_info": - { "voting_power": "4000000000000", "remaining_proposals": 20 }, - "consensus_key": - { "active": - { "pkh": "[PUBLIC_KEY_HASH]", - "pk": "[PUBLIC_KEY]" } }, - "stakers": - [ { "staker": "[PUBLIC_KEY_HASH]", - "frozen_deposits": "200000000000" } ], - "delegators": [ "[PUBLIC_KEY_HASH]" ] } - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -"200000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -false - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -"0" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -[ "[PUBLIC_KEY_HASH]" ] - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -5 - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -"4000000000000" - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/full_balance' -Fatal error: - Command failed: The implicit account ([PUBLIC_KEY_HASH]) whose balance was requested is not a registered delegate. To get the balance of this account you can use the ../context/contracts/[PUBLIC_KEY_HASH]/balance RPC. - The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/frozen_deposits' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/deactivated' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/delegated_contracts' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/grace_period' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/staking_balance' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - - -./octez-client rpc get '/chains/main/blocks/head/context/delegates/[PUBLIC_KEY_HASH]/voting_power' -Fatal error: - Command failed: The provided public key hash ([PUBLIC_KEY_HASH]) is not the address of a registered delegate. If you own this account and want to register it as a delegate, use a delegation operation to delegate the account to itself. - diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out deleted file mode 100644 index 16599d651348..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ /dev/null @@ -1,137 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/context/constants -{ "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, "cache_layout_size": 3, - "michelson_maximum_type_size": 2001, "max_slashing_period": 2, - "smart_rollup_max_wrapped_proof_binary_size": 30000, - "smart_rollup_message_size_limit": 4096, - "smart_rollup_max_number_of_messages_per_level": "1000000", - "consensus_rights_delay": 2, "blocks_preservation_cycles": 1, - "delegate_parameters_activation_delay": 2, "blocks_per_cycle": 8, - "blocks_per_commitment": 4, "nonce_revelation_threshold": 4, - "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "1386666", - "proof_of_work_threshold": "4611686018427387903", - "minimal_stake": "6000000000", "minimal_frozen_stake": "600000000", - "vdf_difficulty": "50000", "origination_size": 257, - "issuance_weights": - { "base_total_issued_per_minute": "80007812", - "baking_reward_fixed_portion_weight": 5120, - "baking_reward_bonus_weight": 5120, "attesting_reward_weight": 10240, - "seed_nonce_revelation_tip_weight": 1, "vdf_revelation_tip_weight": 1 }, - "cost_per_byte": "250", "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, "quorum_max": 7000, "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "5000000", - "liquidity_baking_toggle_ema_threshold": 1000000000, - "max_operations_time_to_live": 8, "minimal_block_delay": "1", - "delay_increment_per_round": "1", "consensus_committee_size": 256, - "consensus_threshold": 0, - "minimal_participation_ratio": { "numerator": 2, "denominator": 3 }, - "limit_of_delegation_over_baking": 19, - "percentage_of_frozen_deposits_slashed_per_double_baking": 500, - "percentage_of_frozen_deposits_slashed_per_double_attestation": 5000, - "max_slashing_per_block": 10000, "max_slashing_threshold": 101, - "cache_script_size": 100000000, "cache_stake_distribution_cycles": 8, - "cache_sampler_state_cycles": 8, - "dal_parametric": - { "feature_enable": true, "incentives_enable": false, - "number_of_slots": 16, "attestation_lag": 8, - "attestation_threshold": 66, "redundancy_factor": 8, "page_size": 3967, - "slot_size": 126944, "number_of_shards": 256 }, - "smart_rollup_arith_pvm_enable": false, - "smart_rollup_origination_size": 6314, - "smart_rollup_challenge_window_in_blocks": 151200, - "smart_rollup_stake_amount": "10000000000", - "smart_rollup_commitment_period_in_blocks": 112, - "smart_rollup_max_lookahead_in_blocks": 324000, - "smart_rollup_max_active_outbox_levels": 151200, - "smart_rollup_max_outbox_messages_per_level": 100, - "smart_rollup_number_of_sections_in_dissection": 32, - "smart_rollup_timeout_period_in_blocks": 75600, - "smart_rollup_max_number_of_cemented_commitments": 5, - "smart_rollup_max_number_of_parallel_games": 32, - "smart_rollup_reveal_activation_level": - { "raw_data": { "Blake2B": 0 }, "metadata": 0, "dal_page": 1, - "dal_parameters": 1, "dal_attested_slots_validity_lag": 241920 }, - "smart_rollup_private_enable": true, - "smart_rollup_riscv_pvm_enable": false, "zk_rollup_enable": false, - "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "zk_rollup_max_ticket_payload_size": 2048, - "global_limit_of_staking_over_baking": 5, - "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 0, - "adaptive_rewards_params": - { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, - "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, - "issuance_ratio_initial_min": - { "numerator": "9", "denominator": "200" }, - "issuance_ratio_initial_max": - { "numerator": "11", "denominator": "200" }, "initial_period": 10, - "transition_period": 50, "max_bonus": "50000000000000", - "growth_rate": { "numerator": "1", "denominator": "100" }, - "center_dz": { "numerator": "1", "denominator": "2" }, - "radius_dz": { "numerator": "1", "denominator": "50" } }, - "adaptive_issuance_activation_vote_enable": true, - "autostaking_enable": true, "adaptive_issuance_force_activation": false, - "ns_enable": true, "direct_ticket_spending_enable": false } - -./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 0, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 1, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 3, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 4, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/baking_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 3, "delegate": "[PUBLIC_KEY_HASH]", - "round": 2, "estimated_time": "[TIMESTAMP]", - "consensus_key": "[PUBLIC_KEY_HASH]" } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/current_level?offset=0' -{ "level": 2, "level_position": 1, "cycle": 0, "cycle_position": 1, - "expected_commitment": false } - -./octez-client rpc get /chains/main/blocks/head/context/denunciations -[] - -./octez-client rpc get /chains/main/blocks/head/helpers/attestation_rights -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 10, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 3, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 2, "attestation_power": 65, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" }, - { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 0, "attestation_power": 41, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get '/chains/main/blocks/head/helpers/attestation_rights?delegate=[PUBLIC_KEY_HASH]' -[ { "level": 2, - "delegates": - [ { "delegate": "[PUBLIC_KEY_HASH]", - "first_slot": 1, "attestation_power": 50, - "consensus_key": "[PUBLIC_KEY_HASH]" } ] } ] - -./octez-client rpc get /chains/main/blocks/head/helpers/levels_in_current_cycle -{ "first": 1, "last": 8 } diff --git a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- votes.out b/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- votes.out deleted file mode 100644 index 92b45913298a..000000000000 --- a/tezt/tests/expected/RPC_test.ml/Quebeca- (mode proxy_server_rpc) RPC regression tests- votes.out +++ /dev/null @@ -1,78 +0,0 @@ - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "0", "nay": "0", "pass": "0" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -null - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[ [ "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp", "4000000000000" ] ] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 0, "kind": "proposal", "start_position": 0 }, - "position": 3, "remaining": 0 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000000000000" - -./octez-client rpc get /chains/main/blocks/head/votes/ballot_list -[ { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "nay" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "pass" }, - { "pkh": "[PUBLIC_KEY_HASH]", "ballot": "yay" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/ballots -{ "yay": "4000001679643", "nay": "4000000000000", "pass": "4000000000000" } - -./octez-client rpc get /chains/main/blocks/head/votes/current_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 1, "remaining": 2 } - -./octez-client rpc get /chains/main/blocks/head/votes/current_proposal -"ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" - -./octez-client rpc get /chains/main/blocks/head/votes/current_quorum -5500 - -./octez-client rpc get /chains/main/blocks/head/votes/listings -[ { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000000000000" }, - { "pkh": "[PUBLIC_KEY_HASH]", - "voting_power": "4000001679643" } ] - -./octez-client rpc get /chains/main/blocks/head/votes/proposals -[] - -./octez-client rpc get /chains/main/blocks/head/votes/successor_period -{ "voting_period": { "index": 1, "kind": "exploration", "start_position": 4 }, - "position": 2, "remaining": 1 } - -./octez-client rpc get /chains/main/blocks/head/votes/total_voting_power -"20000001679643" -- GitLab From 2b9a601731486bcb91da5144ca3462830f43250b Mon Sep 17 00:00:00 2001 From: Victor Allombert <victor.allombert@nomadic-labs.com> Date: Wed, 7 Aug 2024 14:58:34 +0200 Subject: [PATCH 8/8] Changelog: notice octez-proxy-server binary removal --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3add8b87bed5..c15f18a8ce40 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -128,6 +128,8 @@ Node environment variable, if it is set to 'yes' or 'y', nodes must explicitly be launched with the ``--allow-yes-crypto`` argument to run. +- **Breaking change** removed the ``octez-proxy-server`` binary. The + feature is subsumed by the external RPC server. Client ------ -- GitLab