finish all command outputs

This commit is contained in:
serinko
2024-10-23 20:13:56 +02:00
parent 8079533579
commit eac2e8fda0
14 changed files with 246 additions and 32 deletions
@@ -1 +1 @@
Wednesday, October 23rd 2024, 17:12:09 UTC
Wednesday, October 23rd 2024, 18:11:48 UTC
@@ -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
```
@@ -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)
```
@@ -0,0 +1,19 @@
```sh
Usage: nym-api [OPTIONS] <COMMAND>
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 <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
```
@@ -1,2 +0,0 @@
```sh
```
@@ -0,0 +1,22 @@
```sh
Usage: nym-node [OPTIONS] <COMMAND>
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 <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
```
@@ -0,0 +1,79 @@
```sh
Start this nym-node
Usage: nym-node run [OPTIONS]
Options:
--id <ID>
Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
--config-file <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 <https://nymtech.net/terms-and-conditions/operators/v1.0.0> [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 <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 <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 <OUTPUT>
Specify the output format of the bonding information (`text` or `json`) [env: NYMNODE_OUTPUT=] [default: text] [possible values: text, json]
--public-ips <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 <HOSTNAME>
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
--location <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 <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 <LANDING_PAGE_ASSETS_PATH>
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
--http-access-token <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 <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 <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 <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 <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 <NYM_API_URLS>
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
--nyxd-urls <NYXD_URLS>
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
--wireguard-enabled <WIREGUARD_ENABLED>
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
--wireguard-bind-address <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 <WIREGUARD_PRIVATE_IP>
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
--wireguard-announced-port <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 <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 <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 <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 <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 <ANNOUNCE_WSS_PORT>
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
--enforce-zk-nyms <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 <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 <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 <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
```
@@ -0,0 +1,34 @@
Usage: nym-api [OPTIONS] <COMMAND>
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 <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] <COMMAND>
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 <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
@@ -0,0 +1,20 @@
```sh
Usage: nymvisor [OPTIONS] <COMMAND>
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 <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
```
@@ -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"
@@ -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 = () => (
<div>
</div>
);
# Automatic Node Upgrade: Nymvisor Setup & Usage
@@ -29,9 +39,8 @@ Nymvisor is an early and experimental software. Users should use it at their own
</Callout>
## Current version
```
<!-- cmdrun ../../../../target/release/nymvisor --version | grep "Build Version" | cut -b 21-26 -->
```
<NymvisorBuildInfo />
## 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.
```
<!-- cmdrun ../../../../target/release/nymvisor --help -->
```
<NymvisorHelp />
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 `<PATH>` might be `/home/sakine/nym/target/release/nym-node`, or wherever your node binary is located.
```
<!-- cmdrun ../../../../target/release/nymvisor init --daemon-home ~/.nym/nym-nodes/default-nym-node ../../../../target/release/nym-node | tail -20 -->
```
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 <ARGS>` 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 <ID>
```
```
<!-- cmdrun ../../../../target/release/nymvisor run run --id default-nym-node -->
```
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:
<Steps>
@@ -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:
```
<!-- cmdrun ../../../../target/release/nym-node --help -->
```
<NymNodeHelp />
To list all available flags for each command, run `./nym-node <COMMAND> --help` for example `./nym-node run --help`:
```
<!-- cmdrun ../../../../target/release/nym-node run --help -->
```
<AccordionTemplate name="Command output">
<NymNodeRunHelp />
</AccordionTemplate>
<Callout type="warning" emoji="⚠️">
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).
@@ -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
```
<!-- cmdrun ../../../../target/release/nym-api --version | grep "Build Version" | cut -b 21-26 -->
```
<ApiBuildInfo />
## 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.
```
<!-- cmdrun ../../../../target/release/nym-api --help -->
```
<NymApiHelp />
You can also check the various arguments required for individual commands with:
+8 -1
View File
@@ -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"