From e51378f695503a86fc9feb7418e287bd8ff17fd1 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Wed, 19 Jan 2022 16:46:32 +0100 Subject: [PATCH 1/8] doc: move .gitignore docs/* items to docs/.gitignore --- .gitignore | 13 ------------- docs/.gitignore | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 8072c5aa0d0a..7d2c4baa3f83 100644 --- a/.gitignore +++ b/.gitignore @@ -10,12 +10,6 @@ __pycache__ /_opam /_docker_build /_snoop -/docs/api/tezos-client.html -/docs/api/tezos-admin-client.html -/docs/api/tezos-signer.html -/docs/api/tezos-accuser-alpha.html -/docs/api/tezos-baker-alpha.html -/docs/api/tezos-endorser-alpha.html /test_results @@ -42,13 +36,6 @@ __pycache__ /scripts/opam-test-all.sh.DONE /scripts/create_genesis/src -/docs/introduction/readme.rst -/docs/api/errors.rst -/docs/0*/rpc.rst -/docs/alpha/rpc.rst -/docs/shell/rpc.rst -/docs/shell/p2p_api.rst - /src/bin_client/test/LOG.* /_coverage_output/*.coverage /_coverage_report diff --git a/docs/.gitignore b/docs/.gitignore index 853cd52d3a7c..cdc397cddfdd 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,10 +1,17 @@ -/shell/p2p_api.rst -/shell/rpc.rst -/api/tezos-snoop.html -/api/tezos-codec.html -/api/tezos-node-run.txt -/user/default-acl.json tezos-baker.html tezos-accuser.html tezos-endorser.html tezos-client.html +/api/tezos-snoop.html +/api/tezos-codec.html +/api/tezos-admin-client.html +/api/tezos-signer.html + +/0*/rpc.rst +/alpha/rpc.rst +/shell/rpc.rst + +/api/errors.rst +/shell/p2p_api.rst +/user/default-acl.json +/CHANGES.rst -- GitLab From 720d8bab16be98b6c098a99085086c9704993856 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Mon, 7 Feb 2022 18:23:58 +0100 Subject: [PATCH 2/8] doc: delete ignored file user/default-acl.json in Makefile --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 21d4fbe4557c..b00e3b148ce6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -169,5 +169,5 @@ lint: pylint pycodestyle lint_black clean: @-rm -Rf "$(BUILDDIR)" - @-rm -Rf api/errors.rst active/rpc.rst 011/rpc.rst 012/rpc.rst alpha/rpc.rst shell/rpc.rst shell/p2p_api.rst + @-rm -Rf api/errors.rst active/rpc.rst 011/rpc.rst 012/rpc.rst alpha/rpc.rst shell/rpc.rst shell/p2p_api.rst user/default-acl.json @-rm -Rf api/tezos-*.html api/tezos-*.txt active/tezos-*.html 011/tezos-*.html 012/tezos-*.html alpha/tezos-*.html -- GitLab From 87d0611c782e9669ae82ca53d81de0e8d376e15a Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 27 Jan 2022 10:45:25 +0100 Subject: [PATCH 3/8] Docs/User: fix referred value of preserved_cycles The doc was using the value from the sandbox mode instead of the mainnet value. --- docs/user/history_modes.rst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/user/history_modes.rst b/docs/user/history_modes.rst index b76a54d9acb2..656777d754d2 100644 --- a/docs/user/history_modes.rst +++ b/docs/user/history_modes.rst @@ -189,27 +189,29 @@ the ledger state and the block metadata (operation receipts, rewards updates, etc.) of blocks outside the offset of this sliding window. Depending on the network, a minimum number of cycles are kept. These cycles correspond to the ones above the last -allowed fork level, that are blocks subjects to a potential chain -reorganization (on mainnet, it corresponds to 2 cycles). However, the +allowed fork level, containing blocks subjects to a potential chain +reorganization (this minimal number of cycles is currently given by +the :ref:`preserved_cycles` protocol parameter, which +on mainnet is currently set to 5 cycles). However, the node is able to keep an additional number of cycles that is configurable. By default, the number of additional cycles kept, for both ``full`` -and ``rolling`` nodes, is *5 cycles*. On mainnet, this would total *7 -cycles* of complete history (approximately three weeks), as we keep 5 -cycles beyond the minimal number of cycles, that is 2 + 5 = 7. It is +and ``rolling`` nodes, is *5 cycles*. On mainnet, this would total *10 +cycles* of complete history (approximately four weeks), as we keep 5 +cycles beyond the minimal number of cycles, that is *5 + 5 = 10*. It is possible to increase this parameter to keep more history or, on the contrary, decrease it to reduce the storage size. For example, it is possible to run a baker and a delegation service on rolling mode as -long as we keep 7 cycles (to provide two more weeks to dispatch -rewards), meaning that at least 5 additional cycles must be kept. +long as we keep 7 cycles (to allow for reward dispatching), meaning +that at least 2 additional cycles must be kept. -When initialzing your node on an empty storage, you may specify the +When initializing your node on an empty storage, you may specify the history mode and number of additional cycles using ``--history-mode :`` when running it. For example, running a -node with ``--history-mode rolling:7`` would allow full RPC queries of -the 7 previous cycles. +node with ``--history-mode rolling:5`` would allow full RPC queries of +the 10 previous cycles. It is also possible to modify the number of additional cycles kept of -- GitLab From 770147740720e045b8f0b65ad264edc8da4b2e4f Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 27 Jan 2022 15:33:22 +0100 Subject: [PATCH 4/8] Shell_service: use right constant in docstring --- src/lib_shell_services/history_mode.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib_shell_services/history_mode.ml b/src/lib_shell_services/history_mode.ml index cced76be5a8c..bff8d4b3aeb7 100644 --- a/src/lib_shell_services/history_mode.ml +++ b/src/lib_shell_services/history_mode.ml @@ -41,10 +41,10 @@ type t = | Full of additional_cycles option | Rolling of additional_cycles option -(* The default_offset value defines a preserved cycle window which is - suitable for baking services. It currently corresponds to 7 as we - preserve 5 cycles below the last allowed fork level of the current - head which, is set 2 cycles in the past. +(* The default_offset value defines a window of stored cycles which is + suitable for baking services. It currently corresponds to 10 as we + store 5 cycles below the last allowed fork level of the current + head, which is set to [preserved_cycles] cycles in the past. TODO: https://gitlab.com/tezos/tezos/-/issues/1406 As this value is potentially both network and protocol specific, it could be lifted as a protocol value or an hardcoded node -- GitLab From d3d0a458eb9ef8b6c5d93aaa10c32efeef3b8e4a Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 27 Jan 2022 15:44:45 +0100 Subject: [PATCH 5/8] lib_env: add clarification in docstring --- src/lib_protocol_environment/environment_cache.mli | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib_protocol_environment/environment_cache.mli b/src/lib_protocol_environment/environment_cache.mli index 0048c13215b6..01383974f11d 100644 --- a/src/lib_protocol_environment/environment_cache.mli +++ b/src/lib_protocol_environment/environment_cache.mli @@ -84,9 +84,10 @@ type 'value t (** - A layout determines the number of sub-caches as well as the limit + A layout determines the number of sub-caches as well as the size limit of those sub-caches. No assumption is made on the unit of each of - those size. All we use is the natural ordering of [int]. + those sub-cache sizes. All we use is the natural ordering of [int]. + In particular, the size units for different sub-caches need not be the same. There are only two constructors for a cache: -- GitLab From 9ec1b60e955bc8f68fa398cafec369c31ebd3578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Delbianco?= Date: Fri, 28 Jan 2022 12:15:40 +0100 Subject: [PATCH 6/8] doc: add links for InfluxDB and Grafana pays a small comms service to OS tools we rely on. --- docs/developer/long-tezts.rst | 7 ++----- docs/developer/testing.rst | 5 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/developer/long-tezts.rst b/docs/developer/long-tezts.rst index 782de3b04107..e02f501be28c 100644 --- a/docs/developer/long-tezts.rst +++ b/docs/developer/long-tezts.rst @@ -14,10 +14,10 @@ Here are the differences with regular Tezt tests: - long tests have easy access to a Performance Regression Test framework wich provides these features: - - Persist measurement samples (in an InfluxDB) such as how long it takes + - Persist measurement samples (in an `InfluxDB `_ database) such as how long it takes to do something. These samples will be used to prevent regressions of performance. - - Provide easy access to a Grafana instance that can be updated to + - Provide easy access to a `Grafana `_ instance that can be updated to create graphs displaying the samples sent to InfluxDB; - Call Slack webhooks to send alerts when a performance regression has been detected. @@ -203,6 +203,3 @@ configuration to set up the framework with your local database: For more information about the configuration file, please refer to the `Long test module API `__. - - - diff --git a/docs/developer/testing.rst b/docs/developer/testing.rst index 6bbe79d561d4..cd2281798b3b 100644 --- a/docs/developer/testing.rst +++ b/docs/developer/testing.rst @@ -261,8 +261,9 @@ Long Tests and Performance regression Test Framework Tezt is also used for tests that are too long to run in the CI. Those tests are run on dedicated machines and can send data points to an -InfluxDB instance to produce graphs using Grafana and/or detect -performance regressions. See :doc:`long-tezts`. +`InfluxDB `__ instance to produce +graphs using `Grafana `__ and/or +detect performance regressions. See :doc:`long-tezts`. .. .. _michelson_unit_tests: -- GitLab From 57457ccb8a4f2feefbc4893a8a8f954ef3f5815e Mon Sep 17 00:00:00 2001 From: Lacramioara Astefanoaei Date: Mon, 31 Jan 2022 16:50:34 +0100 Subject: [PATCH 7/8] Proto/Plugin: modify plugin description --- src/proto_012_Psithaca/lib_plugin/plugin.ml | 13 ++++--------- src/proto_alpha/lib_plugin/plugin.ml | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/proto_012_Psithaca/lib_plugin/plugin.ml b/src/proto_012_Psithaca/lib_plugin/plugin.ml index 9ecd8fb5b247..5f83f0c2f658 100644 --- a/src/proto_012_Psithaca/lib_plugin/plugin.ml +++ b/src/proto_012_Psithaca/lib_plugin/plugin.ml @@ -3508,18 +3508,13 @@ module RPC = struct let validators = RPC_service.get_service ~description: - "Retrieves the delegates allowed to endorse a block.\n\ - By default, it gives the endorsing slots for delegates that have \ - at least one in the next block.\n\ + "Retrieves the level, the endorsement slots and the public key \ + hash of each delegate allowed to endorse a block.\n\ + By default, it provides this information for the next level.\n\ Parameter `level` can be used to specify the (valid) level(s) in \ the past or future at which the endorsement rights have to be \ returned. Parameter `delegate` can be used to restrict the \ - results to the given delegates.\n\ - Returns the list of endorsing slots. Also returns the minimal \ - timestamps that correspond to these slots. The timestamps are \ - omitted for levels in the past, and are only estimates for levels \ - later that the next block, based on the hypothesis that all \ - predecessor blocks were baked at the first round." + results to the given delegates.\n" ~query:validators_query ~output:(list encoding) path diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 466f1039432d..5a4014b91ccf 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -3566,18 +3566,13 @@ module RPC = struct let validators = RPC_service.get_service ~description: - "Retrieves the delegates allowed to endorse a block.\n\ - By default, it gives the endorsing slots for delegates that have \ - at least one in the next block.\n\ + "Retrieves the level, the endorsement slots and the public key \ + hash of each delegate allowed to endorse a block.\n\ + By default, it provides this information for the next level.\n\ Parameter `level` can be used to specify the (valid) level(s) in \ the past or future at which the endorsement rights have to be \ returned. Parameter `delegate` can be used to restrict the \ - results to the given delegates.\n\ - Returns the list of endorsing slots. Also returns the minimal \ - timestamps that correspond to these slots. The timestamps are \ - omitted for levels in the past, and are only estimates for levels \ - later that the next block, based on the hypothesis that all \ - predecessor blocks were baked at the first round." + results to the given delegates.\n" ~query:validators_query ~output:(list encoding) path -- GitLab From 385e0fab2aae9f5ff12566c7eac22626ac1ed62b Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 8 Feb 2022 09:49:25 +0100 Subject: [PATCH 8/8] doc: replace carrot by cannot --- src/proto_alpha/lib_protocol/script_ir_translator.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index af68507530cc..248e3b573e4d 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -5182,7 +5182,7 @@ and parse_toplevel : | (Some _, Some _, None, _) -> error (Missing_field K_code) | ( Some (p, ploc, pannot), Some (s, sloc, sannot), - Some (c, cloc, carrot), + Some (c, cloc, cannot), views ) -> let p_pannot = (* root name can be attached to either the parameter @@ -5208,7 +5208,7 @@ and parse_toplevel : (* only one field annot is allowed to set the root entrypoint name *) p_pannot >>? fun (arg_type, pannot) -> Script_ir_annot.error_unexpected_annot ploc pannot >>? fun () -> - Script_ir_annot.error_unexpected_annot cloc carrot >>? fun () -> + Script_ir_annot.error_unexpected_annot cloc cannot >>? fun () -> Script_ir_annot.error_unexpected_annot sloc sannot >|? fun () -> ({code_field = c; arg_type; views; storage_type = s}, ctxt)) -- GitLab