diff --git a/bin_node/jbuild b/bin_node/jbuild index 4c791455c..d4d47142b 100644 --- a/bin_node/jbuild +++ b/bin_node/jbuild @@ -4,10 +4,10 @@ ((name main) (public_name tezos-node) (libraries (tezos-base + tezos-rpc-http tezos-node-updater tezos-node-p2p-base tezos-node-p2p - tezos-node-http tezos-node-shell tezos-embedded-protocol-genesis tezos-embedded-protocol-demo @@ -17,10 +17,10 @@ (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives + -open Tezos_rpc_http -open Tezos_node_updater -open Tezos_node_p2p_base -open Tezos_node_p2p - -open Tezos_node_http -open Tezos_node_shell -linkall)))) diff --git a/lib_base/jbuild b/lib_base/jbuild index 68ab59e9b..e3940b6a6 100644 --- a/lib_base/jbuild +++ b/lib_base/jbuild @@ -7,12 +7,14 @@ -open Tezos_stdlib_lwt -open Tezos_crypto -open Tezos_data_encoding - -open Tezos_error_monad)) + -open Tezos_error_monad + -open Tezos_rpc_base)) (libraries (tezos-stdlib tezos-stdlib-lwt tezos-crypto tezos-data-encoding tezos-error-monad + tezos-rpc-base calendar ezjsonm mtime.clock.os)))) diff --git a/lib_base/tzPervasives.ml b/lib_base/tzPervasives.ml index d7373e375..9dfee0838 100644 --- a/lib_base/tzPervasives.ml +++ b/lib_base/tzPervasives.ml @@ -12,6 +12,7 @@ include Tezos_stdlib_lwt include Tezos_crypto include Tezos_data_encoding include Tezos_error_monad +include Tezos_rpc_base module List = struct include List diff --git a/lib_base/tzPervasives.mli b/lib_base/tzPervasives.mli index 294f4f278..3bbda6c9e 100644 --- a/lib_base/tzPervasives.mli +++ b/lib_base/tzPervasives.mli @@ -12,6 +12,7 @@ include (module type of (struct include Tezos_data_encoding end)) include (module type of (struct include Tezos_stdlib_lwt end)) include (module type of (struct include Tezos_crypto end)) include (module type of (struct include Tezos_error_monad end)) +include (module type of (struct include Tezos_rpc_base end)) module List : sig include (module type of (struct include List end)) diff --git a/lib_client_base/jbuild b/lib_client_base/jbuild index ea5d25b86..7080394fd 100644 --- a/lib_client_base/jbuild +++ b/lib_client_base/jbuild @@ -5,18 +5,18 @@ (public_name tezos-client-base) (libraries (tezos-base tezos-storage + tezos-rpc-http tezos-node-p2p-base tezos-node-services - tezos-node-http tezos-node-updater tezos-protocol-compiler)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives -open Tezos_storage + -open Tezos_rpc_http -open Tezos_node_p2p_base -open Tezos_node_services - -open Tezos_node_http -open Tezos_node_updater)))) (alias diff --git a/lib_client_base/tezos-client-base.opam b/lib_client_base/tezos-client-base.opam index 21476eef3..198d70272 100644 --- a/lib_client_base/tezos-client-base.opam +++ b/lib_client_base/tezos-client-base.opam @@ -11,9 +11,9 @@ depends: [ "jbuilder" { build & >= "1.0+beta15" } "tezos-base" "tezos-storage" + "tezos-rpc-http" "tezos-node-p2p-base" "tezos-node-services" - "tezos-node-http" "tezos-node-updater" "tezos-protocol-compiler" "tezos-embedded-protocol-genesis" diff --git a/lib_node_services/jbuild b/lib_node_services/jbuild index e85a26684..972d9753d 100644 --- a/lib_node_services/jbuild +++ b/lib_node_services/jbuild @@ -4,8 +4,7 @@ ((name tezos_node_services) (public_name tezos-node-services) (libraries (tezos-base - tezos-node-p2p-base - ocplib-resto)) + tezos-node-p2p-base)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives diff --git a/lib_node_shell/jbuild b/lib_node_shell/jbuild index e85c4780d..bd262a06c 100644 --- a/lib_node_shell/jbuild +++ b/lib_node_shell/jbuild @@ -5,6 +5,7 @@ (public_name tezos-node-shell) (libraries (tezos-base tezos-storage + tezos-rpc-http tezos-node-services tezos-node-p2p-base tezos-node-p2p @@ -13,8 +14,8 @@ -safe-string -open Tezos_base__TzPervasives -open Tezos_storage + -open Tezos_rpc_http -open Tezos_node_services - -open Tezos_node_http -open Tezos_node_p2p_base -open Tezos_node_p2p -open Tezos_node_updater)))) diff --git a/lib_node_updater/jbuild b/lib_node_updater/jbuild index 4e5cb2bfb..c80e76a3e 100644 --- a/lib_node_updater/jbuild +++ b/lib_node_updater/jbuild @@ -7,9 +7,9 @@ tezos-micheline tezos-protocol-compiler tezos-storage + tezos-rpc-http tezos-node-services tezos-node-p2p-base - tezos-node-http dynlink)) (flags (:standard -w -9+27-30-32-40@8 -safe-string @@ -17,8 +17,8 @@ -open Tezos_micheline -open Tezos_protocol_compiler -open Tezos_storage + -open Tezos_rpc_http -open Tezos_node_services - -open Tezos_node_http -open Tezos_node_p2p_base)))) (alias diff --git a/lib_node_updater/tezos-node-updater.opam b/lib_node_updater/tezos-node-updater.opam index e51631f08..3612c2d14 100644 --- a/lib_node_updater/tezos-node-updater.opam +++ b/lib_node_updater/tezos-node-updater.opam @@ -13,9 +13,9 @@ depends: [ "tezos-micheline" "tezos-protocol-compiler" "tezos-storage" + "tezos-rpc-http" "tezos-node-services" "tezos-node-p2p-base" - "tezos-node-http" ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/lib_node_services/RPC_arg.ml b/lib_rpc-base/RPC_arg.ml similarity index 100% rename from lib_node_services/RPC_arg.ml rename to lib_rpc-base/RPC_arg.ml diff --git a/lib_node_services/RPC_arg.mli b/lib_rpc-base/RPC_arg.mli similarity index 100% rename from lib_node_services/RPC_arg.mli rename to lib_rpc-base/RPC_arg.mli diff --git a/lib_node_services/RPC_description.ml b/lib_rpc-base/RPC_description.ml similarity index 100% rename from lib_node_services/RPC_description.ml rename to lib_rpc-base/RPC_description.ml diff --git a/lib_node_services/RPC_description.mli b/lib_rpc-base/RPC_description.mli similarity index 100% rename from lib_node_services/RPC_description.mli rename to lib_rpc-base/RPC_description.mli diff --git a/lib_node_services/RPC_encoding.ml b/lib_rpc-base/RPC_encoding.ml similarity index 100% rename from lib_node_services/RPC_encoding.ml rename to lib_rpc-base/RPC_encoding.ml diff --git a/lib_node_services/RPC_encoding.mli b/lib_rpc-base/RPC_encoding.mli similarity index 100% rename from lib_node_services/RPC_encoding.mli rename to lib_rpc-base/RPC_encoding.mli diff --git a/lib_node_services/RPC_path.ml b/lib_rpc-base/RPC_path.ml similarity index 100% rename from lib_node_services/RPC_path.ml rename to lib_rpc-base/RPC_path.ml diff --git a/lib_node_services/RPC_path.mli b/lib_rpc-base/RPC_path.mli similarity index 100% rename from lib_node_services/RPC_path.mli rename to lib_rpc-base/RPC_path.mli diff --git a/lib_node_services/RPC_query.ml b/lib_rpc-base/RPC_query.ml similarity index 100% rename from lib_node_services/RPC_query.ml rename to lib_rpc-base/RPC_query.ml diff --git a/lib_node_services/RPC_query.mli b/lib_rpc-base/RPC_query.mli similarity index 100% rename from lib_node_services/RPC_query.mli rename to lib_rpc-base/RPC_query.mli diff --git a/lib_node_services/RPC_service.ml b/lib_rpc-base/RPC_service.ml similarity index 100% rename from lib_node_services/RPC_service.ml rename to lib_rpc-base/RPC_service.ml diff --git a/lib_node_services/RPC_service.mli b/lib_rpc-base/RPC_service.mli similarity index 100% rename from lib_node_services/RPC_service.mli rename to lib_rpc-base/RPC_service.mli diff --git a/lib_rpc-base/jbuild b/lib_rpc-base/jbuild new file mode 100644 index 000000000..a764832c0 --- /dev/null +++ b/lib_rpc-base/jbuild @@ -0,0 +1,15 @@ +(jbuild_version 1) + +(library + ((name tezos_rpc_base) + (public_name tezos-rpc-base) + (libraries (tezos-data-encoding + ocplib-resto)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_data_encoding)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml) (glob_files *.mli))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/lib_rpc-base/tezos-rpc-base.opam b/lib_rpc-base/tezos-rpc-base.opam new file mode 100644 index 000000000..8eb6aba45 --- /dev/null +++ b/lib_rpc-base/tezos-rpc-base.opam @@ -0,0 +1,20 @@ +opam-version: "1.2" +version: "dev" +maintainer: "contact@tezos.com" +authors: [ "Tezos devteam" ] +homepage: "https://www.tezos.com/" +bug-reports: "https://gitlab.com/tezos/tezos/issues" +dev-repo: "https://gitlab.com/tezos/tezos.git" +license: "unreleased" +depends: [ + "ocamlfind" { build } + "jbuilder" { build & >= "1.0+beta15" } + "tezos-data-encoding" + "ocplib-resto" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/lib_node_http/RPC_answer.ml b/lib_rpc-http/RPC_answer.ml similarity index 100% rename from lib_node_http/RPC_answer.ml rename to lib_rpc-http/RPC_answer.ml diff --git a/lib_node_http/RPC_answer.mli b/lib_rpc-http/RPC_answer.mli similarity index 100% rename from lib_node_http/RPC_answer.mli rename to lib_rpc-http/RPC_answer.mli diff --git a/lib_node_http/RPC_client.ml b/lib_rpc-http/RPC_client.ml similarity index 100% rename from lib_node_http/RPC_client.ml rename to lib_rpc-http/RPC_client.ml diff --git a/lib_node_http/RPC_client.mli b/lib_rpc-http/RPC_client.mli similarity index 100% rename from lib_node_http/RPC_client.mli rename to lib_rpc-http/RPC_client.mli diff --git a/lib_node_http/RPC_directory.ml b/lib_rpc-http/RPC_directory.ml similarity index 100% rename from lib_node_http/RPC_directory.ml rename to lib_rpc-http/RPC_directory.ml diff --git a/lib_node_http/RPC_directory.mli b/lib_rpc-http/RPC_directory.mli similarity index 100% rename from lib_node_http/RPC_directory.mli rename to lib_rpc-http/RPC_directory.mli diff --git a/lib_node_http/RPC_server.ml b/lib_rpc-http/RPC_server.ml similarity index 100% rename from lib_node_http/RPC_server.ml rename to lib_rpc-http/RPC_server.ml diff --git a/lib_node_http/RPC_server.mli b/lib_rpc-http/RPC_server.mli similarity index 100% rename from lib_node_http/RPC_server.mli rename to lib_rpc-http/RPC_server.mli diff --git a/lib_node_http/jbuild b/lib_rpc-http/jbuild similarity index 83% rename from lib_node_http/jbuild rename to lib_rpc-http/jbuild index 3f32bbe10..da175c374 100644 --- a/lib_node_http/jbuild +++ b/lib_rpc-http/jbuild @@ -1,8 +1,8 @@ (jbuild_version 1) (library - ((name tezos_node_http) - (public_name tezos-node-http) + ((name tezos_rpc_http) + (public_name tezos-rpc-http) (libraries (tezos-base tezos-node-services ocplib-resto-directory @@ -10,6 +10,7 @@ (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives + -open Tezos_rpc_base -open Tezos_node_services)))) (alias diff --git a/lib_node_http/media_type.ml b/lib_rpc-http/media_type.ml similarity index 100% rename from lib_node_http/media_type.ml rename to lib_rpc-http/media_type.ml diff --git a/lib_node_http/media_type.mli b/lib_rpc-http/media_type.mli similarity index 100% rename from lib_node_http/media_type.mli rename to lib_rpc-http/media_type.mli diff --git a/lib_node_http/tezos-node-http.opam b/lib_rpc-http/tezos-rpc-http.opam similarity index 100% rename from lib_node_http/tezos-node-http.opam rename to lib_rpc-http/tezos-rpc-http.opam