diff --git a/.gitignore b/.gitignore index 8072c5aa0d0a5e8b18329ec11bf69bd943d3de7a..7d2c4baa3f832ed1342196fe0a044f2af24303c1 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 853cd52d3a7cf329797aca8a10344192e71b91d7..cdc397cddfdd6e1555a6a162b90c641d48e73d1e 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 diff --git a/docs/Makefile b/docs/Makefile index 21d4fbe4557cad413ae14d47cbb8dc590102a665..b00e3b148ce6312dc79d349b853b30b30b5c7e8f 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 diff --git a/docs/developer/long-tezts.rst b/docs/developer/long-tezts.rst index 782de3b04107c1344df91f5766f8d315f1a19c11..e02f501be28c17164e7c9853eaa7d43d30d28b31 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 6bbe79d561d4aaa4c92598bed46e6d98d6dcc694..cd2281798b3ba44313d9918826835cb2b291afa7 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: diff --git a/docs/user/history_modes.rst b/docs/user/history_modes.rst index b76a54d9acb20e9a9cfbcaa2e48fb52842cac951..656777d754d28117a486c5f49436f3394bb3457a 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 diff --git a/src/lib_protocol_environment/environment_cache.mli b/src/lib_protocol_environment/environment_cache.mli index 0048c13215b663146822a8342fa19114f9b07dbf..01383974f11d3c99add969df87559a26cfd24c37 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: diff --git a/src/lib_shell_services/history_mode.ml b/src/lib_shell_services/history_mode.ml index cced76be5a8c559e57fec26b1733699d53198bbe..bff8d4b3aeb74daab638e5f7a6ab6ed8c0a5f393 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 diff --git a/src/proto_012_Psithaca/lib_plugin/plugin.ml b/src/proto_012_Psithaca/lib_plugin/plugin.ml index 9ecd8fb5b24794e7a4a239096208bd579f4cc147..5f83f0c2f6587f32795797dbf84b42ad808b0d26 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 466f1039432dc7fb990ff79246182922375d88db..5a4014b91ccf0084147f7999ad6214a574b27591 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 diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index af68507530ccc937c0af2c3e8b0754f5408ffd9c..248e3b573e4d55292d2495a69839c26906458ff6 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))