From 7c4eced50edabdbfdfc8d1d03d37220dc9d01f9f Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 2 Sep 2022 11:03:36 +0200 Subject: [PATCH 01/11] doc: fix redirected link detected by linkcheck --- docs/user/snapshots.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/user/snapshots.rst b/docs/user/snapshots.rst index f268ae453a04..41c933aa7591 100644 --- a/docs/user/snapshots.rst +++ b/docs/user/snapshots.rst @@ -195,6 +195,5 @@ of their nodes on a regular basis (usually daily) and make them available for download. These include: * `Giga Node `_ -* `XTZ-Shots `_ +* `XTZ-Shots `_ * `Lambs on acid `_ - -- GitLab From 5660b620b2b6fbcae124f157f5dafda38d801b84 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Fri, 2 Sep 2022 11:54:19 +0200 Subject: [PATCH 02/11] doc: add tezos-proxy-server to the list of binaries in howtouse.rst --- docs/introduction/howtouse.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/introduction/howtouse.rst b/docs/introduction/howtouse.rst index 7a9eac9e2738..57b6f42c51d8 100644 --- a/docs/introduction/howtouse.rst +++ b/docs/introduction/howtouse.rst @@ -23,6 +23,7 @@ After a successful compilation, you should have the following binaries: - ``tezos-validator``: a daemon for validating and applying operations in blocks (see `Validator`_) - ``tezos-signer``: a client to remotely sign operations or blocks (see :ref:`signer`); +- ``tezos-proxy-server``: a readonly frontend to ``tezos-node`` designed to lower the load of full nodes (see :doc:`../user/proxy-server`) - ``tezos-codec``: a utility for documenting the data encodings and for performing data encoding/decoding (see `Codec`_) - ``tezos-protocol-compiler``: a domain-specific compiler for Tezos protocols (see `Protocol compiler`_) - ``tezos-snoop``: a tool for modeling the performance of any piece of OCaml code, based on benchmarking (see :doc:`../developer/snoop`) -- GitLab From 16ef46f15fcdd42787cf5662934caa94d9884cb1 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 6 Sep 2022 11:24:42 +0200 Subject: [PATCH 03/11] doc: fix broken link to hacl* --- docs/developer/snoop_example.rst | 2 +- docs/shell/the_big_picture.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/developer/snoop_example.rst b/docs/developer/snoop_example.rst index 07603517a1aa..deafc8da0b94 100644 --- a/docs/developer/snoop_example.rst +++ b/docs/developer/snoop_example.rst @@ -11,7 +11,7 @@ is used among other things to hash blocks, operations and contexts: At the time of writing, this function is a thin wrapper which concatenates the list of bytes and passes it to the ``blake2b`` -implementation provided by `HACL* `_. +implementation provided by `HACL* `_. Step 1: Defining the benchmark ------------------------------ diff --git a/docs/shell/the_big_picture.rst b/docs/shell/the_big_picture.rst index 308efb492951..20c18ee3d6cb 100644 --- a/docs/shell/the_big_picture.rst +++ b/docs/shell/the_big_picture.rst @@ -120,7 +120,7 @@ that are used everywhere for basic operations. libraries that we use. We try to use minimal reference implementations, with as thin as possible bindings, and rely on libraries from the - `HACL* project `_, + `HACL* project `_, written and verified in the F* programming language, and extracted to C. - :package:`tezos-micheline` is the concrete syntax used by @@ -180,7 +180,7 @@ protocol in an alternative environment possible. - :package:`tezos-protocol-environment` contains the protocol generic environment, that is the API of the modules that are available to - the economic protocol and the exported protocol API. A review of this + the economic protocol and the exported protocol API. A review of this sandbox is available :doc:`here <../shell/protocol_environment>`. These modules include a stripped-down standard library, and interfaces to the crypto APIs, RPC definitions, and a key-value store. -- GitLab From be795edde0959e99a1479a20fda70717be3c6375 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Thu, 8 Sep 2022 16:20:18 +0200 Subject: [PATCH 04/11] doc: improve doc of option for liquidity baking --- src/proto_013_PtJakart/lib_delegate/baking_commands.ml | 6 ++++-- src/proto_014_PtKathma/lib_delegate/baking_commands.ml | 6 ++++-- src/proto_alpha/lib_delegate/baking_commands.ml | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/proto_013_PtJakart/lib_delegate/baking_commands.ml b/src/proto_013_PtJakart/lib_delegate/baking_commands.ml index 9f7955a7e359..89de07ff7c79 100644 --- a/src/proto_013_PtJakart/lib_delegate/baking_commands.ml +++ b/src/proto_013_PtJakart/lib_delegate/baking_commands.ml @@ -157,8 +157,10 @@ let liquidity_baking_toggle_vote_parameter = let liquidity_baking_toggle_vote_arg = Clic.arg ~doc: - "Vote to continue (option \"on\") or end (option \"off\") the liquidity \ - baking subsidy. Or choose to pass (option \"pass\")." + "Vote to continue or end the liquidity baking subsidy. The possible \ + values for this option are: \"off\" to request ending the subsidy, \ + \"on\" to request continuing or restarting the subsidy, and \"pass\" to \ + abstain. Note that this \"option\" is mandatory!" ~long:"liquidity-baking-toggle-vote" ~placeholder:"vote" liquidity_baking_toggle_vote_parameter diff --git a/src/proto_014_PtKathma/lib_delegate/baking_commands.ml b/src/proto_014_PtKathma/lib_delegate/baking_commands.ml index d3c7114872d0..2b9258d233bb 100644 --- a/src/proto_014_PtKathma/lib_delegate/baking_commands.ml +++ b/src/proto_014_PtKathma/lib_delegate/baking_commands.ml @@ -157,8 +157,10 @@ let liquidity_baking_toggle_vote_parameter = let liquidity_baking_toggle_vote_arg = Clic.arg ~doc: - "Vote to continue (option \"on\") or end (option \"off\") the liquidity \ - baking subsidy. Or choose to pass (option \"pass\")." + "Vote to continue or end the liquidity baking subsidy. The possible \ + values for this option are: \"off\" to request ending the subsidy, \ + \"on\" to request continuing or restarting the subsidy, and \"pass\" to \ + abstain. Note that this \"option\" is mandatory!" ~long:"liquidity-baking-toggle-vote" ~placeholder:"vote" liquidity_baking_toggle_vote_parameter diff --git a/src/proto_alpha/lib_delegate/baking_commands.ml b/src/proto_alpha/lib_delegate/baking_commands.ml index 53ac17757e4a..1874b8f170de 100644 --- a/src/proto_alpha/lib_delegate/baking_commands.ml +++ b/src/proto_alpha/lib_delegate/baking_commands.ml @@ -157,8 +157,10 @@ let liquidity_baking_toggle_vote_parameter = let liquidity_baking_toggle_vote_arg = Clic.arg ~doc: - "Vote to continue (option \"on\") or end (option \"off\") the liquidity \ - baking subsidy. Or choose to pass (option \"pass\")." + "Vote to continue or end the liquidity baking subsidy. The possible \ + values for this option are: \"off\" to request ending the subsidy, \ + \"on\" to request continuing or restarting the subsidy, and \"pass\" to \ + abstain. Note that this \"option\" is mandatory!" ~long:"liquidity-baking-toggle-vote" ~placeholder:"vote" liquidity_baking_toggle_vote_parameter -- GitLab From 4d696919817989b987b8d534b36c777540af85b7 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Mon, 12 Sep 2022 16:07:38 +0200 Subject: [PATCH 05/11] doc: compile sources in current branch when in an MR pipeline --- .gitlab/ci/doc/test-scripts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/doc/test-scripts.yml b/.gitlab/ci/doc/test-scripts.yml index 4e78609c8180..e41047466213 100644 --- a/.gitlab/ci/doc/test-scripts.yml +++ b/.gitlab/ci/doc/test-scripts.yml @@ -98,7 +98,7 @@ compile_master_sources_buster: image: ocaml/opam:debian-10 extends: .compile_sources_template script: - - ./docs/introduction/compile-sources.sh master + - ./docs/introduction/compile-sources.sh ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} .install_python_debian_ubuntu_template: extends: -- GitLab From c884a4fc3d1bb62ce6be929a3b09dd976c3563f5 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Tue, 13 Sep 2022 13:43:36 +0200 Subject: [PATCH 06/11] doc: test python installation in current branch when in an MR pipeline --- .gitlab/ci/doc/test-scripts.yml | 2 +- .../developer/install-python-debian-ubuntu.sh | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/doc/test-scripts.yml b/.gitlab/ci/doc/test-scripts.yml index e41047466213..9f2f2ee28737 100644 --- a/.gitlab/ci/doc/test-scripts.yml +++ b/.gitlab/ci/doc/test-scripts.yml @@ -106,7 +106,7 @@ compile_master_sources_buster: - .base-test-doc-scripts-template - .rules_template__development_documentation script: - - ./docs/developer/install-python-debian-ubuntu.sh + - ./docs/developer/install-python-debian-ubuntu.sh ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} install_python_bionic: image: public.ecr.aws/lts/ubuntu:18.04_stable diff --git a/docs/developer/install-python-debian-ubuntu.sh b/docs/developer/install-python-debian-ubuntu.sh index 44dd98dccbf1..0a85b8e9651e 100755 --- a/docs/developer/install-python-debian-ubuntu.sh +++ b/docs/developer/install-python-debian-ubuntu.sh @@ -1,5 +1,23 @@ #!/bin/bash +usage () { + cat >&2 <] +!EOF +} + +if [ $# -eq 1 ]; +then + BRANCH=$1 +elif [ $# -eq 0 ] +then + BRANCH="latest-release" +else + usage + exit 1 +fi + set -e set -x @@ -84,7 +102,7 @@ poetry --version # should output 1.1.13 ## ## Test installing Octez python development dependencies ## -git clone https://gitlab.com/tezos/tezos.git --depth 1 +git clone https://gitlab.com/tezos/tezos.git --depth 1 --branch "$BRANCH" # [install octez python dev-dependencies] cd tezos -- GitLab From a1e191a26e3be14a550014d6a881f7576e208c77 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Fri, 16 Sep 2022 14:23:58 +0200 Subject: [PATCH 07/11] Tezt/RPC: Make endpoint docstrings consistent --- tezt/lib_tezos/RPC.mli | 114 ++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 732e64657902..e0a17248e6ab 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -45,17 +45,17 @@ include module type of RPC_legacy - Then the name contains all constant parts of the endpoint path, separated by underscores. - E.g. [chain_levels_caboose] for [GET /chains/[chain]/levels/caboose]. - The dynamic part [[chain]] is dropped (it becomes an argument of the function). + E.g. [chain_levels_caboose] for [GET /chains//levels/caboose]. + The dynamic part [] is dropped (it becomes an argument of the function). - When a word is plural, it becomes singular if the RPC selects one element. For instance, [GET /network/connections] becomes [get_network_connections] because it returns all elements of the list, but [GET /network/connections/] becomes [get_network_connection] because it returns only one connection. This allows to differentiate the two RPCs. - Another example is [GET /chains/[chain]/blocks/[block]/metadata] which becomes + Another example is [GET /chains//blocks//metadata] which becomes [get_chain_block_metadata] since it selects one block. - Another example is [GET /chains/[chain]/levels/checkpoint] which becomes + Another example is [GET /chains//levels/checkpoint] which becomes [get_chain_level_checkpoint], which illustrates that the selector (here [checkpoint]) does not need to be dynamic for this rule to apply. @@ -237,12 +237,12 @@ val post_private_injection_operation : ?async:bool -> JSON.u -> JSON.t t val post_chain_block_helpers_scripts_run_operation : ?chain:string -> ?block:string -> ?async:bool -> JSON.u -> JSON.t t -(** RPC: [GET /chains/[chain]/chain_id] +(** RPC: [GET /chains//chain_id] Returns the chain ID. *) val get_chain_chain_id : ?chain:string -> unit -> string t -(** RPC: [GET /chains/[chain]/blocks/[block]] +(** RPC: [GET /chains//blocks/] [chain] defaults to ["main"]. [block] defaults to ["head"]. *) @@ -257,14 +257,14 @@ type block_metadata = { (** This field is [None] if and only if the [DAL] feature flag is disabled. *) } -(** RPC: [GET /chains/[chain]/blocks/[block]/metadata] +(** RPC: [GET /chains//blocks//metadata] [chain] defaults to ["main"]. [block] defaults to ["head"]. *) val get_chain_block_metadata : ?chain:string -> ?block:string -> unit -> block_metadata t -(** RPC: [GET /chains/[chain]/blocks/[block]/hash] +(** RPC: [GET /chains//blocks//hash] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -272,13 +272,13 @@ val get_chain_block_metadata : Returns the hash. *) val get_chain_block_hash : ?chain:string -> ?block:string -> unit -> string t -(** RPC: [GET /chains/[chain]/blocks/[block]/header] +(** RPC: [GET /chains//blocks//header] [chain] defaults to ["main"]. [block] defaults to ["head"]. *) val get_chain_block_header : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC: [PATCH /chains/[chain]] to set ["bootstrapped"] +(** RPC: [PATCH /chains/] to set ["bootstrapped"] Example: to force the chain to be considered bootstrapped, use [patch_chain_bootstrapped true]. *) @@ -288,7 +288,7 @@ type sync_state = Synced | Unsynced | Stuck type is_bootstrapped = {bootstrapped : bool; sync_state : sync_state} -(** RPC: [GET /chains/[chain]/is_bootstrapped] +(** RPC: [GET /chains//is_bootstrapped] Returns the value of [sync_state], e.g. ["synced"]. *) val get_chain_is_bootstrapped : ?chain:string -> unit -> is_bootstrapped t @@ -296,17 +296,17 @@ val get_chain_is_bootstrapped : ?chain:string -> unit -> is_bootstrapped t (** A level and its hash *) type block_descriptor = {block_hash : string; level : int} -(** RPC: [GET /chains/[chain]/levels/checkpoint] +(** RPC: [GET /chains//levels/checkpoint] [chain] defaults to ["main"]. *) val get_chain_level_checkpoint : ?chain:string -> unit -> block_descriptor t -(** RPC: [GET /chains/[chain]/levels/savepoint] +(** RPC: [GET /chains//levels/savepoint] [chain] defaults to ["main"]. *) val get_chain_level_savepoint : ?chain:string -> unit -> block_descriptor t -(** RPC: [GET /chains/[chain]/levels/caboose] +(** RPC: [GET /chains//levels/caboose] [chain] defaults to ["main"]. *) val get_chain_level_caboose : ?chain:string -> unit -> block_descriptor t @@ -336,7 +336,7 @@ val get_worker_chain_validator_peers_validators : (** RPC: [GET /workers/prevalidators] *) val get_workers_prevalidators : JSON.t t -(** RPC: [GET /workers/prevalidators/[chain]] +(** RPC: [GET /workers/prevalidators/] [chain] defaults to ["main"]. *) val get_worker_prevalidator : ?chain:string -> unit -> JSON.t t @@ -370,7 +370,7 @@ val post_injection_block : data:JSON.u -> JSON.t t val get_chain_block_header_protocol_data_raw : ?chain:string -> ?block:string -> unit -> string t -(** RPC: [GET /chains/[chain]/blocks/[block]/header/protocol_data] +(** RPC: [GET /chains//blocks//header/protocol_data] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -380,7 +380,7 @@ val get_chain_block_header_protocol_data_raw : val get_chain_block_header_protocol_data : ?chain:string -> ?block:string -> ?offset:int -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/operations] +(** RPC: [GET /chains//blocks//operations] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -388,11 +388,11 @@ val get_chain_block_header_protocol_data : val get_chain_block_operations : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/operations/[validation_pass]] if +(** RPC: [GET /chains//blocks//operations/] if [operation_offset] is unset Otherwise, - RPC: [GET /chains/[chain]/blocks/[block]/operations/[validation_pass]/[operation_offset]] + RPC: [GET /chains//blocks//operations//] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -407,7 +407,7 @@ val get_chain_block_operations_validation_pass : unit -> JSON.t t -(** RPC: [GET /chains/[chain]/mempool/pending_operations] +(** RPC: [GET /chains//mempool/pending_operations] [chain] defaults to ["main"]. *) @@ -422,47 +422,47 @@ val get_chain_mempool_pending_operations : unit -> JSON.t t -(** RPC: [POST /chains/[chain]/mempool/request_operations] +(** RPC: [POST /chains//mempool/request_operations] [chain] defaults to ["main"]. *) val post_chain_mempool_request_operations : ?chain:string -> ?peer:string -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/mempool/ban_operation] +(** RPC: [POST /chains//mempool/ban_operation] [chain] defaults to ["main"]. *) val post_chain_mempool_ban_operation : ?chain:string -> data:JSON.u -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/mempool/unban_operation] +(** RPC: [POST /chains//mempool/unban_operation] [chain] defaults to ["main"]. *) val post_chain_mempool_unban_operation : ?chain:string -> data:JSON.u -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/mempool/unban_all_operations] +(** RPC: [POST /chains//mempool/unban_all_operations] [chain] defaults to ["main"]. *) val post_chain_mempool_unban_all_operations : ?chain:string -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/mempool/filter] +(** RPC: [GET /chains//mempool/filter] [chain] defaults to ["main"]. *) val get_chain_mempool_filter : ?chain:string -> ?include_default:bool -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/mempool/filter] +(** RPC: [POST /chains//mempool/filter] [chain] defaults to ["main"]. *) val post_chain_mempool_filter : ?chain:string -> data:JSON.u -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/blocks/[block]/helpers/preapply/block] +(** RPC: [POST /chains//blocks//helpers/preapply/block] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -470,7 +470,7 @@ val post_chain_mempool_filter : ?chain:string -> data:JSON.u -> unit -> JSON.t t val post_chain_block_helpers_preapply_block : ?chain:string -> ?block:string -> data:Ezjsonm.value -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/blocks/[block]/helpers/forge/operations] +(** RPC: [POST /chains//blocks//helpers/forge/operations] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -478,7 +478,7 @@ val post_chain_block_helpers_preapply_block : val post_chain_block_helpers_forge_operations : ?chain:string -> ?block:string -> data:Ezjsonm.value -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/blocks/[block]/helpers/scripts/simulate_operation] +(** RPC: [POST /chains//blocks//helpers/scripts/simulate_operation] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -486,7 +486,7 @@ val post_chain_block_helpers_forge_operations : val post_chain_block_helpers_scripts_simulate_operation : ?chain:string -> ?block:string -> data:Ezjsonm.value -> unit -> JSON.t t -(** RPC: [POST /chains/[chain]/blocks/[block]/helpers/scripts/event_address] +(** RPC: [POST /chains//blocks//helpers/scripts/event_address] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -496,7 +496,7 @@ val post_chain_block_helpers_scripts_event_address : type ctxt_type = Bytes | Json -(** RPC: [GET /chains/[chain]/blocks/[block]/context/raw/[ctxt_type]/[value_path] +(** RPC: [GET /chains//blocks//context/raw// [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -510,7 +510,7 @@ val get_chain_block_context_raw : unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/context/constants] +(** RPC: [GET /chains//blocks//context/constants] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -518,7 +518,7 @@ val get_chain_block_context_raw : val get_chain_block_context_constants : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/context/constants/errors] +(** RPC: [GET /chains//blocks//context/constants/errors] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -526,7 +526,7 @@ val get_chain_block_context_constants : val get_chain_block_context_constants_errors : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/helpers/baking_rights] +(** RPC: [GET /chains//blocks//helpers/baking_rights] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -542,7 +542,7 @@ type level = { expected_commitment : bool; } -(** RPC: [GET /chains/[chain]/blocks/[block]/helpers/current_level] +(** RPC: [GET /chains//blocks//helpers/current_level] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -551,7 +551,7 @@ type level = { val get_chain_block_helper_current_level : ?chain:string -> ?block:string -> ?offset:int -> unit -> level t -(** RPC: [GET /chains/[chain]/blocks/[block]/helpers/endorsing_rights] +(** RPC: [GET /chains//blocks//helpers/endorsing_rights] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -559,7 +559,7 @@ val get_chain_block_helper_current_level : val get_chain_block_helper_endorsing_rights : ?chain:string -> ?block:string -> ?delegate:string -> unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/helpers/levels_in_current_cycle] +(** RPC: [GET /chains//blocks//helpers/levels_in_current_cycle] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -569,7 +569,7 @@ val get_chain_block_helper_levels_in_current_cycle : (** {2 Big maps RPC module} *) -(** RPC: [GET /chains/[chain]/blocks/[block]/context/big_maps/[id]/[key_hash] +(** RPC: [GET /chains//blocks//context/big_maps//] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -582,7 +582,7 @@ val get_chain_block_context_big_map : unit -> JSON.t t -(** RPC: [GET /chains/[chain]/blocks/[block]/context/big_maps/[id]?offset=[offset]&length=[length] +(** RPC: [GET /chains//blocks//context/big_maps/?offset=&length=] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -598,7 +598,7 @@ val get_chain_block_context_big_maps : (** {2 Contracts RPC module} *) -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts] +(** RPC [GET /chains//blocks//context/contracts] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -606,7 +606,7 @@ val get_chain_block_context_big_maps : val get_chain_block_context_contracts : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]] +(** RPC [GET /chains//blocks//context/contracts/] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -614,7 +614,7 @@ val get_chain_block_context_contracts : val get_chain_block_context_contract : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/balance] +(** RPC [GET /chains//blocks//context/contracts//balance] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -622,7 +622,7 @@ val get_chain_block_context_contract : val get_chain_block_context_contract_balance : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/frozen_bonds] +(** RPC [GET /chains//blocks//context/contracts//frozen_bonds] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -630,7 +630,7 @@ val get_chain_block_context_contract_balance : val get_chain_block_context_contract_frozen_bonds : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/balance_and_frozen_bonds] +(** RPC [GET /chains//blocks//context/contracts//balance_and_frozen_bonds] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -638,7 +638,7 @@ val get_chain_block_context_contract_frozen_bonds : val get_chain_block_context_contract_balance_and_frozen_bonds : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [POST /chains/[chain]/blocks/[block]/context/contracts/[id]/big_map_get] +(** RPC [POST /chains//blocks//context/contracts//big_map_get] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -651,7 +651,7 @@ val post_chain_block_context_contract_big_map_get : unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/counter] +(** RPC [GET /chains//blocks//context/contracts//counter] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -659,7 +659,7 @@ val post_chain_block_context_contract_big_map_get : val get_chain_block_context_contract_counter : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/delegate] +(** RPC [GET /chains//blocks//context/contracts//delegate] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -667,7 +667,7 @@ val get_chain_block_context_contract_counter : val get_chain_block_context_contract_delegate : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/entrypoints] +(** RPC [GET /chains//blocks//context/contracts//entrypoints] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -675,7 +675,7 @@ val get_chain_block_context_contract_delegate : val get_chain_block_context_contract_entrypoints : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/manager_key] +(** RPC [GET /chains//blocks//context/contracts//manager_key] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -683,7 +683,7 @@ val get_chain_block_context_contract_entrypoints : val get_chain_block_context_contract_manager_key : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/script] +(** RPC [GET /chains//blocks//context/contracts//script] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -691,7 +691,7 @@ val get_chain_block_context_contract_manager_key : val get_chain_block_context_contract_script : ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t -(** RPC [GET /chains/[chain]/blocks/[block]/context/contracts/[id]/storage] +(** RPC [GET /chains//blocks//context/contracts//storage] [chain] defaults to ["main"]. [block] defaults to ["head"]. @@ -701,27 +701,27 @@ val get_chain_block_context_contract_storage : (** {2 Smart contract rollup RPC module} *) -(** RPC: [GET chains/[chain]/blocks/[block]/context/sc_rollup] *) +(** RPC: [GET chains//blocks//context/sc_rollup] *) val get_chain_block_context_sc_rollup : ?chain:string -> ?block:string -> unit -> JSON.t t -(** RPC: [GET chains/[chain]/blocks/[block]/context/sc_rollup//inbox] *) +(** RPC: [GET chains//blocks//context/sc_rollup//inbox] *) val get_chain_block_context_sc_rollup_inbox : ?chain:string -> ?block:string -> string -> JSON.t t -(** RPC: [GET chains/[chain]/blocks/[block]/context/sc_rollup//genesis_info] *) +(** RPC: [GET chains//blocks//context/sc_rollup//genesis_info] *) val get_chain_block_context_sc_rollup_genesis_info : ?chain:string -> ?block:string -> string -> JSON.t t -(** RPC: [GET chains/[chain]/blocks/[block]/context/sc_rollup//boot_sector] *) +(** RPC: [GET chains//blocks//context/sc_rollup//boot_sector] *) val get_chain_block_context_sc_rollup_boot_sector : ?chain:string -> ?block:string -> string -> JSON.t t -(** RPC: [GET chains/[chain]/blocks/[block]/context/sc_rollup//get_last_cemented_commitment_hash_with_level] *) +(** RPC: [GET chains//blocks//context/sc_rollup//get_last_cemented_commitment_hash_with_level] *) val get_chain_block_context_sc_rollup_last_cemented_commitment_hash_with_level : ?chain:string -> ?block:string -> string -> JSON.t t -(** Call RPC /chains/[chain]/blocks/[block]/context/sc_rollup/[rollup_hash]/staker/[staker]/staked_on_commitment *) +(** Call RPC /chains//blocks//context/sc_rollup//staker//staked_on_commitment *) val get_chain_block_context_sc_rollup_staker_staked_on_commitment : ?chain:string -> ?block:string -> sc_rollup:string -> string -> JSON.t t -- GitLab From e1f8e36ac14114603aeb09cc5f3c5c99727f751a Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Mon, 19 Sep 2022 10:11:34 +0200 Subject: [PATCH 08/11] doc: fix indentation of yaml for Prometheus --- docs/user/node-monitoring.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/node-monitoring.rst b/docs/user/node-monitoring.rst index 2dee27493f47..998d10db789e 100644 --- a/docs/user/node-monitoring.rst +++ b/docs/user/node-monitoring.rst @@ -134,10 +134,10 @@ Once installed, you need to add the scraping job to the configuration file. :: - job_name: 'tezos-exporter' - scrape_interval: interval s - metrics_path: "/metrics" - static_configs: - - targets: ['addr:port'] + scrape_interval: interval s + metrics_path: "/metrics" + static_configs: + - targets: ['addr:port'] Prometheus is a service, so you need to start it. Note that Prometheus can also scrape metrics from several nodes! -- GitLab From ac639af081e93637ee9aa7cb5f8cdfbdf7968455 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 19 Sep 2022 12:33:14 +0200 Subject: [PATCH 09/11] docs: fix grafana link --- docs/user/node-monitoring.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/node-monitoring.rst b/docs/user/node-monitoring.rst index 998d10db789e..b1a66a0fd84a 100644 --- a/docs/user/node-monitoring.rst +++ b/docs/user/node-monitoring.rst @@ -226,7 +226,7 @@ Dashboards will take your node monitoring to the next level, allowing you to vis Grafana ~~~~~~~ -Dashboards can be created and visualized with `Grafana `_. Grafana can be installed by following `these instructions `_. +Dashboards can be created and visualized with `Grafana `_. Grafana can be installed by following `these instructions `__. Once installed and running, you should be able to reach the interface on port ``3000`` (you can change the port on the Grafana config file). -- GitLab From 0c6b988ee8b3bae5d2f1a3bbde5a9a024fbd12a3 Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 20 Sep 2022 11:29:20 +0200 Subject: [PATCH 10/11] doc: add link from developer/openmetrics back to user/node_monitoring --- docs/developer/openmetrics.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/developer/openmetrics.rst b/docs/developer/openmetrics.rst index 5b7278eb6fff..ee69ad4859d3 100644 --- a/docs/developer/openmetrics.rst +++ b/docs/developer/openmetrics.rst @@ -25,6 +25,9 @@ For more information check the openmetrics specification: https://openmetrics.io Usage ----- +In the following, we indicate a typical monitoring setup for core developers. +For more details on setting up the node for monitoring see :doc:`../user/node-monitoring`. + To instruct the Octez node to produce metrics, the user needs to pass the option ``--metrics-addr=:``. The port specified on the command line is the port where the integrated open metrics server will be available (9932 by default). -- GitLab From 75e0b065e2f72c090659d9b8c4b6d0d60ac93bec Mon Sep 17 00:00:00 2001 From: Nic Volanschi Date: Tue, 20 Sep 2022 16:25:48 +0200 Subject: [PATCH 11/11] doc: eliminate last reference to Flextesa (#2360) --- docs/user/node-configuration.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/user/node-configuration.rst b/docs/user/node-configuration.rst index cf248b8a6446..da2208f1da19 100644 --- a/docs/user/node-configuration.rst +++ b/docs/user/node-configuration.rst @@ -269,7 +269,9 @@ take two main forms: Thus all costly or risky endpoints are blocked by default. This can be relaxed or tightened by modifying the configuration file. It's worth noting that this default policy among other things disallows baking and -endorsing by bakers running on remote servers. +endorsing by bakers running on remote servers, +because endpoints such as ``/injection/block`` are not open remotely. +Rather than opening them remotely, the recommended practice for baking is to run a node locally listening to ``localhost``, with the default ACL policy. The following is the default ACL policy for the node, hard-coded in :src:`src/lib_rpc_http/RPC_server.ml` (remember to replace @@ -279,9 +281,6 @@ actually listening on): .. literalinclude:: default-acl.json :language: json -The endpoints specifically required for baking can be found in -`tezos_node.ml of Flextesa `_. - .. _configure_p2p: P2P parameters -- GitLab