diff --git a/src/attacker_main.ml b/bin_attacker/attacker_main.ml similarity index 100% rename from src/attacker_main.ml rename to bin_attacker/attacker_main.ml diff --git a/src/attacker/attacker_minimal.ml b/bin_attacker/attacker_minimal.ml similarity index 100% rename from src/attacker/attacker_minimal.ml rename to bin_attacker/attacker_minimal.ml diff --git a/src/attacker/attacker_minimal.mli b/bin_attacker/attacker_minimal.mli similarity index 100% rename from src/attacker/attacker_minimal.mli rename to bin_attacker/attacker_minimal.mli diff --git a/bin_client/jbuild b/bin_client/jbuild new file mode 100644 index 000000000..ac0000176 --- /dev/null +++ b/bin_client/jbuild @@ -0,0 +1,19 @@ +(jbuild_version 1) + +(executable + ((name main) + (public_name tezos-client) + (libraries (tezos-base + tezos-client-base + tezos-embedded-client-genesis + tezos-embedded-client-alpha)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_client_base + -linkall)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml) (glob_files *.mli))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/client_main.ml b/bin_client/main.ml similarity index 100% rename from src/client_main.ml rename to bin_client/main.ml diff --git a/bin_client/tezos-client.opam b/bin_client/tezos-client.opam new file mode 100644 index 000000000..428d8be2e --- /dev/null +++ b/bin_client/tezos-client.opam @@ -0,0 +1,19 @@ +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-base" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/bin_node/jbuild b/bin_node/jbuild new file mode 100644 index 000000000..8fdbd58a4 --- /dev/null +++ b/bin_node/jbuild @@ -0,0 +1,25 @@ +(jbuild_version 1) + +(executable + ((name main) + (public_name tezos-node) + (libraries (tezos-base + tezos-node-updater + tezos-node-net + tezos-node-shell + tezos-embedded-protocol-genesis + tezos-embedded-protocol-demo + tezos-embedded-protocol-alpha + cmdliner)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_node_updater + -open Tezos_node_net + -open Tezos_node_shell + -linkall)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml) (glob_files *.mli))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/node_main.ml b/bin_node/main.ml similarity index 100% rename from src/node_main.ml rename to bin_node/main.ml diff --git a/src/node/main/node_config_command.ml b/bin_node/node_config_command.ml similarity index 100% rename from src/node/main/node_config_command.ml rename to bin_node/node_config_command.ml diff --git a/src/node/main/node_config_command.mli b/bin_node/node_config_command.mli similarity index 100% rename from src/node/main/node_config_command.mli rename to bin_node/node_config_command.mli diff --git a/src/node/main/node_config_file.ml b/bin_node/node_config_file.ml similarity index 100% rename from src/node/main/node_config_file.ml rename to bin_node/node_config_file.ml diff --git a/src/node/main/node_config_file.mli b/bin_node/node_config_file.mli similarity index 100% rename from src/node/main/node_config_file.mli rename to bin_node/node_config_file.mli diff --git a/src/node/main/node_data_version.ml b/bin_node/node_data_version.ml similarity index 100% rename from src/node/main/node_data_version.ml rename to bin_node/node_data_version.ml diff --git a/src/node/main/node_data_version.mli b/bin_node/node_data_version.mli similarity index 100% rename from src/node/main/node_data_version.mli rename to bin_node/node_data_version.mli diff --git a/src/node/main/node_identity_command.ml b/bin_node/node_identity_command.ml similarity index 100% rename from src/node/main/node_identity_command.ml rename to bin_node/node_identity_command.ml diff --git a/src/node/main/node_identity_command.mli b/bin_node/node_identity_command.mli similarity index 100% rename from src/node/main/node_identity_command.mli rename to bin_node/node_identity_command.mli diff --git a/src/node/main/node_identity_file.ml b/bin_node/node_identity_file.ml similarity index 100% rename from src/node/main/node_identity_file.ml rename to bin_node/node_identity_file.ml diff --git a/src/node/main/node_identity_file.mli b/bin_node/node_identity_file.mli similarity index 100% rename from src/node/main/node_identity_file.mli rename to bin_node/node_identity_file.mli diff --git a/src/node/main/node_run_command.ml b/bin_node/node_run_command.ml similarity index 100% rename from src/node/main/node_run_command.ml rename to bin_node/node_run_command.ml diff --git a/src/node/main/node_run_command.mli b/bin_node/node_run_command.mli similarity index 100% rename from src/node/main/node_run_command.mli rename to bin_node/node_run_command.mli diff --git a/src/node/main/node_shared_arg.ml b/bin_node/node_shared_arg.ml similarity index 100% rename from src/node/main/node_shared_arg.ml rename to bin_node/node_shared_arg.ml diff --git a/src/node/main/node_shared_arg.mli b/bin_node/node_shared_arg.mli similarity index 100% rename from src/node/main/node_shared_arg.mli rename to bin_node/node_shared_arg.mli diff --git a/bin_node/tezos-node.opam b/bin_node/tezos-node.opam new file mode 100644 index 000000000..604c6a661 --- /dev/null +++ b/bin_node/tezos-node.opam @@ -0,0 +1,23 @@ +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-base" + "tezos-embedded-protocol-genesis" + "tezos-embedded-protocol-demo" + "tezos-embedded-protocol-alpha" + "cmdliner" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/jbuild-workspace b/jbuild-workspace new file mode 100644 index 000000000..e69de29bb diff --git a/src/client/client_aliases.ml b/lib_client_base/client_aliases.ml similarity index 100% rename from src/client/client_aliases.ml rename to lib_client_base/client_aliases.ml diff --git a/src/client/client_aliases.mli b/lib_client_base/client_aliases.mli similarity index 100% rename from src/client/client_aliases.mli rename to lib_client_base/client_aliases.mli diff --git a/src/client/client_commands.ml b/lib_client_base/client_commands.ml similarity index 100% rename from src/client/client_commands.ml rename to lib_client_base/client_commands.ml diff --git a/src/client/client_commands.mli b/lib_client_base/client_commands.mli similarity index 100% rename from src/client/client_commands.mli rename to lib_client_base/client_commands.mli diff --git a/src/client/client_config.ml b/lib_client_base/client_config.ml similarity index 100% rename from src/client/client_config.ml rename to lib_client_base/client_config.ml diff --git a/src/client/client_generic_rpcs.ml b/lib_client_base/client_generic_rpcs.ml similarity index 100% rename from src/client/client_generic_rpcs.ml rename to lib_client_base/client_generic_rpcs.ml diff --git a/src/client/client_generic_rpcs.mli b/lib_client_base/client_generic_rpcs.mli similarity index 100% rename from src/client/client_generic_rpcs.mli rename to lib_client_base/client_generic_rpcs.mli diff --git a/src/client/client_helpers.ml b/lib_client_base/client_helpers.ml similarity index 100% rename from src/client/client_helpers.ml rename to lib_client_base/client_helpers.ml diff --git a/src/client/client_helpers.mli b/lib_client_base/client_helpers.mli similarity index 100% rename from src/client/client_helpers.mli rename to lib_client_base/client_helpers.mli diff --git a/src/client/client_keys.ml b/lib_client_base/client_keys.ml similarity index 100% rename from src/client/client_keys.ml rename to lib_client_base/client_keys.ml diff --git a/src/client/client_keys.mli b/lib_client_base/client_keys.mli similarity index 100% rename from src/client/client_keys.mli rename to lib_client_base/client_keys.mli diff --git a/src/client/client_network.ml b/lib_client_base/client_network.ml similarity index 100% rename from src/client/client_network.ml rename to lib_client_base/client_network.ml diff --git a/src/client/client_network.mli b/lib_client_base/client_network.mli similarity index 100% rename from src/client/client_network.mli rename to lib_client_base/client_network.mli diff --git a/src/client/client_node_rpcs.ml b/lib_client_base/client_node_rpcs.ml similarity index 100% rename from src/client/client_node_rpcs.ml rename to lib_client_base/client_node_rpcs.ml diff --git a/src/client/client_node_rpcs.mli b/lib_client_base/client_node_rpcs.mli similarity index 100% rename from src/client/client_node_rpcs.mli rename to lib_client_base/client_node_rpcs.mli diff --git a/src/client/client_protocols.ml b/lib_client_base/client_protocols.ml similarity index 100% rename from src/client/client_protocols.ml rename to lib_client_base/client_protocols.ml diff --git a/src/client/client_protocols.mli b/lib_client_base/client_protocols.mli similarity index 100% rename from src/client/client_protocols.mli rename to lib_client_base/client_protocols.mli diff --git a/src/client/client_rpcs.ml b/lib_client_base/client_rpcs.ml similarity index 100% rename from src/client/client_rpcs.ml rename to lib_client_base/client_rpcs.ml diff --git a/src/client/client_rpcs.mli b/lib_client_base/client_rpcs.mli similarity index 100% rename from src/client/client_rpcs.mli rename to lib_client_base/client_rpcs.mli diff --git a/src/client/client_tags.ml b/lib_client_base/client_tags.ml similarity index 100% rename from src/client/client_tags.ml rename to lib_client_base/client_tags.ml diff --git a/src/client/client_tags.mli b/lib_client_base/client_tags.mli similarity index 100% rename from src/client/client_tags.mli rename to lib_client_base/client_tags.mli diff --git a/src/client/embedded/jbuild b/lib_client_base/embedded/jbuild similarity index 100% rename from src/client/embedded/jbuild rename to lib_client_base/embedded/jbuild diff --git a/lib_client_base/jbuild b/lib_client_base/jbuild new file mode 100644 index 000000000..44d63dc22 --- /dev/null +++ b/lib_client_base/jbuild @@ -0,0 +1,23 @@ +(jbuild_version 1) + +(library + ((name tezos_client_base) + (public_name tezos-client-base) + (libraries (tezos-base + tezos-node-shell + tezos-node-net + tezos-node-db + tezos-node-updater + tezos-protocol-compiler)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_node_net + -open Tezos_node_db + -open Tezos_node_updater + -open Tezos_node_shell)))) + +(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_client_base/tezos-client-base.opam b/lib_client_base/tezos-client-base.opam new file mode 100644 index 000000000..604c6a661 --- /dev/null +++ b/lib_client_base/tezos-client-base.opam @@ -0,0 +1,23 @@ +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-base" + "tezos-embedded-protocol-genesis" + "tezos-embedded-protocol-demo" + "tezos-embedded-protocol-alpha" + "cmdliner" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/client/embedded/alpha/client_baking_blocks.ml b/lib_embedded_client_alpha/client_baking_blocks.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_blocks.ml rename to lib_embedded_client_alpha/client_baking_blocks.ml diff --git a/src/client/embedded/alpha/client_baking_blocks.mli b/lib_embedded_client_alpha/client_baking_blocks.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_blocks.mli rename to lib_embedded_client_alpha/client_baking_blocks.mli diff --git a/src/client/embedded/alpha/client_baking_daemon.ml b/lib_embedded_client_alpha/client_baking_daemon.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_daemon.ml rename to lib_embedded_client_alpha/client_baking_daemon.ml diff --git a/src/client/embedded/alpha/client_baking_daemon.mli b/lib_embedded_client_alpha/client_baking_daemon.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_daemon.mli rename to lib_embedded_client_alpha/client_baking_daemon.mli diff --git a/src/client/embedded/alpha/client_baking_denunciation.ml b/lib_embedded_client_alpha/client_baking_denunciation.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_denunciation.ml rename to lib_embedded_client_alpha/client_baking_denunciation.ml diff --git a/src/client/embedded/alpha/client_baking_denunciation.mli b/lib_embedded_client_alpha/client_baking_denunciation.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_denunciation.mli rename to lib_embedded_client_alpha/client_baking_denunciation.mli diff --git a/src/client/embedded/alpha/client_baking_endorsement.ml b/lib_embedded_client_alpha/client_baking_endorsement.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_endorsement.ml rename to lib_embedded_client_alpha/client_baking_endorsement.ml diff --git a/src/client/embedded/alpha/client_baking_endorsement.mli b/lib_embedded_client_alpha/client_baking_endorsement.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_endorsement.mli rename to lib_embedded_client_alpha/client_baking_endorsement.mli diff --git a/src/client/embedded/alpha/client_baking_forge.ml b/lib_embedded_client_alpha/client_baking_forge.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_forge.ml rename to lib_embedded_client_alpha/client_baking_forge.ml diff --git a/src/client/embedded/alpha/client_baking_forge.mli b/lib_embedded_client_alpha/client_baking_forge.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_forge.mli rename to lib_embedded_client_alpha/client_baking_forge.mli diff --git a/src/client/embedded/alpha/client_baking_main.ml b/lib_embedded_client_alpha/client_baking_main.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_main.ml rename to lib_embedded_client_alpha/client_baking_main.ml diff --git a/src/client/embedded/alpha/client_baking_main.mli b/lib_embedded_client_alpha/client_baking_main.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_main.mli rename to lib_embedded_client_alpha/client_baking_main.mli diff --git a/src/client/embedded/alpha/client_baking_operations.ml b/lib_embedded_client_alpha/client_baking_operations.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_operations.ml rename to lib_embedded_client_alpha/client_baking_operations.ml diff --git a/src/client/embedded/alpha/client_baking_operations.mli b/lib_embedded_client_alpha/client_baking_operations.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_operations.mli rename to lib_embedded_client_alpha/client_baking_operations.mli diff --git a/src/client/embedded/alpha/client_baking_revelation.ml b/lib_embedded_client_alpha/client_baking_revelation.ml similarity index 100% rename from src/client/embedded/alpha/client_baking_revelation.ml rename to lib_embedded_client_alpha/client_baking_revelation.ml diff --git a/src/client/embedded/alpha/client_baking_revelation.mli b/lib_embedded_client_alpha/client_baking_revelation.mli similarity index 100% rename from src/client/embedded/alpha/client_baking_revelation.mli rename to lib_embedded_client_alpha/client_baking_revelation.mli diff --git a/src/client/embedded/alpha/client_proto_args.ml b/lib_embedded_client_alpha/client_proto_args.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_args.ml rename to lib_embedded_client_alpha/client_proto_args.ml diff --git a/src/client/embedded/alpha/client_proto_args.mli b/lib_embedded_client_alpha/client_proto_args.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_args.mli rename to lib_embedded_client_alpha/client_proto_args.mli diff --git a/src/client/embedded/alpha/client_proto_context.ml b/lib_embedded_client_alpha/client_proto_context.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_context.ml rename to lib_embedded_client_alpha/client_proto_context.ml diff --git a/src/client/embedded/alpha/client_proto_context.mli b/lib_embedded_client_alpha/client_proto_context.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_context.mli rename to lib_embedded_client_alpha/client_proto_context.mli diff --git a/src/client/embedded/alpha/client_proto_contracts.ml b/lib_embedded_client_alpha/client_proto_contracts.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_contracts.ml rename to lib_embedded_client_alpha/client_proto_contracts.ml diff --git a/src/client/embedded/alpha/client_proto_contracts.mli b/lib_embedded_client_alpha/client_proto_contracts.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_contracts.mli rename to lib_embedded_client_alpha/client_proto_contracts.mli diff --git a/src/client/embedded/alpha/client_proto_main.ml b/lib_embedded_client_alpha/client_proto_main.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_main.ml rename to lib_embedded_client_alpha/client_proto_main.ml diff --git a/src/client/embedded/alpha/client_proto_main.mli b/lib_embedded_client_alpha/client_proto_main.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_main.mli rename to lib_embedded_client_alpha/client_proto_main.mli diff --git a/src/client/embedded/alpha/client_proto_nonces.ml b/lib_embedded_client_alpha/client_proto_nonces.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_nonces.ml rename to lib_embedded_client_alpha/client_proto_nonces.ml diff --git a/src/client/embedded/alpha/client_proto_nonces.mli b/lib_embedded_client_alpha/client_proto_nonces.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_nonces.mli rename to lib_embedded_client_alpha/client_proto_nonces.mli diff --git a/src/client/embedded/alpha/client_proto_programs.ml b/lib_embedded_client_alpha/client_proto_programs.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_programs.ml rename to lib_embedded_client_alpha/client_proto_programs.ml diff --git a/src/client/embedded/alpha/client_proto_programs.mli b/lib_embedded_client_alpha/client_proto_programs.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_programs.mli rename to lib_embedded_client_alpha/client_proto_programs.mli diff --git a/src/client/embedded/alpha/client_proto_rpcs.ml b/lib_embedded_client_alpha/client_proto_rpcs.ml similarity index 100% rename from src/client/embedded/alpha/client_proto_rpcs.ml rename to lib_embedded_client_alpha/client_proto_rpcs.ml diff --git a/src/client/embedded/alpha/client_proto_rpcs.mli b/lib_embedded_client_alpha/client_proto_rpcs.mli similarity index 100% rename from src/client/embedded/alpha/client_proto_rpcs.mli rename to lib_embedded_client_alpha/client_proto_rpcs.mli diff --git a/src/client/embedded/alpha/jbuild b/lib_embedded_client_alpha/jbuild similarity index 73% rename from src/client/embedded/alpha/jbuild rename to lib_embedded_client_alpha/jbuild index 2cdb28d9e..193866132 100644 --- a/src/client/embedded/alpha/jbuild +++ b/lib_embedded_client_alpha/jbuild @@ -1,18 +1,21 @@ (jbuild_version 1) (library - ((name client_embedded_alpha) - (public_name tezos.client.embedded.alpha) + ((name tezos_embedded_client_alpha) + (public_name tezos-embedded-client-alpha) (libraries (tezos-base tezos-embedded-protocol-alpha tezos-embedded-protocol-alpha.raw - client_lib)) + tezos-node-shell + tezos-client-base)) (library_flags (:standard -linkall)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives -open Tezos_embedded_protocol_environment_alpha -open Tezos_embedded_raw_protocol_alpha + -open Tezos_node_shell + -open Tezos_client_base -open Tezos_context)))) (alias diff --git a/src/client/embedded/alpha/michelson_macros.ml b/lib_embedded_client_alpha/michelson_macros.ml similarity index 100% rename from src/client/embedded/alpha/michelson_macros.ml rename to lib_embedded_client_alpha/michelson_macros.ml diff --git a/src/client/embedded/alpha/michelson_macros.mli b/lib_embedded_client_alpha/michelson_macros.mli similarity index 100% rename from src/client/embedded/alpha/michelson_macros.mli rename to lib_embedded_client_alpha/michelson_macros.mli diff --git a/src/client/embedded/alpha/michelson_v1_emacs.ml b/lib_embedded_client_alpha/michelson_v1_emacs.ml similarity index 100% rename from src/client/embedded/alpha/michelson_v1_emacs.ml rename to lib_embedded_client_alpha/michelson_v1_emacs.ml diff --git a/src/client/embedded/alpha/michelson_v1_emacs.mli b/lib_embedded_client_alpha/michelson_v1_emacs.mli similarity index 100% rename from src/client/embedded/alpha/michelson_v1_emacs.mli rename to lib_embedded_client_alpha/michelson_v1_emacs.mli diff --git a/src/client/embedded/alpha/michelson_v1_error_reporter.ml b/lib_embedded_client_alpha/michelson_v1_error_reporter.ml similarity index 100% rename from src/client/embedded/alpha/michelson_v1_error_reporter.ml rename to lib_embedded_client_alpha/michelson_v1_error_reporter.ml diff --git a/src/client/embedded/alpha/michelson_v1_error_reporter.mli b/lib_embedded_client_alpha/michelson_v1_error_reporter.mli similarity index 100% rename from src/client/embedded/alpha/michelson_v1_error_reporter.mli rename to lib_embedded_client_alpha/michelson_v1_error_reporter.mli diff --git a/src/client/embedded/alpha/michelson_v1_parser.ml b/lib_embedded_client_alpha/michelson_v1_parser.ml similarity index 100% rename from src/client/embedded/alpha/michelson_v1_parser.ml rename to lib_embedded_client_alpha/michelson_v1_parser.ml diff --git a/src/client/embedded/alpha/michelson_v1_parser.mli b/lib_embedded_client_alpha/michelson_v1_parser.mli similarity index 100% rename from src/client/embedded/alpha/michelson_v1_parser.mli rename to lib_embedded_client_alpha/michelson_v1_parser.mli diff --git a/src/client/embedded/alpha/michelson_v1_printer.ml b/lib_embedded_client_alpha/michelson_v1_printer.ml similarity index 100% rename from src/client/embedded/alpha/michelson_v1_printer.ml rename to lib_embedded_client_alpha/michelson_v1_printer.ml diff --git a/src/client/embedded/alpha/michelson_v1_printer.mli b/lib_embedded_client_alpha/michelson_v1_printer.mli similarity index 100% rename from src/client/embedded/alpha/michelson_v1_printer.mli rename to lib_embedded_client_alpha/michelson_v1_printer.mli diff --git a/src/client/embedded/alpha/script_located_ir.ml b/lib_embedded_client_alpha/script_located_ir.ml similarity index 100% rename from src/client/embedded/alpha/script_located_ir.ml rename to lib_embedded_client_alpha/script_located_ir.ml diff --git a/lib_embedded_client_alpha/tezos-embedded-client-alpha.opam b/lib_embedded_client_alpha/tezos-embedded-client-alpha.opam new file mode 100644 index 000000000..b22c69c8f --- /dev/null +++ b/lib_embedded_client_alpha/tezos-embedded-client-alpha.opam @@ -0,0 +1,22 @@ +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-base" + "tezos-embedded-protocol-alpha" + "tezos-embedded-protocol-alpha.raw" + "tezos-client-base" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/client/embedded/demo/client_proto_main.ml b/lib_embedded_client_demo/client_proto_main.ml similarity index 100% rename from src/client/embedded/demo/client_proto_main.ml rename to lib_embedded_client_demo/client_proto_main.ml diff --git a/src/client/embedded/demo/client_proto_main.mli b/lib_embedded_client_demo/client_proto_main.mli similarity index 100% rename from src/client/embedded/demo/client_proto_main.mli rename to lib_embedded_client_demo/client_proto_main.mli diff --git a/src/client/embedded/demo/client_proto_rpcs.ml b/lib_embedded_client_demo/client_proto_rpcs.ml similarity index 100% rename from src/client/embedded/demo/client_proto_rpcs.ml rename to lib_embedded_client_demo/client_proto_rpcs.ml diff --git a/src/client/embedded/demo/client_proto_rpcs.mli b/lib_embedded_client_demo/client_proto_rpcs.mli similarity index 100% rename from src/client/embedded/demo/client_proto_rpcs.mli rename to lib_embedded_client_demo/client_proto_rpcs.mli diff --git a/src/client/embedded/genesis/client_proto_main.ml b/lib_embedded_client_genesis/client_proto_main.ml similarity index 100% rename from src/client/embedded/genesis/client_proto_main.ml rename to lib_embedded_client_genesis/client_proto_main.ml diff --git a/src/client/embedded/genesis/client_proto_main.mli b/lib_embedded_client_genesis/client_proto_main.mli similarity index 100% rename from src/client/embedded/genesis/client_proto_main.mli rename to lib_embedded_client_genesis/client_proto_main.mli diff --git a/src/client/embedded/genesis/jbuild b/lib_embedded_client_genesis/jbuild similarity index 67% rename from src/client/embedded/genesis/jbuild rename to lib_embedded_client_genesis/jbuild index 44638501d..b19a9b8c8 100644 --- a/src/client/embedded/genesis/jbuild +++ b/lib_embedded_client_genesis/jbuild @@ -1,20 +1,23 @@ (jbuild_version 1) (library - ((name client_embedded_genesis) - (public_name tezos.client.embedded.genesis) + ((name tezos_embedded_client_genesis) + (public_name tezos-embedded-client-genesis) (libraries (tezos-base tezos-embedded-protocol-genesis tezos-embedded-protocol-genesis.raw tezos-embedded-protocol-alpha.environment tezos-embedded-protocol-alpha.raw - client_lib)) + tezos-node-shell + tezos-client-base)) (library_flags (:standard -linkall)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives -open Tezos_embedded_protocol_environment_genesis - -open Tezos_embedded_raw_protocol_genesis)))) + -open Tezos_embedded_raw_protocol_genesis + -open Tezos_node_shell + -open Tezos_client_base)))) (alias ((name runtest_indent) diff --git a/lib_embedded_client_genesis/tezos-embedded-client-genesis.opam b/lib_embedded_client_genesis/tezos-embedded-client-genesis.opam new file mode 100644 index 000000000..01acb9746 --- /dev/null +++ b/lib_embedded_client_genesis/tezos-embedded-client-genesis.opam @@ -0,0 +1,24 @@ +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-base" + "tezos-embedded-protocol-genesis" + "tezos-embedded-protocol-genesis.raw" + "tezos-embedded-protocol-alpha.environment" + "tezos-embedded-protocol-alpha.raw" + "tezos-client-base" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/lib_embedded_protocol_alpha/src/jbuild b/lib_embedded_protocol_alpha/src/jbuild index f9536a31d..9ca03d71a 100644 --- a/lib_embedded_protocol_alpha/src/jbuild +++ b/lib_embedded_protocol_alpha/src/jbuild @@ -4,7 +4,7 @@ ((targets (environment.ml)) (action (write-file ${@} - "include Tezos_protocol_environment.Make(struct let name = \"alpha\" end)()")))) + "include Tezos_node_updater.Tezos_protocol_environment.Make(struct let name = \"alpha\" end)()")))) (rule ((targets (registerer.ml)) @@ -12,7 +12,7 @@ (write-file ${@} " let () = - let module Ignored = State.Register_embedded_protocol + let module Ignored = Tezos_node_shell.State.Register_embedded_protocol (Tezos_embedded_protocol_environment_alpha.Environment) (Tezos_embedded_raw_protocol_alpha.Main) (struct @@ -28,7 +28,7 @@ let () = ((name tezos_embedded_protocol_environment_alpha) (public_name tezos-embedded-protocol-alpha.environment) (library_flags (:standard -linkall)) - (libraries (tezos.node.updater)) + (libraries (tezos-node-updater)) (modules (Environment)))) (library @@ -49,5 +49,5 @@ let () = ((name tezos_embedded_protocol_alpha) (public_name tezos-embedded-protocol-alpha) (library_flags (:standard -linkall)) - (libraries (tezos_embedded_raw_protocol_alpha tezos.node.shell)) + (libraries (tezos_embedded_raw_protocol_alpha tezos-node-shell)) (modules (Registerer)))) diff --git a/lib_embedded_protocol_demo/src/jbuild b/lib_embedded_protocol_demo/src/jbuild index 91b7df82e..b7ecd6fad 100644 --- a/lib_embedded_protocol_demo/src/jbuild +++ b/lib_embedded_protocol_demo/src/jbuild @@ -4,7 +4,7 @@ ((targets (environment.ml)) (action (write-file ${@} - "include Tezos_protocol_environment.Make(struct let name = \"demo\" end)()")))) + "include Tezos_node_updater.Tezos_protocol_environment.Make(struct let name = \"demo\" end)()")))) (rule ((targets (registerer.ml)) @@ -12,7 +12,7 @@ (write-file ${@} " let () = - let module Ignored = State.Register_embedded_protocol + let module Ignored = Tezos_node_shell.State.Register_embedded_protocol (Tezos_embedded_protocol_environment_demo.Environment) (Tezos_embedded_raw_protocol_demo.Main) (struct @@ -28,7 +28,7 @@ let () = ((name tezos_embedded_protocol_environment_demo) (public_name tezos-embedded-protocol-demo.environment) (library_flags (:standard -linkall)) - (libraries (tezos.node.updater)) + (libraries (tezos-node-updater)) (modules (Environment)))) (library @@ -49,5 +49,5 @@ let () = ((name tezos_embedded_protocol_demo) (public_name tezos-embedded-protocol-demo) (library_flags (:standard -linkall)) - (libraries (tezos_embedded_raw_protocol_demo tezos.node.shell)) + (libraries (tezos_embedded_raw_protocol_demo tezos-node-shell)) (modules (Registerer)))) diff --git a/lib_embedded_protocol_genesis/src/jbuild b/lib_embedded_protocol_genesis/src/jbuild index 6f35b90ed..671b0853f 100644 --- a/lib_embedded_protocol_genesis/src/jbuild +++ b/lib_embedded_protocol_genesis/src/jbuild @@ -4,7 +4,7 @@ ((targets (environment.ml)) (action (write-file ${@} - "include Tezos_protocol_environment.Make(struct let name = \"genesis\" end)()")))) + "include Tezos_node_updater.Tezos_protocol_environment.Make(struct let name = \"genesis\" end)()")))) (rule ((targets (registerer.ml)) @@ -12,7 +12,7 @@ (write-file ${@} " let () = - let module Ignored = State.Register_embedded_protocol + let module Ignored = Tezos_node_shell.State.Register_embedded_protocol (Tezos_embedded_protocol_environment_genesis.Environment) (Tezos_embedded_raw_protocol_genesis.Main) (struct @@ -28,7 +28,7 @@ let () = ((name tezos_embedded_protocol_environment_genesis) (public_name tezos-embedded-protocol-genesis.environment) (library_flags (:standard -linkall)) - (libraries (tezos.node.updater)) + (libraries (tezos-node-updater)) (modules (Environment)))) (library @@ -49,5 +49,5 @@ let () = ((name tezos_embedded_protocol_genesis) (public_name tezos-embedded-protocol-genesis) (library_flags (:standard -linkall)) - (libraries (tezos_embedded_raw_protocol_genesis tezos.node.shell)) + (libraries (tezos_embedded_raw_protocol_genesis tezos-node-shell)) (modules (Registerer)))) diff --git a/src/node/db/context.ml b/lib_node_db/context.ml similarity index 100% rename from src/node/db/context.ml rename to lib_node_db/context.ml diff --git a/src/node/db/context.mli b/lib_node_db/context.mli similarity index 100% rename from src/node/db/context.mli rename to lib_node_db/context.mli diff --git a/src/node/main/jbuild b/lib_node_db/jbuild similarity index 57% rename from src/node/main/jbuild rename to lib_node_db/jbuild index 38cc003fe..c4e5e8233 100644 --- a/src/node/main/jbuild +++ b/lib_node_db/jbuild @@ -1,13 +1,14 @@ (jbuild_version 1) (library - ((name node_main_lib) - (public_name tezos.node.main) - (libraries (tezos-base cmdliner node_net node_shell)) + ((name tezos_node_db) + (public_name tezos-node-db) + (libraries (tezos-base + leveldb + irmin-leveldb)) (flags (:standard -w -9+27-30-32-40@8 -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) + -open Tezos_base__TzPervasives)))) (alias ((name runtest_indent) diff --git a/src/node/db/raw_store.ml b/lib_node_db/raw_store.ml similarity index 100% rename from src/node/db/raw_store.ml rename to lib_node_db/raw_store.ml diff --git a/src/node/db/raw_store.mli b/lib_node_db/raw_store.mli similarity index 100% rename from src/node/db/raw_store.mli rename to lib_node_db/raw_store.mli diff --git a/src/node/db/store.ml b/lib_node_db/store.ml similarity index 100% rename from src/node/db/store.ml rename to lib_node_db/store.ml diff --git a/src/node/db/store.mli b/lib_node_db/store.mli similarity index 100% rename from src/node/db/store.mli rename to lib_node_db/store.mli diff --git a/src/node/db/store_helpers.ml b/lib_node_db/store_helpers.ml similarity index 100% rename from src/node/db/store_helpers.ml rename to lib_node_db/store_helpers.ml diff --git a/src/node/db/store_helpers.mli b/lib_node_db/store_helpers.mli similarity index 100% rename from src/node/db/store_helpers.mli rename to lib_node_db/store_helpers.mli diff --git a/src/node/db/store_sigs.ml b/lib_node_db/store_sigs.ml similarity index 100% rename from src/node/db/store_sigs.ml rename to lib_node_db/store_sigs.ml diff --git a/tezos.opam b/lib_node_db/tezos-node-db.opam similarity index 50% rename from tezos.opam rename to lib_node_db/tezos-node-db.opam index 3366de1d2..e6ba786e9 100644 --- a/tezos.opam +++ b/lib_node_db/tezos-node-db.opam @@ -10,29 +10,9 @@ depends: [ "ocamlfind" { build } "jbuilder" { build & >= "1.0+beta15" } "base-bigarray" - "base-threads" - "conf-libev" - "calendar" - "cohttp" { >= "0.21" } - "conduit" - "ezjsonm" { >= "0.5.0" } - "git" - "git-unix" - "irmin" { >= "1.3" } - "irmin-unix" { >= "1.3" } - "lwt" { >= "3.0.0" } - "lwt_ssl" - "menhir" - "mtime" { >= "1.0.0" } - "ocp-ocamlres" { >= "dev" } - "ocplib-endian" - "ocplib-json-typed" - "reactiveData" - "sodium" { >= "0.3.0" } - "magic-mime" - "leveldb" { >= "1.1.2" } - "kaputt" # { test } - "bisect_ppx" # { test } + "tezos-base" + "leveldb" + "irmin-unix" ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/src/node/net/RPC.ml b/lib_node_net/RPC.ml similarity index 100% rename from src/node/net/RPC.ml rename to lib_node_net/RPC.ml diff --git a/src/node/net/RPC.mli b/lib_node_net/RPC.mli similarity index 100% rename from src/node/net/RPC.mli rename to lib_node_net/RPC.mli diff --git a/src/node/net/RPC_server.ml b/lib_node_net/RPC_server.ml similarity index 100% rename from src/node/net/RPC_server.ml rename to lib_node_net/RPC_server.ml diff --git a/src/node/net/RPC_server.mli b/lib_node_net/RPC_server.mli similarity index 100% rename from src/node/net/RPC_server.mli rename to lib_node_net/RPC_server.mli diff --git a/src/node/net/jbuild b/lib_node_net/jbuild similarity index 73% rename from src/node/net/jbuild rename to lib_node_net/jbuild index 67de6ee4d..8ff831853 100644 --- a/src/node/net/jbuild +++ b/lib_node_net/jbuild @@ -1,15 +1,14 @@ (jbuild_version 1) (library - ((name node_net) - (public_name tezos.node.net) + ((name tezos_node_net) + (public_name tezos-node-net) (libraries (tezos-base mtime.clock.os ocplib-resto-cohttp)) (flags (:standard -w -9+27-30-32-40@8 -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) + -open Tezos_base__TzPervasives)))) (alias ((name runtest_indent) diff --git a/src/node/net/moving_average.ml b/lib_node_net/moving_average.ml similarity index 100% rename from src/node/net/moving_average.ml rename to lib_node_net/moving_average.ml diff --git a/src/node/net/moving_average.mli b/lib_node_net/moving_average.mli similarity index 100% rename from src/node/net/moving_average.mli rename to lib_node_net/moving_average.mli diff --git a/src/node/net/p2p.ml b/lib_node_net/p2p.ml similarity index 100% rename from src/node/net/p2p.ml rename to lib_node_net/p2p.ml diff --git a/src/node/net/p2p.mli b/lib_node_net/p2p.mli similarity index 100% rename from src/node/net/p2p.mli rename to lib_node_net/p2p.mli diff --git a/src/node/net/p2p_connection.ml b/lib_node_net/p2p_connection.ml similarity index 100% rename from src/node/net/p2p_connection.ml rename to lib_node_net/p2p_connection.ml diff --git a/src/node/net/p2p_connection.mli b/lib_node_net/p2p_connection.mli similarity index 100% rename from src/node/net/p2p_connection.mli rename to lib_node_net/p2p_connection.mli diff --git a/src/node/net/p2p_connection_pool.ml b/lib_node_net/p2p_connection_pool.ml similarity index 100% rename from src/node/net/p2p_connection_pool.ml rename to lib_node_net/p2p_connection_pool.ml diff --git a/src/node/net/p2p_connection_pool.mli b/lib_node_net/p2p_connection_pool.mli similarity index 100% rename from src/node/net/p2p_connection_pool.mli rename to lib_node_net/p2p_connection_pool.mli diff --git a/src/node/net/p2p_connection_pool_types.ml b/lib_node_net/p2p_connection_pool_types.ml similarity index 100% rename from src/node/net/p2p_connection_pool_types.ml rename to lib_node_net/p2p_connection_pool_types.ml diff --git a/src/node/net/p2p_connection_pool_types.mli b/lib_node_net/p2p_connection_pool_types.mli similarity index 100% rename from src/node/net/p2p_connection_pool_types.mli rename to lib_node_net/p2p_connection_pool_types.mli diff --git a/src/node/net/p2p_discovery.ml b/lib_node_net/p2p_discovery.ml similarity index 100% rename from src/node/net/p2p_discovery.ml rename to lib_node_net/p2p_discovery.ml diff --git a/src/node/net/p2p_discovery.mli b/lib_node_net/p2p_discovery.mli similarity index 100% rename from src/node/net/p2p_discovery.mli rename to lib_node_net/p2p_discovery.mli diff --git a/src/node/net/p2p_io_scheduler.ml b/lib_node_net/p2p_io_scheduler.ml similarity index 100% rename from src/node/net/p2p_io_scheduler.ml rename to lib_node_net/p2p_io_scheduler.ml diff --git a/src/node/net/p2p_io_scheduler.mli b/lib_node_net/p2p_io_scheduler.mli similarity index 100% rename from src/node/net/p2p_io_scheduler.mli rename to lib_node_net/p2p_io_scheduler.mli diff --git a/src/node/net/p2p_maintenance.ml b/lib_node_net/p2p_maintenance.ml similarity index 100% rename from src/node/net/p2p_maintenance.ml rename to lib_node_net/p2p_maintenance.ml diff --git a/src/node/net/p2p_maintenance.mli b/lib_node_net/p2p_maintenance.mli similarity index 100% rename from src/node/net/p2p_maintenance.mli rename to lib_node_net/p2p_maintenance.mli diff --git a/src/node/net/p2p_types.ml b/lib_node_net/p2p_types.ml similarity index 100% rename from src/node/net/p2p_types.ml rename to lib_node_net/p2p_types.ml diff --git a/src/node/net/p2p_types.mli b/lib_node_net/p2p_types.mli similarity index 100% rename from src/node/net/p2p_types.mli rename to lib_node_net/p2p_types.mli diff --git a/src/node/net/p2p_welcome.ml b/lib_node_net/p2p_welcome.ml similarity index 100% rename from src/node/net/p2p_welcome.ml rename to lib_node_net/p2p_welcome.ml diff --git a/src/node/net/p2p_welcome.mli b/lib_node_net/p2p_welcome.mli similarity index 100% rename from src/node/net/p2p_welcome.mli rename to lib_node_net/p2p_welcome.mli diff --git a/lib_node_net/tezos-node-net.opam b/lib_node_net/tezos-node-net.opam new file mode 100644 index 000000000..679f3f4c2 --- /dev/null +++ b/lib_node_net/tezos-node-net.opam @@ -0,0 +1,21 @@ +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" } + "base-bigarray" + "mtime.clock.os" + "ocplib-resto-cohttp" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/node/shell/block_locator.ml b/lib_node_shell/block_locator.ml similarity index 100% rename from src/node/shell/block_locator.ml rename to lib_node_shell/block_locator.ml diff --git a/src/node/shell/block_locator.mli b/lib_node_shell/block_locator.mli similarity index 100% rename from src/node/shell/block_locator.mli rename to lib_node_shell/block_locator.mli diff --git a/src/node/shell/block_validator.ml b/lib_node_shell/block_validator.ml similarity index 100% rename from src/node/shell/block_validator.ml rename to lib_node_shell/block_validator.ml diff --git a/src/node/shell/block_validator.mli b/lib_node_shell/block_validator.mli similarity index 100% rename from src/node/shell/block_validator.mli rename to lib_node_shell/block_validator.mli diff --git a/src/node/shell/bootstrap_pipeline.ml b/lib_node_shell/bootstrap_pipeline.ml similarity index 100% rename from src/node/shell/bootstrap_pipeline.ml rename to lib_node_shell/bootstrap_pipeline.ml diff --git a/src/node/shell/bootstrap_pipeline.mli b/lib_node_shell/bootstrap_pipeline.mli similarity index 100% rename from src/node/shell/bootstrap_pipeline.mli rename to lib_node_shell/bootstrap_pipeline.mli diff --git a/src/node/shell/chain.ml b/lib_node_shell/chain.ml similarity index 100% rename from src/node/shell/chain.ml rename to lib_node_shell/chain.ml diff --git a/src/node/shell/chain.mli b/lib_node_shell/chain.mli similarity index 100% rename from src/node/shell/chain.mli rename to lib_node_shell/chain.mli diff --git a/src/node/shell/chain_traversal.ml b/lib_node_shell/chain_traversal.ml similarity index 100% rename from src/node/shell/chain_traversal.ml rename to lib_node_shell/chain_traversal.ml diff --git a/src/node/shell/chain_traversal.mli b/lib_node_shell/chain_traversal.mli similarity index 100% rename from src/node/shell/chain_traversal.mli rename to lib_node_shell/chain_traversal.mli diff --git a/src/node/shell/distributed_db.ml b/lib_node_shell/distributed_db.ml similarity index 100% rename from src/node/shell/distributed_db.ml rename to lib_node_shell/distributed_db.ml diff --git a/src/node/shell/distributed_db.mli b/lib_node_shell/distributed_db.mli similarity index 100% rename from src/node/shell/distributed_db.mli rename to lib_node_shell/distributed_db.mli diff --git a/src/node/shell/distributed_db_functors.ml b/lib_node_shell/distributed_db_functors.ml similarity index 100% rename from src/node/shell/distributed_db_functors.ml rename to lib_node_shell/distributed_db_functors.ml diff --git a/src/node/shell/distributed_db_functors.mli b/lib_node_shell/distributed_db_functors.mli similarity index 100% rename from src/node/shell/distributed_db_functors.mli rename to lib_node_shell/distributed_db_functors.mli diff --git a/src/node/shell/distributed_db_message.ml b/lib_node_shell/distributed_db_message.ml similarity index 100% rename from src/node/shell/distributed_db_message.ml rename to lib_node_shell/distributed_db_message.ml diff --git a/src/node/shell/distributed_db_message.mli b/lib_node_shell/distributed_db_message.mli similarity index 100% rename from src/node/shell/distributed_db_message.mli rename to lib_node_shell/distributed_db_message.mli diff --git a/src/node/shell/distributed_db_metadata.ml b/lib_node_shell/distributed_db_metadata.ml similarity index 100% rename from src/node/shell/distributed_db_metadata.ml rename to lib_node_shell/distributed_db_metadata.ml diff --git a/src/node/shell/distributed_db_metadata.mli b/lib_node_shell/distributed_db_metadata.mli similarity index 100% rename from src/node/shell/distributed_db_metadata.mli rename to lib_node_shell/distributed_db_metadata.mli diff --git a/lib_node_shell/jbuild b/lib_node_shell/jbuild new file mode 100644 index 000000000..723d4e7a3 --- /dev/null +++ b/lib_node_shell/jbuild @@ -0,0 +1,20 @@ +(jbuild_version 1) + +(library + ((name tezos_node_shell) + (public_name tezos-node-shell) + (libraries (tezos-base + tezos-node-net + tezos-node-db + tezos-node-updater)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_node_db + -open Tezos_node_net + -open Tezos_node_updater)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml) (glob_files *.mli))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/node/shell/mempool.ml b/lib_node_shell/mempool.ml similarity index 100% rename from src/node/shell/mempool.ml rename to lib_node_shell/mempool.ml diff --git a/src/node/shell/mempool.mli b/lib_node_shell/mempool.mli similarity index 100% rename from src/node/shell/mempool.mli rename to lib_node_shell/mempool.mli diff --git a/src/node/shell/net_validator.ml b/lib_node_shell/net_validator.ml similarity index 100% rename from src/node/shell/net_validator.ml rename to lib_node_shell/net_validator.ml diff --git a/src/node/shell/net_validator.mli b/lib_node_shell/net_validator.mli similarity index 100% rename from src/node/shell/net_validator.mli rename to lib_node_shell/net_validator.mli diff --git a/src/node/shell/node.ml b/lib_node_shell/node.ml similarity index 100% rename from src/node/shell/node.ml rename to lib_node_shell/node.ml diff --git a/src/node/shell/node.mli b/lib_node_shell/node.mli similarity index 100% rename from src/node/shell/node.mli rename to lib_node_shell/node.mli diff --git a/src/node/shell/node_rpc.ml b/lib_node_shell/node_rpc.ml similarity index 100% rename from src/node/shell/node_rpc.ml rename to lib_node_shell/node_rpc.ml diff --git a/src/node/shell/node_rpc.mli b/lib_node_shell/node_rpc.mli similarity index 100% rename from src/node/shell/node_rpc.mli rename to lib_node_shell/node_rpc.mli diff --git a/src/node/shell/node_rpc_services.ml b/lib_node_shell/node_rpc_services.ml similarity index 100% rename from src/node/shell/node_rpc_services.ml rename to lib_node_shell/node_rpc_services.ml diff --git a/src/node/shell/node_rpc_services.mli b/lib_node_shell/node_rpc_services.mli similarity index 100% rename from src/node/shell/node_rpc_services.mli rename to lib_node_shell/node_rpc_services.mli diff --git a/src/node/shell/peer_validator.ml b/lib_node_shell/peer_validator.ml similarity index 100% rename from src/node/shell/peer_validator.ml rename to lib_node_shell/peer_validator.ml diff --git a/src/node/shell/peer_validator.mli b/lib_node_shell/peer_validator.mli similarity index 100% rename from src/node/shell/peer_validator.mli rename to lib_node_shell/peer_validator.mli diff --git a/src/node/shell/prevalidation.ml b/lib_node_shell/prevalidation.ml similarity index 100% rename from src/node/shell/prevalidation.ml rename to lib_node_shell/prevalidation.ml diff --git a/src/node/shell/prevalidation.mli b/lib_node_shell/prevalidation.mli similarity index 100% rename from src/node/shell/prevalidation.mli rename to lib_node_shell/prevalidation.mli diff --git a/src/node/shell/prevalidator.ml b/lib_node_shell/prevalidator.ml similarity index 100% rename from src/node/shell/prevalidator.ml rename to lib_node_shell/prevalidator.ml diff --git a/src/node/shell/prevalidator.mli b/lib_node_shell/prevalidator.mli similarity index 100% rename from src/node/shell/prevalidator.mli rename to lib_node_shell/prevalidator.mli diff --git a/src/node/shell/protocol_validator.ml b/lib_node_shell/protocol_validator.ml similarity index 100% rename from src/node/shell/protocol_validator.ml rename to lib_node_shell/protocol_validator.ml diff --git a/src/node/shell/protocol_validator.mli b/lib_node_shell/protocol_validator.mli similarity index 100% rename from src/node/shell/protocol_validator.mli rename to lib_node_shell/protocol_validator.mli diff --git a/src/node/shell/state.ml b/lib_node_shell/state.ml similarity index 100% rename from src/node/shell/state.ml rename to lib_node_shell/state.ml diff --git a/src/node/shell/state.mli b/lib_node_shell/state.mli similarity index 100% rename from src/node/shell/state.mli rename to lib_node_shell/state.mli diff --git a/lib_node_shell/tezos-node-shell.opam b/lib_node_shell/tezos-node-shell.opam new file mode 100644 index 000000000..4b3273593 --- /dev/null +++ b/lib_node_shell/tezos-node-shell.opam @@ -0,0 +1,24 @@ +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" } + "base-bigarray" + "tezos-base" + "tezos-micheline" + "tezos-protocol-compiler" + "tezos-node-net" + "tezos-node-db" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/node/shell/validator.ml b/lib_node_shell/validator.ml similarity index 100% rename from src/node/shell/validator.ml rename to lib_node_shell/validator.ml diff --git a/src/node/shell/validator.mli b/lib_node_shell/validator.mli similarity index 100% rename from src/node/shell/validator.mli rename to lib_node_shell/validator.mli diff --git a/src/node/updater/jbuild b/lib_node_updater/jbuild similarity index 51% rename from src/node/updater/jbuild rename to lib_node_updater/jbuild index b516645cf..7f974eb39 100644 --- a/src/node/updater/jbuild +++ b/lib_node_updater/jbuild @@ -1,18 +1,21 @@ (jbuild_version 1) (library - ((name node_updater) - (public_name tezos.node.updater) + ((name tezos_node_updater) + (public_name tezos-node-updater) (libraries (tezos-base tezos-micheline tezos-protocol-compiler - node_net - node_db + tezos-node-net + tezos-node-db dynlink)) (flags (:standard -w -9+27-30-32-40@8 -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) + -open Tezos_base__TzPervasives + -open Tezos_micheline + -open Tezos_protocol_compiler + -open Tezos_node_net + -open Tezos_node_db)))) (alias ((name runtest_indent) diff --git a/src/node/updater/register.ml b/lib_node_updater/register.ml similarity index 100% rename from src/node/updater/register.ml rename to lib_node_updater/register.ml diff --git a/src/node/updater/register.mli b/lib_node_updater/register.mli similarity index 100% rename from src/node/updater/register.mli rename to lib_node_updater/register.mli diff --git a/lib_node_updater/tezos-node-updater.opam b/lib_node_updater/tezos-node-updater.opam new file mode 100644 index 000000000..b844cddf0 --- /dev/null +++ b/lib_node_updater/tezos-node-updater.opam @@ -0,0 +1,21 @@ +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" } + "base-bigarray" + "tezos-base" + "uutf" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/node/updater/tezos_protocol_environment.ml b/lib_node_updater/tezos_protocol_environment.ml similarity index 100% rename from src/node/updater/tezos_protocol_environment.ml rename to lib_node_updater/tezos_protocol_environment.ml diff --git a/src/node/updater/updater.ml b/lib_node_updater/updater.ml similarity index 100% rename from src/node/updater/updater.ml rename to lib_node_updater/updater.ml diff --git a/src/node/updater/updater.mli b/lib_node_updater/updater.mli similarity index 100% rename from src/node/updater/updater.mli rename to lib_node_updater/updater.mli diff --git a/scripts/client_lib.inc.sh b/scripts/client_lib.inc.sh index 9b99b1e22..eff976ba8 100644 --- a/scripts/client_lib.inc.sh +++ b/scripts/client_lib.inc.sh @@ -13,7 +13,7 @@ init_sandboxed_client() { rpc=$((18730 + id)) client_dir="$(mktemp -d -t tezos-client.XXXXXXXX)" client_dirs+=("$client_dir") - local_client=${local_client:-$src_dir/_build/default/src/client_main.exe} + local_client=${local_client:-$src_dir/_build/default/bin_client/main.exe} client="$local_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc" } diff --git a/scripts/node_lib.inc.sh b/scripts/node_lib.inc.sh index 3cb1cbb33..1fad29f3e 100644 --- a/scripts/node_lib.inc.sh +++ b/scripts/node_lib.inc.sh @@ -20,7 +20,7 @@ start_sandboxed_node() { peers+=("127.0.0.1:$peer_port") done peers+=("--closed") - local_node="${local_node:-$src_dir/_build/default/src/node_main.exe}" + local_node="${local_node:-$src_dir/_build/default/bin_node/main.exe}" node="$local_node" sandbox_file="${sandbox_file:-$script_dir/sandbox.json}" sandbox_param="--sandbox=$sandbox_file" diff --git a/src/client/jbuild b/src/client/jbuild deleted file mode 100644 index 131e308d6..000000000 --- a/src/client/jbuild +++ /dev/null @@ -1,19 +0,0 @@ -(jbuild_version 1) - -(library - ((name client_lib) - (public_name tezos.client) - (libraries (tezos-base - node_shell - node_db - node_updater - tezos-protocol-compiler)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) - -(alias - ((name runtest_indent) - (deps ((glob_files *.ml) (glob_files *.mli))) - (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/jbuild b/src/jbuild deleted file mode 100644 index 4162a96e3..000000000 --- a/src/jbuild +++ /dev/null @@ -1,34 +0,0 @@ -(jbuild_version 1) - -(executable - ((name node_main) - (public_name tezos-node) - (package tezos) - (libraries (tezos-base - node_db node_main_lib node_net cmdliner - tezos-embedded-protocol-genesis - tezos-embedded-protocol-demo - tezos-embedded-protocol-alpha)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -open Tezos_base__TzPervasives - -linkall)) - (modules (Node_main)))) - -(executable - ((name client_main) - (public_name tezos-client) - (package tezos) - (libraries (tezos-base client_lib - client_embedded_genesis - client_embedded_alpha)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -open Tezos_base__TzPervasives - -linkall)) - (modules (Client_main)))) - -(alias - ((name runtest_indent) - (deps ((glob_files *.ml) (glob_files *.mli))) - (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/node/db/jbuild b/src/node/db/jbuild deleted file mode 100644 index 891d1377a..000000000 --- a/src/node/db/jbuild +++ /dev/null @@ -1,15 +0,0 @@ -(jbuild_version 1) - -(library - ((name node_db) - (public_name tezos.node.db) - (libraries (tezos-base leveldb irmin-leveldb)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) - -(alias - ((name runtest_indent) - (deps ((glob_files *.ml) (glob_files *.mli))) - (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/src/node/jbuild b/src/node/jbuild deleted file mode 100644 index 5e0ae1705..000000000 --- a/src/node/jbuild +++ /dev/null @@ -1 +0,0 @@ -(jbuild_version 1) diff --git a/src/node/shell/jbuild b/src/node/shell/jbuild deleted file mode 100644 index c7c13a7cb..000000000 --- a/src/node/shell/jbuild +++ /dev/null @@ -1,15 +0,0 @@ -(jbuild_version 1) - -(library - ((name node_shell) - (public_name tezos.node.shell) - (libraries (tezos-base node_net node_db node_updater)) - (flags (:standard -w -9+27-30-32-40@8 - -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) - -(alias - ((name runtest_indent) - (deps ((glob_files *.ml) (glob_files *.mli))) - (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<})))) diff --git a/test/jbuild b/test/jbuild index 2c822cb99..8d29eb133 100644 --- a/test/jbuild +++ b/test/jbuild @@ -2,8 +2,8 @@ (alias ((name runtest_basic.sh) - (deps (../src/node_main.exe - ../src/client_main.exe + (deps (../bin_node/main.exe + ../bin_client/main.exe sandbox.json test_basic.sh lib/test_lib.inc.sh @@ -17,8 +17,8 @@ (alias ((name runtest_contracts.sh) - (deps (../src/node_main.exe - ../src/client_main.exe + (deps (../bin_node/main.exe + ../bin_client/main.exe sandbox.json test_contracts.sh lib/test_lib.inc.sh @@ -32,8 +32,8 @@ (alias ((name runtest_multinode.sh) - (deps (../src/node_main.exe - ../src/client_main.exe + (deps (../bin_node/main.exe + ../bin_client/main.exe sandbox.json test_multinode.sh lib/test_lib.inc.sh diff --git a/test/lib/node_helpers.ml b/test/lib/node_helpers.ml index 8bbb1f5c4..9b06b9d3c 100644 --- a/test/lib/node_helpers.ml +++ b/test/lib/node_helpers.ml @@ -38,7 +38,7 @@ let fork_node ?(timeout = 4) ?(port = 18732) ?sandbox () = let null_fd = Unix.(openfile "/dev/null" [O_RDONLY] 0o644) in let exe = let (//) = Filename.concat in - Sys.getcwd () // ".." // "src" // "node_main.exe" in + Sys.getcwd () // ".." // "bin_node" // "main.exe" in let pid = Unix.create_process exe [| "tezos-node" ; diff --git a/test/lib/test_lib.inc.sh b/test/lib/test_lib.inc.sh index d944acb46..4a9957575 100755 --- a/test/lib/test_lib.inc.sh +++ b/test/lib/test_lib.inc.sh @@ -6,8 +6,8 @@ src_dir="$(dirname "$test_dir")" cd "$test_dir" sandbox_file="$test_dir/sandbox.json" -local_node="$src_dir/src/node_main.exe" -local_client="$src_dir/src/client_main.exe" +local_node="$src_dir/bin_node/main.exe" +local_client="$src_dir/bin_client/main.exe" source $src_dir/scripts/node_lib.inc.sh source $src_dir/scripts/client_lib.inc.sh diff --git a/test/p2p/jbuild b/test/p2p/jbuild index bb54e1338..7ce71825c 100644 --- a/test/p2p/jbuild +++ b/test/p2p/jbuild @@ -4,11 +4,14 @@ ((names (test_p2p_connection test_p2p_connection_pool test_p2p_io_scheduler)) - (libraries (tezos-base test_lib node_net)) + (libraries (tezos-base + tezos-node-net + test_lib)) (flags (:standard -w -9-32 -linkall -safe-string - -open Tezos_base__TzPervasives)))) + -open Tezos_base__TzPervasives + -open Tezos_node_net)))) (alias ((name buildtest) diff --git a/test/proto_alpha/jbuild b/test/proto_alpha/jbuild index 4b96d8830..5daacb3a1 100644 --- a/test/proto_alpha/jbuild +++ b/test/proto_alpha/jbuild @@ -7,16 +7,18 @@ test_transaction test_vote)) (libraries (tezos-base - test_lib - client_lib - client_embedded_genesis - client_embedded_alpha)) + tezos-client-base + tezos-embedded-client-genesis + tezos-embedded-client-alpha + test_lib)) (flags (:standard -w -9-32 -safe-string -open Tezos_base__TzPervasives -open Tezos_embedded_protocol_environment_alpha -open Tezos_embedded_raw_protocol_alpha - -open Tezos_context - -open Client_embedded_alpha)))) + -open Tezos_client_base + -open Tezos_embedded_client_genesis + -open Tezos_embedded_client_alpha + -open Tezos_context)))) (alias ((name buildtest) @@ -28,28 +30,28 @@ (alias ((name runtest_endorsement) - (deps (../../src/node_main.exe + (deps (../../bin_node/main.exe sandbox.json)) (locks (/tcp-port/18100)) (action (run ${exe:test_endorsement.exe})))) (alias ((name runtest_origination) - (deps (../../src/node_main.exe + (deps (../../bin_node/main.exe sandbox.json)) (locks (/tcp-port/18200)) (action (run ${exe:test_origination.exe})))) (alias ((name runtest_transaction) - (deps (../../src/node_main.exe + (deps (../../bin_node/main.exe sandbox.json)) (locks (/tcp-port/18300)) (action (run ${exe:test_transaction.exe})))) (alias ((name runtest_vote) - (deps (../../src/node_main.exe + (deps (../../bin_node/main.exe sandbox-vote.json)) (locks (/tcp-port/18400)) (action (run ${exe:test_vote.exe})))) diff --git a/test/proto_alpha/proto_alpha_helpers.ml b/test/proto_alpha/proto_alpha_helpers.ml index 47f76b58c..1a7e3ae98 100644 --- a/test/proto_alpha/proto_alpha_helpers.ml +++ b/test/proto_alpha/proto_alpha_helpers.ml @@ -27,7 +27,7 @@ let dictator_sk = let activate_alpha () = let fitness = Fitness_repr.from_int64 0L in - Client_embedded_genesis.Client_proto_main.bake + Tezos_embedded_client_genesis.Client_proto_main.bake !rpc_config (`Head 0) (Activate { protocol = Client_proto_main.protocol ; validation_passes = 1}) fitness dictator_sk diff --git a/test/shell/jbuild b/test/shell/jbuild index 7cc02af77..93f1fa9f1 100644 --- a/test/shell/jbuild +++ b/test/shell/jbuild @@ -5,14 +5,17 @@ test_state test_store)) (libraries (tezos-base - test_lib - node_shell + tezos-node-shell + tezos-node-db tezos-embedded-protocol-demo tezos-embedded-protocol-alpha - tezos-embedded-protocol-genesis)) + tezos-embedded-protocol-genesis + test_lib)) (flags (:standard -w -9-32 -safe-string - -open Tezos_base__TzPervasives)))) + -open Tezos_base__TzPervasives + -open Tezos_node_shell + -open Tezos_node_db)))) (alias ((name buildtest)