diff --git a/documentation/docs/components/outputs/api-scraping-outputs/time-now.md b/documentation/docs/components/outputs/api-scraping-outputs/time-now.md index 737fbb6511..11a1aabc8b 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/time-now.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/time-now.md @@ -1 +1 @@ -Wednesday, October 23rd 2024, 17:12:09 UTC +Wednesday, October 23rd 2024, 18:11:48 UTC diff --git a/documentation/docs/components/outputs/command-outputs/node-api-check-help.md b/documentation/docs/components/outputs/command-outputs/node-api-check-help.md new file mode 100644 index 0000000000..875b2921ae --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/node-api-check-help.md @@ -0,0 +1,17 @@ +```python +usage: Nym-node API check [-h] [-V] + {query_stats,q,query,version_count,v,version} ... + +Run through all endpoints and print results. + +positional arguments: + {query_stats,q,query,version_count,v,version} + query_stats (q, query) + Get all nodes API endpoints + version_count (v, version) + Sum of nodes in given version(s) + +options: + -h, --help show this help message and exit + -V, --version show program's version number and exit +``` diff --git a/documentation/docs/components/outputs/command-outputs/node-api-check-query-help.md b/documentation/docs/components/outputs/command-outputs/node-api-check-query-help.md new file mode 100644 index 0000000000..17c74e6008 --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/node-api-check-query-help.md @@ -0,0 +1,15 @@ +```python +usage: Nym-node API check query_stats [-h] [-n] [-m] [-o [OUTPUT]] id + +positional arguments: + id supply nym-node identity key + +options: + -h, --help show this help message and exit + -n, --no_routing_history + Display node stats without routing history + -m, --markdown Display results in markdown format + -o [OUTPUT], --output [OUTPUT] + Save results to file (in current dir or supply with + path without filename) +``` diff --git a/documentation/docs/components/outputs/command-outputs/nym-api-help.md b/documentation/docs/components/outputs/command-outputs/nym-api-help.md new file mode 100644 index 0000000000..fcaf94ce6b --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nym-api-help.md @@ -0,0 +1,19 @@ +```sh +Usage: nym-api [OPTIONS] + +Commands: + init Initialise a Nym Api instance with persistent config.toml file + run Run the Nym Api with provided configuration optionally overriding set parameters + build-info Show build information of this binary + help Print this message or the help of the given subcommand(s) + +Options: + -c, --config-env-file + Path pointing to an env file that configures the Nym API + --no-banner + A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) + -h, --help + Print help + -V, --version + Print version +``` diff --git a/documentation/docs/components/outputs/command-outputs/nym-node--help.md b/documentation/docs/components/outputs/command-outputs/nym-node--help.md deleted file mode 100644 index 2f50fd0537..0000000000 --- a/documentation/docs/components/outputs/command-outputs/nym-node--help.md +++ /dev/null @@ -1,2 +0,0 @@ -```sh -``` diff --git a/documentation/docs/components/outputs/command-outputs/nym-node-help.md b/documentation/docs/components/outputs/command-outputs/nym-node-help.md new file mode 100644 index 0000000000..62836e167d --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nym-node-help.md @@ -0,0 +1,22 @@ +```sh +Usage: nym-node [OPTIONS] + +Commands: + build-info Show build information of this binary + bonding-information Show bonding information of this node depending on its currently selected mode + node-details Show details of this node + migrate Attempt to migrate an existing mixnode or gateway into a nym-node + run Start this nym-node + sign Use identity key of this node to sign provided message + help Print this message or the help of the given subcommand(s) + +Options: + -c, --config-env-file + Path pointing to an env file that configures the nym-node and overrides any preconfigured values [env: NYMNODE_CONFIG_ENV_FILE_ARG=] + --no-banner + Flag used for disabling the printed banner in tty [env: NYMNODE_NO_BANNER=] + -h, --help + Print help + -V, --version + Print version +``` diff --git a/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md b/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md new file mode 100644 index 0000000000..0a5070b615 --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md @@ -0,0 +1,79 @@ +```sh +Start this nym-node + +Usage: nym-node run [OPTIONS] + +Options: + --id + Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node] + --config-file + Path to a configuration file of this node [env: NYMNODE_CONFIG=] + --accept-operator-terms-and-conditions + Explicitly specify whether you agree with the terms and conditions of a nym node operator as defined at [env: NYMNODE_ACCEPT_OPERATOR_TERMS=] + --deny-init + Forbid a new node from being initialised if configuration file for the provided specification doesn't already exist [env: NYMNODE_DENY_INIT=] + --init-only + If this is a brand new nym-node, specify whether it should only be initialised without actually running the subprocesses [env: NYMNODE_INIT_ONLY=] + --local + Flag specifying this node will be running in a local setting [env: NYMNODE_LOCAL=] + --mode + Specifies the current mode of this nym-node [env: NYMNODE_MODE=] [possible values: mixnode, entry-gateway, exit-gateway] + -w, --write-changes + If this node has been initialised before, specify whether to write any new changes to the config file [env: NYMNODE_WRITE_CONFIG_CHANGES=] + --bonding-information-output + Specify output file for bonding information of this nym-node, i.e. its encoded keys. NOTE: the required bonding information is still a subject to change and this argument should be treated only as a preview of future features [env: NYMNODE_BONDING_INFORMATION_OUTPUT=] + -o, --output + Specify the output format of the bonding information (`text` or `json`) [env: NYMNODE_OUTPUT=] [default: text] [possible values: text, json] + --public-ips + Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=] + --hostname + Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=] + --location + Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=] + --http-bind-address + Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=] + --landing-page-assets-path + Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=] + --http-access-token + An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=] + --expose-system-info + Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false] + --expose-system-hardware + Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false] + --expose-crypto-hardware + Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false] + --mixnet-bind-address + Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=] + --nym-api-urls + Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=] + --nyxd-urls + Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=] + --wireguard-enabled + Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false] + --wireguard-bind-address + Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=] + --wireguard-private-ip + Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=] + --wireguard-announced-port + Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=] + --wireguard-private-network-prefix + The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=] + --verloc-bind-address + Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=] + --entry-bind-address + Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=] + --announce-ws-port + Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=] + --announce-wss-port + If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=] + --enforce-zk-nyms + Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false] + --mnemonic + Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=] + --upstream-exit-policy-url + Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=] + --open-proxy + Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false] + -h, --help + Print help +``` diff --git a/documentation/docs/components/outputs/command-outputs/nymv-api-help.md b/documentation/docs/components/outputs/command-outputs/nymv-api-help.md new file mode 100644 index 0000000000..940536d5d0 --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nymv-api-help.md @@ -0,0 +1,34 @@ +Usage: nym-api [OPTIONS] + +Commands: + init Initialise a Nym Api instance with persistent config.toml file + run Run the Nym Api with provided configuration optionally overriding set parameters + build-info Show build information of this binary + help Print this message or the help of the given subcommand(s) + +Options: + -c, --config-env-file + Path pointing to an env file that configures the Nym API + --no-banner + A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) + -h, --help + Print help + -V, --version + Print version +Usage: nym-api [OPTIONS] + +Commands: + init Initialise a Nym Api instance with persistent config.toml file + run Run the Nym Api with provided configuration optionally overriding set parameters + build-info Show build information of this binary + help Print this message or the help of the given subcommand(s) + +Options: + -c, --config-env-file + Path pointing to an env file that configures the Nym API + --no-banner + A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) + -h, --help + Print help + -V, --version + Print version diff --git a/documentation/docs/components/outputs/command-outputs/nymvisor-help.md b/documentation/docs/components/outputs/command-outputs/nymvisor-help.md new file mode 100644 index 0000000000..e4124a3ea9 --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nymvisor-help.md @@ -0,0 +1,20 @@ +```sh +Usage: nymvisor [OPTIONS] + +Commands: + init Initialise a nymvisor instance with persistent Config.toml file + run Run the associated daemon with the preconfigured settings + build-info Show build information of this binary + daemon-build-info Show build information of the associated daemon + add-upgrade Queues up another upgrade for the associated daemon + config Show configuration options being used by this instance of nymvisor + help Print this message or the help of the given subcommand(s) + +Options: + -c, --config-env-file + Path pointing to an env file that configures the nymvisor and overrides any preconfigured values + -h, --help + Print help + -V, --version + Print version +``` diff --git a/documentation/docs/components/outputs/command-outputs/nymvisor-init-daemon.md b/documentation/docs/components/outputs/command-outputs/nymvisor-init-daemon.md new file mode 100644 index 0000000000..a6ea10e554 --- /dev/null +++ b/documentation/docs/components/outputs/command-outputs/nymvisor-init-daemon.md @@ -0,0 +1,6 @@ +2024-10-23T17:45:06.789452Z  INFO tools/nymvisor/src/cli/init.rs:416: enabled nymvisor logging +2024-10-23T17:45:06.789476Z  INFO tools/nymvisor/src/cli/init.rs:419: initialising the nymvisor +2024-10-23T17:45:06.789497Z  INFO get_build_information: tools/nymvisor/src/daemon/mod.rs:63: attempting to obtain daemon build information self.executable_path="./nym-node" +2024-10-23T17:45:06.795736Z  INFO tools/nymvisor/src/cli/init.rs:217: initialising the directory structure +2024-10-23T17:45:06.795827Z  INFO tools/nymvisor/src/cli/init.rs:250: setting up the genesis binary +2024-10-23T17:45:06.796090Z  INFO get_build_information: tools/nymvisor/src/daemon/mod.rs:63: attempting to obtain daemon build information self.executable_path="/home/strix/.nym/nymvisors/data/nym-node/genesis/bin/nym-node" diff --git a/documentation/docs/pages/operators/nodes/maintenance/nymvisor-upgrade.mdx b/documentation/docs/pages/operators/nodes/maintenance/nymvisor-upgrade.mdx index 33bac5ffca..5fb4d2408e 100644 --- a/documentation/docs/pages/operators/nodes/maintenance/nymvisor-upgrade.mdx +++ b/documentation/docs/pages/operators/nodes/maintenance/nymvisor-upgrade.mdx @@ -2,6 +2,16 @@ import { Tabs } from 'nextra/components'; import { Callout } from 'nextra/components'; import { VarInfo } from 'components/variable-info.tsx'; import { Steps } from 'nextra/components'; +import NymvisorBuildInfo from 'components/outputs/command-outputs/nymvisor-build-info.md'; +import NymvisorHelp from 'components/outputs/command-outputs/nymvisor-help.md'; +import NymvisorInitDaemon from 'components/outputs/command-outputs/nymvisor-init-daemon.md'; +import { AccordionTemplate } from 'components/accordion-template.tsx'; + + +export const NymvisorInitD = () => ( +
+
+); # Automatic Node Upgrade: Nymvisor Setup & Usage @@ -29,9 +39,8 @@ Nymvisor is an early and experimental software. Users should use it at their own ## Current version -``` - -``` + + ## Preliminary steps @@ -53,9 +62,7 @@ You can check that your binaries are properly compiled with: Which should return a list of all available commands. -``` - -``` + You can also check the various arguments required for individual commands with: @@ -75,10 +82,6 @@ Initialise your Nymvisor instance with the following command. You must initialis Where the value of `--daemon-home` might be `~/.nym/nym-nodes/default-nym-node` and `` might be `/home/sakine/nym/target/release/nym-node`, or wherever your node binary is located. -``` - -``` - By default this will create config files at `~/.nym/nymvisors/instances/nym-node-default/config/config.toml` as shown in the console output above. For config options look at the different `--flags` available, or the [environment variables](#environment-variables) section below. ### Running your Nymvisor Instance @@ -89,14 +92,10 @@ The interface to the `nymvisor run ` command is quite simple. Any argument `run` Nymvisor and start your node via the following command. Make sure to stop any existing node before running this command. -``` +```sh ./nymvisor run run --id ``` -``` - -``` - Nymvisor will now manage your node process (for an in-depth overview of this command check the [in-depth command information](./nymvisor-upgrade.md#commands-in-depth) below). It will periodically poll [this endpoint](https://nymtech.net/.wellknown/nym-node/upgrade-info.json) (replace `nym-node` with whatever node you may actually be running via Nymvisor) and check for a new `version` of the binary it is watching. If this exists, it will then, using the information proceed with these steps: diff --git a/documentation/docs/pages/operators/nodes/nym-node/setup.mdx b/documentation/docs/pages/operators/nodes/nym-node/setup.mdx index f30f7523ad..0b5ca1ef9e 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/setup.mdx +++ b/documentation/docs/pages/operators/nodes/nym-node/setup.mdx @@ -4,6 +4,8 @@ import { RunTabs } from 'components/operators/nodes/node-run-command-tabs'; import { VarInfo } from 'components/variable-info.tsx'; import { MigrateTabs } from 'components/operators/nodes/node-migrate-command-tabs'; import BuildInfo from 'components/outputs/command-outputs/nym-node-build-info.md'; +import NymNodeHelp from 'components/outputs/command-outputs/nym-node-help.md'; +import NymNodeRunHelp from 'components/outputs/command-outputs/nym-node-run-help.md'; import { AccordionTemplate } from 'components/accordion-template.tsx'; # Nym Node Setup & Run @@ -66,15 +68,13 @@ You can always use `--help` flag to see the commands or arguments associated wit Run `./nym-node --help` to see all available commands: -``` - -``` + To list all available flags for each command, run `./nym-node --help` for example `./nym-node run --help`: -``` - -``` + + + The Wireguard flags currently have limited functionality. From version `1.1.6` ([`v2024.9-topdeck`](https://github.com/nymtech/nym/releases/tag/nym-binaries-v2024.9-topdeck)) wireguard is available and recommended to be switched on for nodes running as Gateways. Keep in mind that this option needs a bit of a special [configuration](configuration.md#wireguard-setup). diff --git a/documentation/docs/pages/operators/nodes/validator-setup/nym-api.mdx b/documentation/docs/pages/operators/nodes/validator-setup/nym-api.mdx index a205a0a0b7..ecacd099cf 100644 --- a/documentation/docs/pages/operators/nodes/validator-setup/nym-api.mdx +++ b/documentation/docs/pages/operators/nodes/validator-setup/nym-api.mdx @@ -3,6 +3,8 @@ import { Tabs } from 'nextra/components'; import { VarInfo } from 'components/variable-info.tsx'; import { Steps } from 'nextra/components'; import {Accordion, AccordionItem} from "@nextui-org/react"; +import ApiBuildInfo from 'components/outputs/command-outputs/nym-api-build-info.md'; +import NymApiHelp from 'components/outputs/command-outputs/nym-api-help.md'; # Nym API Setup @@ -103,9 +105,8 @@ DKG ceremony in points: * From the perspective of validator operators, this is all they had to do. Under the hood, each `nym-api` instance then took part in several rounds of key submission, verification, and derivation. This will continue until quorum is acheived. ## Current version -``` - -``` + + ## Setup and Usage @@ -118,10 +119,7 @@ You can check that your binary is properly compiled with: Which should return a list of all available commands. - -``` - -``` + You can also check the various arguments required for individual commands with: diff --git a/documentation/scripts/prebuild.sh b/documentation/scripts/prebuild.sh index ce4d7a6d97..43ba431236 100755 --- a/documentation/scripts/prebuild.sh +++ b/documentation/scripts/prebuild.sh @@ -25,5 +25,12 @@ echo '```sh' > ../../documentation/docs/components/outputs/command-outputs/nym-n echo '```' >> ../../documentation/docs/components/outputs/command-outputs/nym-node-help.md && echo '```sh' > ../../documentation/docs/components/outputs/command-outputs/nym-node-run-help.md && ./nym-node run --help >> ../../documentation/docs/components/outputs/command-outputs/nym-node-run-help.md && -echo '```' > ../../documentation/docs/components/outputs/command-outputs/nym-node-run-help.md && +echo '```' >> ../../documentation/docs/components/outputs/command-outputs/nym-node-run-help.md && +echo '```sh' > ../../documentation/docs/components/outputs/command-outputs/nymvisor-help.md && +./nymvisor --help >> ../../documentation/docs/components/outputs/command-outputs/nymvisor-help.md && +echo '```' >> ../../documentation/docs/components/outputs/command-outputs/nymvisor-help.md && +echo '```sh' > ../../documentation/docs/components/outputs/command-outputs/nym-api-help.md && +./nym-api --help >> ../../documentation/docs/components/outputs/command-outputs/nym-api-help.md && +echo '```' >> ../../documentation/docs/components/outputs/command-outputs/nym-api-help.md && + echo "prebuild finished"