From c8e50c56ab1acc60463407737081385047881618 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 12 Mar 2021 16:27:49 +0100 Subject: [PATCH 01/10] doc: add test of tezos-node executable, to detect zcash params error --- docs/introduction/compile-sources.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/introduction/compile-sources.sh b/docs/introduction/compile-sources.sh index d861d9ef4cdf..e45a43a81174 100644 --- a/docs/introduction/compile-sources.sh +++ b/docs/introduction/compile-sources.sh @@ -30,3 +30,4 @@ source ./src/bin_client/bash-completion.sh export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y # [test executable] ./tezos-client +./tezos-node config --help -- GitLab From 14bbf57dec6b18193979214d4f357b7154fd70fe Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 12 Mar 2021 17:34:49 +0100 Subject: [PATCH 02/10] doc: add redirects for 007 pages --- docs/_redirects | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_redirects b/docs/_redirects index 56761a4a2017..4b7bd016d0aa 100644 --- a/docs/_redirects +++ b/docs/_redirects @@ -1,5 +1,10 @@ /api/cli-commands.html /shell/cli-commands.html 302 /007/cli-commands.html /shell/cli-commands.html 302 +/007/rpc.html /shell/rpc.html 302 +/007/glossary.html /alpha/glossary.html 302 +/007/michelson.html /alpha/michelson.html 302 +/007/proof_of_stake.html /alpha/proof_of_stake.html 302 +/007/voting.html /alpha/voting.html 302 /api/rpc.html /008/rpc.html 302 /developer/sapling.html /008/sapling.html 302 /user/glossary.html /008/glossary.html 302 -- GitLab From e27cd57a301e0cc5c33851c846c1409a15c88053 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 16 Mar 2021 11:00:11 +0100 Subject: [PATCH 03/10] doc: fix path of contract id.tz (Issue tezos/tezos#1168) --- docs/user/various.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user/various.rst b/docs/user/various.rst index ab8fcd9a69ec..b077872c65f4 100644 --- a/docs/user/various.rst +++ b/docs/user/various.rst @@ -30,8 +30,9 @@ scripts without interacting with a Tezos node) by adding in your Note that the Michelson mode will be chosen automatically by Emacs for files with a ``.tz`` or ``.tez`` extension. -We can now open our favourite contract ``emacs -./src/bin_client/test/contracts/attic/id.tz`` and, when moving the cursor on +We can now open our favourite contract +:src:`./tests_python/contracts_alpha/attic/id.tz` in Emacs +and, when moving the cursor on a Michelson instruction, in the bottom of the windows Emacs should display the state of the stack before (left) and after (right) the application of the instruction. @@ -41,7 +42,7 @@ run it locally: :: - tezos-client run script ./src/bin_client/test/contracts/attic/id.tz \ + tezos-client run script ./tests_python/contracts_alpha/attic/id.tz \ on storage '"hello"' and input '"world"' .. _tezos-admin-client: -- GitLab From c0f48df02a0c3568bec1655d1756cc42b47e4293 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Thu, 18 Mar 2021 09:30:44 +0100 Subject: [PATCH 04/10] doc: replace obsolete 007/ link by alpha/ --- docs/introduction/howtouse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/introduction/howtouse.rst b/docs/introduction/howtouse.rst index 79f4a99c3f2a..e12f630571e2 100644 --- a/docs/introduction/howtouse.rst +++ b/docs/introduction/howtouse.rst @@ -503,7 +503,7 @@ usage. Otherwise, you can force a low fee operation using the `--force-low-fee`, with the risk that no baker will include it. More test contracts can be found in directory -:src:`tests_python/contracts_007/`. +:src:`tests_python/contracts_alpha/`. Advanced documentation of the smart contract language is available :ref:`here`. -- GitLab From cd1c1124dd683a0d7fa1e9e0ca182ef7b0dfc424 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 19 Mar 2021 16:09:48 +0100 Subject: [PATCH 05/10] doc: fix a broken label and a broken list item --- docs/developer/contributing.rst | 4 +--- docs/developer/python_testing_framework.rst | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/developer/contributing.rst b/docs/developer/contributing.rst index a392060d744c..58e7d0e29d39 100644 --- a/docs/developer/contributing.rst +++ b/docs/developer/contributing.rst @@ -296,9 +296,7 @@ In the special case where your MR adds a new Python, Rust, Javascript, or other dependency, additional steps must also be followed. * for Python, you can refer to the related section in the :ref:`python testing documentation `. -* the Rust dependencies are located in the GitLab repository `tezos-rust-libs -`_ and the instructions are listed -there. +* the Rust dependencies are located in the GitLab repository `tezos-rust-libs `_ and the instructions are listed there. For others, there is currently no dedicated guide. Do not hesitate to ask for help on the ``#devteam`` channel on the `tezos-dev` Slack. diff --git a/docs/developer/python_testing_framework.rst b/docs/developer/python_testing_framework.rst index 2f6f55a7f393..378a0e9ad512 100644 --- a/docs/developer/python_testing_framework.rst +++ b/docs/developer/python_testing_framework.rst @@ -674,6 +674,7 @@ such as ``utils.check_contains_operations(client, [op_hash])`` instead of using blocking commands. .. _python_adding_new_dependencies: + Adding new dependencies ----------------------- -- GitLab From 6de9aed6d4efdc9d0be21826dcdbeca0d654b0c3 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 19 Mar 2021 22:56:57 +0100 Subject: [PATCH 06/10] doc: upgrade tezos APT packages from 007 to 008 --- docs/introduction/install-bin-ubuntu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/introduction/install-bin-ubuntu.sh b/docs/introduction/install-bin-ubuntu.sh index 1bb3ebadfb6d..dd84bb0d45c4 100644 --- a/docs/introduction/install-bin-ubuntu.sh +++ b/docs/introduction/install-bin-ubuntu.sh @@ -8,6 +8,6 @@ apt-get install -y software-properties-common Date: Fri, 19 Mar 2021 23:17:54 +0100 Subject: [PATCH 07/10] doc: update APT install for Fedora --- .gitlab/ci/test-doc-scripts.yml | 8 ++++---- docs/introduction/install-bin-fedora.sh | 6 +++--- docs/introduction/test_howtoget.sh | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab/ci/test-doc-scripts.yml b/.gitlab/ci/test-doc-scripts.yml index 36931a5ea83d..a8995bd8184d 100644 --- a/.gitlab/ci/test-doc-scripts.yml +++ b/.gitlab/ci/test-doc-scripts.yml @@ -20,14 +20,14 @@ install_bin_focal: script: - bash ./docs/introduction/install-bin-fedora.sh -install_bin_fedora_31: - image: fedora:31 - extends: .install_bin_fedora_template - install_bin_fedora_32: image: fedora:32 extends: .install_bin_fedora_template +install_bin_fedora_33: + image: fedora:33 + extends: .install_bin_fedora_template + .install_opam_ubuntu_template: extends: .base-test-doc-scripts-template script: diff --git a/docs/introduction/install-bin-fedora.sh b/docs/introduction/install-bin-fedora.sh index e64f1e78c932..888e880482b7 100644 --- a/docs/introduction/install-bin-fedora.sh +++ b/docs/introduction/install-bin-fedora.sh @@ -6,6 +6,6 @@ dnf install -y dnf-plugins-core dnf copr enable -y @Serokell/Tezos && dnf update -y dnf install -y tezos-client dnf install -y tezos-node -dnf install -y tezos-baker-007-PsDELPH1 -dnf install -y tezos-endorser-007-PsDELPH1 -dnf install -y tezos-accuser-007-PsDELPH1 +dnf install -y tezos-baker-008-PtEdo2Zk +dnf install -y tezos-endorser-008-PtEdo2Zk +dnf install -y tezos-accuser-008-PtEdo2Zk diff --git a/docs/introduction/test_howtoget.sh b/docs/introduction/test_howtoget.sh index 8df96262b31a..5ae112f7bb4a 100755 --- a/docs/introduction/test_howtoget.sh +++ b/docs/introduction/test_howtoget.sh @@ -26,8 +26,8 @@ where can be: * use-docker * install-bin-bionic * install-bin-focal -* install-bin-fedora31 * install-bin-fedora32 +* install-bin-fedora33 * install-opam-scratch * install-opam-bionic * install-opam-focal @@ -49,12 +49,12 @@ case "$1" in "install-bin-focal" ) docker run --rm -i $UBUNTU_FOCAL <"$MYDIR"/install-bin-ubuntu.sh ;; - "install-bin-fedora31" ) - docker run --rm -i fedora:31 <"$MYDIR"/install-bin-fedora.sh - ;; "install-bin-fedora32" ) docker run --rm -i fedora:32 <"$MYDIR"/install-bin-fedora.sh ;; + "install-bin-fedora33" ) + docker run --rm -i fedora:33 <"$MYDIR"/install-bin-fedora.sh + ;; "install-opam-scratch" ) docker run --rm -i --privileged $UBUNTU_BIONIC <"$MYDIR"/install-opam-scratch.sh ;; -- GitLab From 2fe37e199dc89fb2bfcded745b2d6faab557e3c1 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Mon, 22 Mar 2021 14:46:20 +0100 Subject: [PATCH 08/10] doc: remove "+" at line start --- docs/developer/guidelines.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/guidelines.rst b/docs/developer/guidelines.rst index 5fa4df31f8ee..4650d784d01a 100644 --- a/docs/developer/guidelines.rst +++ b/docs/developer/guidelines.rst @@ -171,7 +171,7 @@ for additional options). Coding conventions ------------------ -+Other than the formatting rules above, there are currently no coding +Other than the formatting rules above, there are currently no coding conventions enforced in the codebase. However, Tezos developers should be aware of general `OCaml programming guidelines `_, which recommend formatting, naming conventions, -- GitLab From 10f1c19869d72ab2a8ddb3afad275fae8bfe53b6 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Mon, 22 Mar 2021 15:48:51 +0100 Subject: [PATCH 09/10] doc: introduce the doc header at top of ".ml" files --- docs/developer/guidelines.rst | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/developer/guidelines.rst b/docs/developer/guidelines.rst index 4650d784d01a..8ef30b8256b8 100644 --- a/docs/developer/guidelines.rst +++ b/docs/developer/guidelines.rst @@ -58,24 +58,31 @@ Constants and struct fields: - Purpose and definition of this data. If the unit is a measurement of time, include it, e.g., TIMEOUT_MS for timeout in milliseconds. -Documenting interfaces ----------------------- +Documenting interfaces and implementations +------------------------------------------ At the granularity of OCaml files, it is essential to document the interface implemented by each file. +In many cases, it is useful to also document the implementation, but *separately* from the interface. Implementation (``.ml``) files: -- In the common case where there is a corresponding interface (``.mli``) file, - document the interface file instead, as detailed below. -- In the less common case where there is no corresponding interface (``.mli``) - file, document the exported elements directly in the implementation (``.ml``) - file. +- Document the interface: + + + In the common case where there is a corresponding interface (``.mli``) file, + document the interface file instead, as detailed below. + + In the less common case where there is no corresponding interface (``.mli``) + file, document the exported elements directly in the implementation + (``.ml``) file. + +- Document the implementation: For many non-trivial implementations, it is most useful to document the design principles, code structure, internal invariants, and so on. + Such information should be placed in a comment block at the top of the file. Interface (``.mli``) file comments: - One-line description - Brief description of the library, introducing the needed concepts -- Brief description of each module, type, function, data, as described for :ref:`comments in the code`. +- Brief description of each module, type, function, data, as described for :ref:`comments in the code` +- If applicable, external invariants (i.e., visible to the user). README files ------------ -- GitLab From 38ad096c429c278a47831ee55e02174f086799a7 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 23 Mar 2021 18:12:57 +0100 Subject: [PATCH 10/10] doc: print TEZOS_CLIENT_DIR on client --help --- src/lib_client_base_unix/client_config.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib_client_base_unix/client_config.ml b/src/lib_client_base_unix/client_config.ml index 68528b961082..2b593d27042b 100644 --- a/src/lib_client_base_unix/client_config.ml +++ b/src/lib_client_base_unix/client_config.ml @@ -368,13 +368,14 @@ let base_dir_arg () = ~placeholder:"path" ~doc: (Format.asprintf - "@[@[<2>client data directory@,\ + "@[@[<2>client data directory (absent: %s env)@,\ The directory where the Tezos client will store all its data.@,\ If absent, its value is the value of the %s@,\ environment variable. If %s is itself not specified,@,\ defaults to %s@]@]@." base_dir_env_name base_dir_env_name + base_dir_env_name default_base_dir) (string_parameter ()) -- GitLab