From e2be3360a9b66ff7edb36452a749972111e00d5a Mon Sep 17 00:00:00 2001 From: Benjamin Canou Date: Thu, 15 Feb 2018 17:07:08 +0100 Subject: [PATCH] Client: split client-alpha into lib and commands and extract the baker --- .dockerignore | 1 + .gitignore | 1 + .gitlab-ci.yml | 74 +++++++++++------- Makefile | 11 ++- src/bin_client/jbuild | 8 +- src/bin_client/tezos-client.opam | 5 +- .../client_config.ml | 0 .../client_context_unix.ml | 2 +- .../client_context_unix.mli | 0 .../client_main_run.ml | 0 .../client_main_run.mli | 0 .../client_signer_unencrypted.ml | 0 .../jbuild | 12 ++- .../tezos-client-base-unix.opam} | 1 + src/proto_alpha/bin_baker/jbuild | 18 +++++ src/proto_alpha/bin_baker/main_baker_alpha.ml | 16 ++++ .../bin_baker/tezos-baker-alpha.opam | 23 ++++++ .../client_baking_blocks.ml | 0 .../client_baking_blocks.mli | 0 .../client_baking_commands.ml} | 0 .../client_baking_commands.mli} | 0 .../client_baking_commands_registration.ml} | 5 +- .../client_baking_daemon.ml | 0 .../client_baking_daemon.mli | 0 .../client_baking_denunciation.ml | 0 .../client_baking_denunciation.mli | 0 .../client_baking_endorsement.ml | 0 .../client_baking_endorsement.mli | 0 .../client_baking_forge.ml | 4 +- .../client_baking_forge.mli | 0 .../client_baking_lib.ml | 4 +- .../client_baking_lib.mli | 0 .../client_baking_nonces.ml} | 0 .../client_baking_nonces.mli} | 0 .../client_baking_operations.ml | 0 .../client_baking_operations.mli | 0 .../client_baking_revelation.ml | 0 .../client_baking_revelation.mli | 0 src/proto_alpha/lib_baking/jbuild | 77 +++++++++++++++++++ .../{lib_client => lib_baking}/test/jbuild | 6 +- .../test/node_helpers.ml | 0 .../test/node_helpers.mli | 0 .../test/proto_alpha_helpers.ml | 2 +- .../test/proto_alpha_helpers.mli | 0 .../test/sandbox-vote.json | 0 .../test/sandbox.json | 0 .../test/test_endorsement.ml | 0 .../test/test_endorsement.mli | 0 .../test/test_michelson_parser.ml | 0 .../test/test_origination.ml | 0 .../test/test_origination.mli | 0 .../test/test_transaction.ml | 0 .../test/test_transaction.mli | 0 .../test/test_vote.ml | 0 .../test/test_vote.mli | 0 .../tezos-baking-alpha-commands.opam | 23 ++++++ .../lib_baking/tezos-baking-alpha.opam | 29 +++++++ src/proto_alpha/lib_client/jbuild | 2 - ...elson_macros.ml => michelson_v1_macros.ml} | 0 ...son_macros.mli => michelson_v1_macros.mli} | 0 .../lib_client/michelson_v1_parser.ml | 2 +- .../lib_client/michelson_v1_printer.ml | 2 +- src/proto_alpha/lib_client/proto_alpha.ml | 4 + .../lib_client/tezos-client-alpha.opam | 6 -- .../alpha_commands_registration.ml} | 9 +-- .../client_proto_context_commands.ml | 0 .../client_proto_contracts_commands.ml | 0 .../client_proto_programs_commands.ml | 0 .../client_proto_programs_commands.mli | 0 src/proto_alpha/lib_client_commands/jbuild | 52 +++++++++++++ .../tezos-client-alpha-commands.opam | 22 ++++++ .../test/michelson_parser/michelson_macros.ml | 1 - .../michelson_parser/michelson_macros.mli | 1 - .../michelson_parser/michelson_v1_macros.ml | 1 + .../michelson_parser/michelson_v1_macros.mli | 1 + 75 files changed, 361 insertions(+), 64 deletions(-) rename src/{bin_client => lib_client_base_unix}/client_config.ml (100%) rename src/{bin_client => lib_client_base_unix}/client_context_unix.ml (99%) rename src/{bin_client => lib_client_base_unix}/client_context_unix.mli (100%) rename src/{bin_client => lib_client_base_unix}/client_main_run.ml (100%) rename src/{bin_client => lib_client_base_unix}/client_main_run.mli (100%) rename src/{lib_unix_signers => lib_client_base_unix}/client_signer_unencrypted.ml (100%) rename src/{lib_unix_signers => lib_client_base_unix}/jbuild (57%) rename src/{lib_unix_signers/tezos-unix-signers.opam => lib_client_base_unix/tezos-client-base-unix.opam} (94%) create mode 100644 src/proto_alpha/bin_baker/jbuild create mode 100644 src/proto_alpha/bin_baker/main_baker_alpha.ml create mode 100644 src/proto_alpha/bin_baker/tezos-baker-alpha.opam rename src/proto_alpha/{lib_client => lib_baking}/client_baking_blocks.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_blocks.mli (100%) rename src/proto_alpha/{lib_client/client_baking_main.ml => lib_baking/client_baking_commands.ml} (100%) rename src/proto_alpha/{lib_client/client_baking_main.mli => lib_baking/client_baking_commands.mli} (100%) rename src/proto_alpha/{lib_client/client_proto_main.mli => lib_baking/client_baking_commands_registration.ml} (78%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_daemon.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_daemon.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_denunciation.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_denunciation.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_endorsement.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_endorsement.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_forge.ml (99%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_forge.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_lib.ml (96%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_lib.mli (100%) rename src/proto_alpha/{lib_client/client_proto_nonces.ml => lib_baking/client_baking_nonces.ml} (100%) rename src/proto_alpha/{lib_client/client_proto_nonces.mli => lib_baking/client_baking_nonces.mli} (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_operations.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_operations.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_revelation.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/client_baking_revelation.mli (100%) create mode 100644 src/proto_alpha/lib_baking/jbuild rename src/proto_alpha/{lib_client => lib_baking}/test/jbuild (92%) rename src/proto_alpha/{lib_client => lib_baking}/test/node_helpers.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/node_helpers.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/proto_alpha_helpers.ml (99%) rename src/proto_alpha/{lib_client => lib_baking}/test/proto_alpha_helpers.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/sandbox-vote.json (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/sandbox.json (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_endorsement.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_endorsement.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_michelson_parser.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_origination.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_origination.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_transaction.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_transaction.mli (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_vote.ml (100%) rename src/proto_alpha/{lib_client => lib_baking}/test/test_vote.mli (100%) create mode 100644 src/proto_alpha/lib_baking/tezos-baking-alpha-commands.opam create mode 100644 src/proto_alpha/lib_baking/tezos-baking-alpha.opam rename src/proto_alpha/lib_client/{michelson_macros.ml => michelson_v1_macros.ml} (100%) rename src/proto_alpha/lib_client/{michelson_macros.mli => michelson_v1_macros.mli} (100%) rename src/proto_alpha/{lib_client/client_proto_main.ml => lib_client_commands/alpha_commands_registration.ml} (78%) rename src/proto_alpha/{lib_client => lib_client_commands}/client_proto_context_commands.ml (100%) rename src/proto_alpha/{lib_client => lib_client_commands}/client_proto_contracts_commands.ml (100%) rename src/proto_alpha/{lib_client => lib_client_commands}/client_proto_programs_commands.ml (100%) rename src/proto_alpha/{lib_client => lib_client_commands}/client_proto_programs_commands.mli (100%) create mode 100644 src/proto_alpha/lib_client_commands/jbuild create mode 100644 src/proto_alpha/lib_client_commands/tezos-client-alpha-commands.opam delete mode 120000 src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.ml delete mode 120000 src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.mli create mode 120000 src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.ml create mode 120000 src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.mli diff --git a/.dockerignore b/.dockerignore index 0a6f49463..a6d4f34b9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,6 +13,7 @@ tezos-node tezos-protocol-compiler tezos-client tezos-admin-client +tezos-alpha-baker scripts/opam-test-all.sh.DONE diff --git a/.gitignore b/.gitignore index 1d5ee1e6d..3baf28865 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ __pycache__ /tezos-protocol-compiler /tezos-client /tezos-admin-client +/tezos-alpha-baker /scripts/opam-test-all.sh.DONE diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4bdd1795f..8a549f5f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,22 +151,22 @@ test:proto_alpha: test:client_alpha:transaction: <<: *test_definition script: - - jbuilder build @src/proto_alpha/lib_client/runtest_transaction + - jbuilder build @src/proto_alpha/lib_baking/runtest_transaction test:client_alpha:origination: <<: *test_definition script: - - jbuilder build @src/proto_alpha/lib_client/runtest_origination + - jbuilder build @src/proto_alpha/lib_baking/runtest_origination test:client_alpha:endorsement: <<: *test_definition script: - - jbuilder build @src/proto_alpha/lib_client/runtest_endorsement + - jbuilder build @src/proto_alpha/lib_baking/runtest_endorsement test:client_alpha:vote: <<: *test_definition script: - - jbuilder build @src/proto_alpha/lib_client/runtest_vote + - jbuilder build @src/proto_alpha/lib_baking/runtest_vote test:basic.sh: <<: *test_definition @@ -336,75 +336,95 @@ opam:24:tezos-p2p: variables: package: tezos-p2p -opam:25:ocplib-resto-json: - <<: *opam_definition - variables: - package: ocplib-resto-json - -opam:26:tezos-client-alpha: +opam:25:tezos-client-alpha: <<: *opam_definition variables: package: tezos-client-alpha -opam:27:tezos-client-genesis: +opam:26:tezos-client-commands: + <<: *opam_definition + variables: + package: tezos-client-commands + +opam:27:ocplib-resto-json: + <<: *opam_definition + variables: + package: ocplib-resto-json + +opam:28:tezos-client-genesis: <<: *opam_definition variables: package: tezos-client-genesis -opam:28:tezos-embedded-protocol-alpha: +opam:29:tezos-embedded-protocol-alpha: <<: *opam_definition variables: package: tezos-embedded-protocol-alpha -opam:29:tezos-embedded-protocol-demo: +opam:30:tezos-embedded-protocol-demo: <<: *opam_definition variables: package: tezos-embedded-protocol-demo -opam:30:tezos-embedded-protocol-genesis: +opam:31:tezos-embedded-protocol-genesis: <<: *opam_definition variables: package: tezos-embedded-protocol-genesis -opam:31:tezos-shell: +opam:32:tezos-shell: <<: *opam_definition variables: package: tezos-shell -opam:32:ocplib-ezresto: +opam:33:tezos-baking-alpha: + <<: *opam_definition + variables: + package: tezos-baking-alpha + +opam:34:ocplib-ezresto: <<: *opam_definition variables: package: ocplib-ezresto -opam:33:tezos-client: +opam:35:tezos-client: <<: *opam_definition variables: package: tezos-client -opam:34:tezos-node: +opam:36:tezos-node: <<: *opam_definition variables: package: tezos-node -opam:35:ocplib-ezresto-directory: +opam:37:tezos-baking-alpha-commands: + <<: *opam_definition + variables: + package: tezos-baking-alpha-commands + +opam:38:ocplib-ezresto-directory: <<: *opam_definition variables: package: ocplib-ezresto-directory -opam:36:tezos-protocol-demo: +opam:39:tezos-client-alpha-commands: + <<: *opam_definition + variables: + package: tezos-client-alpha-commands + +opam:40:tezos-baker-alpha: + <<: *opam_definition + variables: + package: tezos-baker-alpha + +opam:41:tezos-protocol-demo: <<: *opam_definition variables: package: tezos-protocol-demo -opam:37:tezos-unix-signers: +opam:42:tezos-client-base-unix: <<: *opam_definition variables: - package: tezos-unix-signers - -opam:38:tezos-client-commands: - <<: *opam_definition - variables: - package: tezos-client-commands + package: tezos-client-base-unix ##END_OPAM## diff --git a/Makefile b/Makefile index f164ecfcf..a771fdd80 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,13 @@ all: src/bin_node/main.exe \ src/bin_client/main_client.exe \ src/bin_client/main_admin.exe \ - src/lib_protocol_compiler/main_native.exe + src/lib_protocol_compiler/main_native.exe \ + src/proto_alpha/bin_baker/main_baker_alpha.exe @cp _build/default/src/bin_node/main.exe tezos-node @cp _build/default/src/bin_client/main_client.exe tezos-client @cp _build/default/src/bin_client/main_admin.exe tezos-admin-client @cp _build/default/src/lib_protocol_compiler/main_native.exe tezos-protocol-compiler + @cp _build/default/src/proto_alpha/bin_baker/main_baker_alpha.exe tezos-alpha-baker all.pkg: @jbuilder build ${DEV} \ @@ -56,7 +58,12 @@ install: clean: @-jbuilder clean - @-rm -f tezos-node tezos-client tezos-admin-client tezos-protocol-compiler + @-rm -f \ + tezos-node \ + tezos-client \ + tezos-admin-client \ + tezos-protocol-compiler \ + tezos-alpha-baker @-make -C docs clean .PHONY: all test build-deps docker-image clean diff --git a/src/bin_client/jbuild b/src/bin_client/jbuild index 9c233edd2..dc517a264 100644 --- a/src/bin_client/jbuild +++ b/src/bin_client/jbuild @@ -9,9 +9,11 @@ tezos-client-base tezos-client-commands tezos-client-genesis + tezos-client-alpha tezos-stdlib-unix - tezos-unix-signers - tezos-client-alpha)) + tezos-client-base-unix + tezos-client-alpha-commands.registration + tezos-baking-alpha-commands.registration)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives @@ -20,7 +22,7 @@ -open Tezos_shell_services -open Tezos_client_base -open Tezos_client_commands - -open Tezos_unix_signers)))) + -open Tezos_client_base_unix)))) (install ((section bin) diff --git a/src/bin_client/tezos-client.opam b/src/bin_client/tezos-client.opam index b7dac1962..b2b9a93be 100644 --- a/src/bin_client/tezos-client.opam +++ b/src/bin_client/tezos-client.opam @@ -13,7 +13,10 @@ depends: [ "tezos-client-base" "tezos-client-genesis" "tezos-client-alpha" - "tezos-unix-signers" + "tezos-client-alpha-commands" + "tezos-baking-alpha" + "tezos-baking-alpha-commands" + "tezos-client-base-unix" "tezos-node" { test } ] build: [ diff --git a/src/bin_client/client_config.ml b/src/lib_client_base_unix/client_config.ml similarity index 100% rename from src/bin_client/client_config.ml rename to src/lib_client_base_unix/client_config.ml diff --git a/src/bin_client/client_context_unix.ml b/src/lib_client_base_unix/client_context_unix.ml similarity index 99% rename from src/bin_client/client_context_unix.ml rename to src/lib_client_base_unix/client_context_unix.ml index 5a639693f..c31d49126 100644 --- a/src/bin_client/client_context_unix.ml +++ b/src/lib_client_base_unix/client_context_unix.ml @@ -7,7 +7,7 @@ (* *) (**************************************************************************) -open Client_commands +open Client_context class file_wallet dir : wallet = object (self) method private filename alias_name = diff --git a/src/bin_client/client_context_unix.mli b/src/lib_client_base_unix/client_context_unix.mli similarity index 100% rename from src/bin_client/client_context_unix.mli rename to src/lib_client_base_unix/client_context_unix.mli diff --git a/src/bin_client/client_main_run.ml b/src/lib_client_base_unix/client_main_run.ml similarity index 100% rename from src/bin_client/client_main_run.ml rename to src/lib_client_base_unix/client_main_run.ml diff --git a/src/bin_client/client_main_run.mli b/src/lib_client_base_unix/client_main_run.mli similarity index 100% rename from src/bin_client/client_main_run.mli rename to src/lib_client_base_unix/client_main_run.mli diff --git a/src/lib_unix_signers/client_signer_unencrypted.ml b/src/lib_client_base_unix/client_signer_unencrypted.ml similarity index 100% rename from src/lib_unix_signers/client_signer_unencrypted.ml rename to src/lib_client_base_unix/client_signer_unencrypted.ml diff --git a/src/lib_unix_signers/jbuild b/src/lib_client_base_unix/jbuild similarity index 57% rename from src/lib_unix_signers/jbuild rename to src/lib_client_base_unix/jbuild index 4a9e11b8c..e5dccf660 100644 --- a/src/lib_unix_signers/jbuild +++ b/src/lib_client_base_unix/jbuild @@ -1,16 +1,22 @@ (jbuild_version 1) (library - ((name tezos_unix_signers) - (public_name tezos-unix-signers) + ((name tezos_client_base_unix) + (public_name tezos-client-base-unix) (libraries (tezos-base tezos-client-base - tezos-stdlib-unix)) + tezos-client-commands + tezos-stdlib-unix + tezos-rpc-http + tezos-shell-services)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives + -open Tezos_rpc_http + -open Tezos_shell_services -open Tezos_stdlib_unix -open Tezos_client_base + -open Tezos_client_commands -linkall)))) (alias diff --git a/src/lib_unix_signers/tezos-unix-signers.opam b/src/lib_client_base_unix/tezos-client-base-unix.opam similarity index 94% rename from src/lib_unix_signers/tezos-unix-signers.opam rename to src/lib_client_base_unix/tezos-client-base-unix.opam index 3004eab39..23c43e5da 100644 --- a/src/lib_unix_signers/tezos-unix-signers.opam +++ b/src/lib_client_base_unix/tezos-client-base-unix.opam @@ -11,6 +11,7 @@ depends: [ "jbuilder" { build & >= "1.0+beta17" } "tezos-base" "tezos-client-base" + "tezos-client-commands" ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/src/proto_alpha/bin_baker/jbuild b/src/proto_alpha/bin_baker/jbuild new file mode 100644 index 000000000..0f40bf2fa --- /dev/null +++ b/src/proto_alpha/bin_baker/jbuild @@ -0,0 +1,18 @@ +(jbuild_version 1) + +(executable + ((name main_baker_alpha) + (public_name tezos-baker-alpha) + (libraries (tezos-client-base-unix + tezos-baking-alpha-commands)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_client_alpha + -open Tezos_baking_alpha_commands + -open Tezos_client_base_unix)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml*))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${^})))) diff --git a/src/proto_alpha/bin_baker/main_baker_alpha.ml b/src/proto_alpha/bin_baker/main_baker_alpha.ml new file mode 100644 index 000000000..8ce65352e --- /dev/null +++ b/src/proto_alpha/bin_baker/main_baker_alpha.ml @@ -0,0 +1,16 @@ +(**************************************************************************) +(* *) +(* Copyright (c) 2014 - 2018. *) +(* Dynamic Ledger Solutions, Inc. *) +(* *) +(* All rights reserved. No warranty, explicit or implicit, provided. *) +(* *) +(**************************************************************************) + +let select_commands _ _ = + return + (List.map + (Cli_entries.map_command (new Proto_alpha.wrap_full_context)) + (Client_baking_commands.commands ())) + +let () = Client_main_run.run select_commands diff --git a/src/proto_alpha/bin_baker/tezos-baker-alpha.opam b/src/proto_alpha/bin_baker/tezos-baker-alpha.opam new file mode 100644 index 000000000..a95bcb797 --- /dev/null +++ b/src/proto_alpha/bin_baker/tezos-baker-alpha.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+beta17" } + "tezos-base" + "tezos-client-base" + "tezos-client-genesis" + "tezos-client-alpha" + "tezos-client-commands" + "tezos-client-base-unix" + "tezos-baking-alpha" + "tezos-baking-alpha-commands" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] diff --git a/src/proto_alpha/lib_client/client_baking_blocks.ml b/src/proto_alpha/lib_baking/client_baking_blocks.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_blocks.ml rename to src/proto_alpha/lib_baking/client_baking_blocks.ml diff --git a/src/proto_alpha/lib_client/client_baking_blocks.mli b/src/proto_alpha/lib_baking/client_baking_blocks.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_blocks.mli rename to src/proto_alpha/lib_baking/client_baking_blocks.mli diff --git a/src/proto_alpha/lib_client/client_baking_main.ml b/src/proto_alpha/lib_baking/client_baking_commands.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_main.ml rename to src/proto_alpha/lib_baking/client_baking_commands.ml diff --git a/src/proto_alpha/lib_client/client_baking_main.mli b/src/proto_alpha/lib_baking/client_baking_commands.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_main.mli rename to src/proto_alpha/lib_baking/client_baking_commands.mli diff --git a/src/proto_alpha/lib_client/client_proto_main.mli b/src/proto_alpha/lib_baking/client_baking_commands_registration.ml similarity index 78% rename from src/proto_alpha/lib_client/client_proto_main.mli rename to src/proto_alpha/lib_baking/client_baking_commands_registration.ml index 8e9eb7c41..e4f43973c 100644 --- a/src/proto_alpha/lib_client/client_proto_main.mli +++ b/src/proto_alpha/lib_baking/client_baking_commands_registration.ml @@ -7,4 +7,7 @@ (* *) (**************************************************************************) -val protocol: Protocol_hash.t +let () = + Client_commands.register Proto_alpha.hash @@ + List.map (Cli_entries.map_command (new Proto_alpha.wrap_full_context)) @@ + Client_baking_commands.commands () diff --git a/src/proto_alpha/lib_client/client_baking_daemon.ml b/src/proto_alpha/lib_baking/client_baking_daemon.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_daemon.ml rename to src/proto_alpha/lib_baking/client_baking_daemon.ml diff --git a/src/proto_alpha/lib_client/client_baking_daemon.mli b/src/proto_alpha/lib_baking/client_baking_daemon.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_daemon.mli rename to src/proto_alpha/lib_baking/client_baking_daemon.mli diff --git a/src/proto_alpha/lib_client/client_baking_denunciation.ml b/src/proto_alpha/lib_baking/client_baking_denunciation.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_denunciation.ml rename to src/proto_alpha/lib_baking/client_baking_denunciation.ml diff --git a/src/proto_alpha/lib_client/client_baking_denunciation.mli b/src/proto_alpha/lib_baking/client_baking_denunciation.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_denunciation.mli rename to src/proto_alpha/lib_baking/client_baking_denunciation.mli diff --git a/src/proto_alpha/lib_client/client_baking_endorsement.ml b/src/proto_alpha/lib_baking/client_baking_endorsement.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_endorsement.ml rename to src/proto_alpha/lib_baking/client_baking_endorsement.ml diff --git a/src/proto_alpha/lib_client/client_baking_endorsement.mli b/src/proto_alpha/lib_baking/client_baking_endorsement.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_endorsement.mli rename to src/proto_alpha/lib_baking/client_baking_endorsement.mli diff --git a/src/proto_alpha/lib_client/client_baking_forge.ml b/src/proto_alpha/lib_baking/client_baking_forge.ml similarity index 99% rename from src/proto_alpha/lib_client/client_baking_forge.ml rename to src/proto_alpha/lib_baking/client_baking_forge.ml index 5c312442c..c8f6c6b37 100644 --- a/src/proto_alpha/lib_client/client_baking_forge.ml +++ b/src/proto_alpha/lib_baking/client_baking_forge.ml @@ -294,7 +294,7 @@ end = struct with Not_found -> [] in save cctxt (LevelMap.add level (hash :: previous) map)) >>=? fun () -> - Client_proto_nonces.add cctxt hash nonce + Client_baking_nonces.add cctxt hash nonce end @@ -377,7 +377,7 @@ let get_unrevealed_nonces (cctxt : #Proto_alpha.full_context) ?(force = false) b Client_baking_blocks.blocks_from_cycle cctxt block cycle >>=? fun blocks -> filter_map_s (fun hash -> - Client_proto_nonces.find cctxt hash >>=? function + Client_baking_nonces.find cctxt hash >>=? function | None -> return None | Some nonce -> Alpha_services.Context.level diff --git a/src/proto_alpha/lib_client/client_baking_forge.mli b/src/proto_alpha/lib_baking/client_baking_forge.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_forge.mli rename to src/proto_alpha/lib_baking/client_baking_forge.mli diff --git a/src/proto_alpha/lib_client/client_baking_lib.ml b/src/proto_alpha/lib_baking/client_baking_lib.ml similarity index 96% rename from src/proto_alpha/lib_client/client_baking_lib.ml rename to src/proto_alpha/lib_baking/client_baking_lib.ml index e7dcb3203..57a867efe 100644 --- a/src/proto_alpha/lib_client/client_baking_lib.ml +++ b/src/proto_alpha/lib_baking/client_baking_lib.ml @@ -56,7 +56,7 @@ let do_reveal cctxt block blocks = let nonces = List.map snd blocks in Client_baking_revelation.forge_seed_nonce_revelation cctxt block nonces >>=? fun () -> - Client_proto_nonces.dels cctxt (List.map fst blocks) >>=? fun () -> + Client_baking_nonces.dels cctxt (List.map fst blocks) >>=? fun () -> return () let reveal_block_nonces (cctxt : #Proto_alpha.full_context) block_hashes = @@ -75,7 +75,7 @@ let reveal_block_nonces (cctxt : #Proto_alpha.full_context) block_hashes = Lwt.return_none)) block_hashes >>= fun block_infos -> filter_map_s (fun (bi : Client_baking_blocks.block_info) -> - Client_proto_nonces.find cctxt bi.hash >>=? function + Client_baking_nonces.find cctxt bi.hash >>=? function | None -> cctxt#warning "Cannot find nonces for block %a (ignoring)@." Block_hash.pp_short bi.hash >>= fun () -> diff --git a/src/proto_alpha/lib_client/client_baking_lib.mli b/src/proto_alpha/lib_baking/client_baking_lib.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_lib.mli rename to src/proto_alpha/lib_baking/client_baking_lib.mli diff --git a/src/proto_alpha/lib_client/client_proto_nonces.ml b/src/proto_alpha/lib_baking/client_baking_nonces.ml similarity index 100% rename from src/proto_alpha/lib_client/client_proto_nonces.ml rename to src/proto_alpha/lib_baking/client_baking_nonces.ml diff --git a/src/proto_alpha/lib_client/client_proto_nonces.mli b/src/proto_alpha/lib_baking/client_baking_nonces.mli similarity index 100% rename from src/proto_alpha/lib_client/client_proto_nonces.mli rename to src/proto_alpha/lib_baking/client_baking_nonces.mli diff --git a/src/proto_alpha/lib_client/client_baking_operations.ml b/src/proto_alpha/lib_baking/client_baking_operations.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_operations.ml rename to src/proto_alpha/lib_baking/client_baking_operations.ml diff --git a/src/proto_alpha/lib_client/client_baking_operations.mli b/src/proto_alpha/lib_baking/client_baking_operations.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_operations.mli rename to src/proto_alpha/lib_baking/client_baking_operations.mli diff --git a/src/proto_alpha/lib_client/client_baking_revelation.ml b/src/proto_alpha/lib_baking/client_baking_revelation.ml similarity index 100% rename from src/proto_alpha/lib_client/client_baking_revelation.ml rename to src/proto_alpha/lib_baking/client_baking_revelation.ml diff --git a/src/proto_alpha/lib_client/client_baking_revelation.mli b/src/proto_alpha/lib_baking/client_baking_revelation.mli similarity index 100% rename from src/proto_alpha/lib_client/client_baking_revelation.mli rename to src/proto_alpha/lib_baking/client_baking_revelation.mli diff --git a/src/proto_alpha/lib_baking/jbuild b/src/proto_alpha/lib_baking/jbuild new file mode 100644 index 000000000..126c1c912 --- /dev/null +++ b/src/proto_alpha/lib_baking/jbuild @@ -0,0 +1,77 @@ +(jbuild_version 1) + +(library + ((name tezos_baking_alpha) + (public_name tezos-baking-alpha) + (libraries (tezos-base + tezos-protocol-alpha + tezos-protocol-environment-client + tezos-shell-services + tezos-client-base + tezos-client-alpha + tezos-client-commands + tezos-rpc)) + (library_flags (:standard -linkall)) + (modules (:standard \ client_baking_commands client_baking_commands_registration main_alpha_baker)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_shell_services + -open Tezos_client_base + -open Tezos_client_alpha + -open Tezos_client_commands + -open Tezos_rpc)))) + +(library + ((name tezos_baking_alpha_commands) + (public_name tezos-baking-alpha-commands) + (libraries (tezos-base + tezos-protocol-alpha + tezos-protocol-environment-client + tezos-shell-services + tezos-client-base + tezos-client-alpha + tezos-client-commands + tezos-baking-alpha)) + (library_flags (:standard -linkall)) + (modules (client_baking_commands)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_shell_services + -open Tezos_client_base + -open Tezos_client_alpha + -open Tezos_client_commands + -open Tezos_baking_alpha + -open Tezos_rpc)))) + +(library + ((name tezos_baking_alpha_commands_registration) + (public_name tezos-baking-alpha-commands.registration) + (libraries (tezos-base + tezos-protocol-alpha + tezos-protocol-environment-client + tezos-shell-services + tezos-client-base + tezos-client-alpha + tezos-client-commands + tezos-baking-alpha + tezos-baking-alpha-commands + tezos-rpc)) + (library_flags (:standard -linkall)) + (modules (client_baking_commands_registration)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_shell_services + -open Tezos_client_base + -open Tezos_client_alpha + -open Tezos_client_commands + -open Tezos_baking_alpha + -open Tezos_baking_alpha_commands + -open Tezos_rpc)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml*))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${^})))) diff --git a/src/proto_alpha/lib_client/test/jbuild b/src/proto_alpha/lib_baking/test/jbuild similarity index 92% rename from src/proto_alpha/lib_client/test/jbuild rename to src/proto_alpha/lib_baking/test/jbuild index bec991147..9ad5d4b6f 100644 --- a/src/proto_alpha/lib_client/test/jbuild +++ b/src/proto_alpha/lib_baking/test/jbuild @@ -12,7 +12,8 @@ tezos-client-base tezos-client-genesis tezos-client-alpha - tezos-unix-signers + tezos-baking-alpha + tezos-client-base-unix alcotest-lwt)) (flags (:standard -w -9-32 -safe-string -open Tezos_base__TzPervasives @@ -21,7 +22,8 @@ -open Tezos_client_base -open Tezos_client_genesis -open Tezos_client_alpha - -open Tezos_unix_signers)))) + -open Tezos_baking_alpha + -open Tezos_client_base_unix)))) (alias ((name buildtest) diff --git a/src/proto_alpha/lib_client/test/node_helpers.ml b/src/proto_alpha/lib_baking/test/node_helpers.ml similarity index 100% rename from src/proto_alpha/lib_client/test/node_helpers.ml rename to src/proto_alpha/lib_baking/test/node_helpers.ml diff --git a/src/proto_alpha/lib_client/test/node_helpers.mli b/src/proto_alpha/lib_baking/test/node_helpers.mli similarity index 100% rename from src/proto_alpha/lib_client/test/node_helpers.mli rename to src/proto_alpha/lib_baking/test/node_helpers.mli diff --git a/src/proto_alpha/lib_client/test/proto_alpha_helpers.ml b/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml similarity index 99% rename from src/proto_alpha/lib_client/test/proto_alpha_helpers.ml rename to src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml index 6cc3ee0e6..5de62c8e2 100644 --- a/src/proto_alpha/lib_client/test/proto_alpha_helpers.ml +++ b/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml @@ -47,7 +47,7 @@ let activate_alpha () = ~location:"edsk31vznjHSSpGExDMHYASz45VZqXN4DPxvsa4hAyY8dHM28cZzp6" in Tezos_client_genesis.Client_proto_main.bake !rpc_ctxt (`Head 0) - (Activate { protocol = Client_proto_main.protocol ; + (Activate { protocol = Proto_alpha.hash ; fitness }) dictator_sk diff --git a/src/proto_alpha/lib_client/test/proto_alpha_helpers.mli b/src/proto_alpha/lib_baking/test/proto_alpha_helpers.mli similarity index 100% rename from src/proto_alpha/lib_client/test/proto_alpha_helpers.mli rename to src/proto_alpha/lib_baking/test/proto_alpha_helpers.mli diff --git a/src/proto_alpha/lib_client/test/sandbox-vote.json b/src/proto_alpha/lib_baking/test/sandbox-vote.json similarity index 100% rename from src/proto_alpha/lib_client/test/sandbox-vote.json rename to src/proto_alpha/lib_baking/test/sandbox-vote.json diff --git a/src/proto_alpha/lib_client/test/sandbox.json b/src/proto_alpha/lib_baking/test/sandbox.json similarity index 100% rename from src/proto_alpha/lib_client/test/sandbox.json rename to src/proto_alpha/lib_baking/test/sandbox.json diff --git a/src/proto_alpha/lib_client/test/test_endorsement.ml b/src/proto_alpha/lib_baking/test/test_endorsement.ml similarity index 100% rename from src/proto_alpha/lib_client/test/test_endorsement.ml rename to src/proto_alpha/lib_baking/test/test_endorsement.ml diff --git a/src/proto_alpha/lib_client/test/test_endorsement.mli b/src/proto_alpha/lib_baking/test/test_endorsement.mli similarity index 100% rename from src/proto_alpha/lib_client/test/test_endorsement.mli rename to src/proto_alpha/lib_baking/test/test_endorsement.mli diff --git a/src/proto_alpha/lib_client/test/test_michelson_parser.ml b/src/proto_alpha/lib_baking/test/test_michelson_parser.ml similarity index 100% rename from src/proto_alpha/lib_client/test/test_michelson_parser.ml rename to src/proto_alpha/lib_baking/test/test_michelson_parser.ml diff --git a/src/proto_alpha/lib_client/test/test_origination.ml b/src/proto_alpha/lib_baking/test/test_origination.ml similarity index 100% rename from src/proto_alpha/lib_client/test/test_origination.ml rename to src/proto_alpha/lib_baking/test/test_origination.ml diff --git a/src/proto_alpha/lib_client/test/test_origination.mli b/src/proto_alpha/lib_baking/test/test_origination.mli similarity index 100% rename from src/proto_alpha/lib_client/test/test_origination.mli rename to src/proto_alpha/lib_baking/test/test_origination.mli diff --git a/src/proto_alpha/lib_client/test/test_transaction.ml b/src/proto_alpha/lib_baking/test/test_transaction.ml similarity index 100% rename from src/proto_alpha/lib_client/test/test_transaction.ml rename to src/proto_alpha/lib_baking/test/test_transaction.ml diff --git a/src/proto_alpha/lib_client/test/test_transaction.mli b/src/proto_alpha/lib_baking/test/test_transaction.mli similarity index 100% rename from src/proto_alpha/lib_client/test/test_transaction.mli rename to src/proto_alpha/lib_baking/test/test_transaction.mli diff --git a/src/proto_alpha/lib_client/test/test_vote.ml b/src/proto_alpha/lib_baking/test/test_vote.ml similarity index 100% rename from src/proto_alpha/lib_client/test/test_vote.ml rename to src/proto_alpha/lib_baking/test/test_vote.ml diff --git a/src/proto_alpha/lib_client/test/test_vote.mli b/src/proto_alpha/lib_baking/test/test_vote.mli similarity index 100% rename from src/proto_alpha/lib_client/test/test_vote.mli rename to src/proto_alpha/lib_baking/test/test_vote.mli diff --git a/src/proto_alpha/lib_baking/tezos-baking-alpha-commands.opam b/src/proto_alpha/lib_baking/tezos-baking-alpha-commands.opam new file mode 100644 index 000000000..5ee36d991 --- /dev/null +++ b/src/proto_alpha/lib_baking/tezos-baking-alpha-commands.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+beta17" } + "tezos-base" + "tezos-protocol-environment-client" + "tezos-protocol-alpha" + "tezos-shell-services" + "tezos-client-base" + "tezos-client-commands" + "tezos-client-alpha" + "tezos-baking-alpha" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] diff --git a/src/proto_alpha/lib_baking/tezos-baking-alpha.opam b/src/proto_alpha/lib_baking/tezos-baking-alpha.opam new file mode 100644 index 000000000..f77ebc095 --- /dev/null +++ b/src/proto_alpha/lib_baking/tezos-baking-alpha.opam @@ -0,0 +1,29 @@ +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+beta17" } + "tezos-base" + "tezos-protocol-environment-client" + "tezos-protocol-alpha" + "tezos-shell-services" + "tezos-client-base" + "tezos-client-commands" + "tezos-client-alpha" + "tezos-node" { test } + "tezos-client-genesis" { test } + "tezos-client-base-unix" { test } + "alcotest-lwt" { test } +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/proto_alpha/lib_client/jbuild b/src/proto_alpha/lib_client/jbuild index 9c8402d07..cc6a4157e 100644 --- a/src/proto_alpha/lib_client/jbuild +++ b/src/proto_alpha/lib_client/jbuild @@ -8,7 +8,6 @@ tezos-protocol-environment-client tezos-shell-services tezos-client-base - tezos-client-commands tezos-rpc)) (library_flags (:standard -linkall)) (flags (:standard -w -9+27-30-32-40@8 @@ -16,7 +15,6 @@ -open Tezos_base__TzPervasives -open Tezos_shell_services -open Tezos_client_base - -open Tezos_client_commands -open Tezos_rpc)))) (alias diff --git a/src/proto_alpha/lib_client/michelson_macros.ml b/src/proto_alpha/lib_client/michelson_v1_macros.ml similarity index 100% rename from src/proto_alpha/lib_client/michelson_macros.ml rename to src/proto_alpha/lib_client/michelson_v1_macros.ml diff --git a/src/proto_alpha/lib_client/michelson_macros.mli b/src/proto_alpha/lib_client/michelson_v1_macros.mli similarity index 100% rename from src/proto_alpha/lib_client/michelson_macros.mli rename to src/proto_alpha/lib_client/michelson_v1_macros.mli diff --git a/src/proto_alpha/lib_client/michelson_v1_parser.ml b/src/proto_alpha/lib_client/michelson_v1_parser.ml index 7a515a95f..66251778a 100644 --- a/src/proto_alpha/lib_client/michelson_v1_parser.ml +++ b/src/proto_alpha/lib_client/michelson_v1_parser.ml @@ -32,7 +32,7 @@ let expand_all source ast errors = f tl in let error_map = error_map ([], []) in let rec expand expr = - match Michelson_macros.expand expr with + match Michelson_v1_macros.expand expr with | Ok expanded -> begin match expanded with diff --git a/src/proto_alpha/lib_client/michelson_v1_printer.ml b/src/proto_alpha/lib_client/michelson_v1_printer.ml index 1a2bb6274..3c1f37143 100644 --- a/src/proto_alpha/lib_client/michelson_v1_printer.ml +++ b/src/proto_alpha/lib_client/michelson_v1_printer.ml @@ -62,7 +62,7 @@ let inject_types type_map parsed = let unparse ?type_map parse expanded = let rec unexpand expr = - match Michelson_macros.unexpand expr with + match Michelson_v1_macros.unexpand expr with | Seq (loc, items, annot) -> Seq (loc, List.map unexpand items, annot) | Prim (loc, name, args, annot) -> diff --git a/src/proto_alpha/lib_client/proto_alpha.ml b/src/proto_alpha/lib_client/proto_alpha.ml index 363c9e2b3..a3ca8bf23 100644 --- a/src/proto_alpha/lib_client/proto_alpha.ml +++ b/src/proto_alpha/lib_client/proto_alpha.ml @@ -11,6 +11,10 @@ module Name = struct let name = "alpha" end module Alpha_environment = Tezos_protocol_environment_client.Fake.Make(Name)() include Tezos_protocol_alpha.Functor.Make(Alpha_environment) +let hash = + Protocol_hash.of_b58check_exn + "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" + class type rpc_context = object inherit RPC_context.json inherit [Block_services.block] Alpha_environment.RPC_context.simple diff --git a/src/proto_alpha/lib_client/tezos-client-alpha.opam b/src/proto_alpha/lib_client/tezos-client-alpha.opam index 4daf04281..c3388e00f 100644 --- a/src/proto_alpha/lib_client/tezos-client-alpha.opam +++ b/src/proto_alpha/lib_client/tezos-client-alpha.opam @@ -14,13 +14,7 @@ depends: [ "tezos-protocol-alpha" "tezos-shell-services" "tezos-client-base" - "tezos-node" { test } - "tezos-client-genesis" { test } - "alcotest-lwt" { test } ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] ] -build-test: [ - [ "jbuilder" "runtest" "-p" name "-j" jobs ] -] diff --git a/src/proto_alpha/lib_client/client_proto_main.ml b/src/proto_alpha/lib_client_commands/alpha_commands_registration.ml similarity index 78% rename from src/proto_alpha/lib_client/client_proto_main.ml rename to src/proto_alpha/lib_client_commands/alpha_commands_registration.ml index aa555bee6..65723b8f4 100644 --- a/src/proto_alpha/lib_client/client_proto_main.ml +++ b/src/proto_alpha/lib_client_commands/alpha_commands_registration.ml @@ -7,14 +7,9 @@ (* *) (**************************************************************************) -let protocol = - Protocol_hash.of_b58check_exn - "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" - let () = - Client_commands.register protocol @@ + Client_commands.register Proto_alpha.hash @@ List.map (Cli_entries.map_command (new Proto_alpha.wrap_full_context)) @@ Client_proto_programs_commands.commands () @ Client_proto_contracts_commands.commands () @ - Client_proto_context_commands.commands () @ - Client_baking_main.commands () + Client_proto_context_commands.commands () diff --git a/src/proto_alpha/lib_client/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml similarity index 100% rename from src/proto_alpha/lib_client/client_proto_context_commands.ml rename to src/proto_alpha/lib_client_commands/client_proto_context_commands.ml diff --git a/src/proto_alpha/lib_client/client_proto_contracts_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_contracts_commands.ml similarity index 100% rename from src/proto_alpha/lib_client/client_proto_contracts_commands.ml rename to src/proto_alpha/lib_client_commands/client_proto_contracts_commands.ml diff --git a/src/proto_alpha/lib_client/client_proto_programs_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml similarity index 100% rename from src/proto_alpha/lib_client/client_proto_programs_commands.ml rename to src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml diff --git a/src/proto_alpha/lib_client/client_proto_programs_commands.mli b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.mli similarity index 100% rename from src/proto_alpha/lib_client/client_proto_programs_commands.mli rename to src/proto_alpha/lib_client_commands/client_proto_programs_commands.mli diff --git a/src/proto_alpha/lib_client_commands/jbuild b/src/proto_alpha/lib_client_commands/jbuild new file mode 100644 index 000000000..4ae05f3e2 --- /dev/null +++ b/src/proto_alpha/lib_client_commands/jbuild @@ -0,0 +1,52 @@ +(jbuild_version 1) + +(library + ((name tezos_client_alpha_commands) + (public_name tezos-client-alpha-commands) + (libraries (tezos-base + tezos-protocol-alpha + tezos-protocol-environment-client + tezos-shell-services + tezos-client-base + tezos-client-alpha + tezos-client-commands + tezos-rpc)) + (library_flags (:standard -linkall)) + (modules (:standard \ alpha_commands_registration)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_shell_services + -open Tezos_client_base + -open Tezos_client_alpha + -open Tezos_client_commands + -open Tezos_rpc)))) + +(library + ((name tezos_client_alpha_commands_registration) + (public_name tezos-client-alpha-commands.registration) + (libraries (tezos-base + tezos-protocol-alpha + tezos-protocol-environment-client + tezos-shell-services + tezos-client-base + tezos-client-alpha + tezos-client-commands + tezos-client-alpha-commands + tezos-rpc)) + (library_flags (:standard -linkall)) + (modules (alpha_commands_registration)) + (flags (:standard -w -9+27-30-32-40@8 + -safe-string + -open Tezos_base__TzPervasives + -open Tezos_shell_services + -open Tezos_client_base + -open Tezos_client_alpha + -open Tezos_client_commands + -open Tezos_client_alpha_commands + -open Tezos_rpc)))) + +(alias + ((name runtest_indent) + (deps ((glob_files *.ml*))) + (action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${^})))) diff --git a/src/proto_alpha/lib_client_commands/tezos-client-alpha-commands.opam b/src/proto_alpha/lib_client_commands/tezos-client-alpha-commands.opam new file mode 100644 index 000000000..e95d62693 --- /dev/null +++ b/src/proto_alpha/lib_client_commands/tezos-client-alpha-commands.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+beta17" } + "tezos-base" + "tezos-protocol-environment-client" + "tezos-protocol-alpha" + "tezos-shell-services" + "tezos-client-base" + "tezos-client-alpha" + "tezos-client-commands" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] diff --git a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.ml b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.ml deleted file mode 120000 index 861e17bc3..000000000 --- a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.ml +++ /dev/null @@ -1 +0,0 @@ -../../../lib_client/michelson_macros.ml \ No newline at end of file diff --git a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.mli b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.mli deleted file mode 120000 index 560f339cd..000000000 --- a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_macros.mli +++ /dev/null @@ -1 +0,0 @@ -../../../lib_client/michelson_macros.mli \ No newline at end of file diff --git a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.ml b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.ml new file mode 120000 index 000000000..f615f483b --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.ml @@ -0,0 +1 @@ +../../../lib_client/michelson_v1_macros.ml \ No newline at end of file diff --git a/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.mli b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.mli new file mode 120000 index 000000000..a15ab86a6 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/michelson_parser/michelson_v1_macros.mli @@ -0,0 +1 @@ +../../../lib_client/michelson_v1_macros.mli \ No newline at end of file