diff --git a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/nyx-total-stake.md b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/nyx-total-stake.md index e36dbca0e28..64cb46e4cab 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/nyx-total-stake.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/nyx-total-stake.md @@ -1 +1 @@ -44.811 +44.332 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 c568fec3338..347e22de35f 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 @@ -Thursday, January 16th 2025, 09:57:52 UTC +Thursday, January 23rd 2025, 10:41:32 UTC diff --git a/documentation/docs/next.config.js b/documentation/docs/next.config.js index 10e18d982b0..6efaaf26696 100644 --- a/documentation/docs/next.config.js +++ b/documentation/docs/next.config.js @@ -497,13 +497,6 @@ const config = { permanent: true, basePath: false, }, - { - source: "/operators/testing/node-api-check.html", - destination: - "/docs/operators/nodes/performance-and-testing/node-api-check", - permanent: true, - basePath: false, - }, { source: "/operators/testing/prometheus-grafana.html", destination: @@ -663,13 +656,6 @@ const config = { permanent: true, basePath: false, }, - { - source: "/docs/operators/testing/node-api-check", - destination: - "/docs/operators/nodes/performance-and-testing/node-api-check", - permanent: true, - basePath: false, - }, { source: "/docs/operators/nodes/proxy-configuration", destination: diff --git a/documentation/docs/pages/apis/explorer-api.mdx b/documentation/docs/pages/apis/explorer-api.mdx index 0ab207360db..2dbb4f30bad 100644 --- a/documentation/docs/pages/apis/explorer-api.mdx +++ b/documentation/docs/pages/apis/explorer-api.mdx @@ -3,6 +3,6 @@ The Explorer API is the backend for the [Mixnet Explorer](https://explorer.nymtech.net/). -**This will soon be deprecated in favour of the [Node Status API](../ns-api).** +**This will soon be deprecated in favour of the [Node Status API](ns-api.mdx).** The code for this service can be found [in our monorepo](https://github.com/nymtech/nym/tree/develop/explorer). diff --git a/documentation/docs/pages/developers/clients/socks5/setup.mdx b/documentation/docs/pages/developers/clients/socks5/setup.mdx index 027fadf35e9..43f9c861714 100644 --- a/documentation/docs/pages/developers/clients/socks5/setup.mdx +++ b/documentation/docs/pages/developers/clients/socks5/setup.mdx @@ -16,7 +16,7 @@ You can check that your binaries are properly compiled with: You can check the necessary parameters for the available commands by running: ``` -./nym-client --help +./nym-socks5-client --help ``` ## Initialising a new client instance diff --git a/documentation/docs/pages/developers/tools/nym-cli/usage.mdx b/documentation/docs/pages/developers/tools/nym-cli/usage.mdx index f9fa301cc9f..7611149cb77 100644 --- a/documentation/docs/pages/developers/tools/nym-cli/usage.mdx +++ b/documentation/docs/pages/developers/tools/nym-cli/usage.mdx @@ -4,7 +4,7 @@ The `nym-cli` binary can be built by running `cargo build --release` in the `nym/tools/nym-cli` directory. ## Usage -See the [commands](./nym-cli/commands.mdx) page for an overview of all command options. +See the [commands](commands.mdx) page for an overview of all command options. ## Staking on someone's behalf (for custodians) diff --git a/documentation/docs/pages/developers/typescript/examples/mix-fetch.mdx b/documentation/docs/pages/developers/typescript/examples/mix-fetch.mdx index ceb90645029..267f8d3788a 100644 --- a/documentation/docs/pages/developers/typescript/examples/mix-fetch.mdx +++ b/documentation/docs/pages/developers/typescript/examples/mix-fetch.mdx @@ -17,8 +17,6 @@ Sounds great, are there any catches? Well, there are a few (for now): - For now, `mixFetch` cannot deal with concurrent requests with the same base URL. -Read [this article](https://blog.nym.com/mixfetch-like-the-fetch-api-but-via-the-mixnet-82acfd435c62) to learn more. - Right now Gateways are not required to run a Secure Websocket (WSS) listener, so only a subset of nodes running in Gateway mode have configured their nodes to do so. diff --git a/documentation/docs/pages/network/architecture.mdx b/documentation/docs/pages/network/architecture.mdx index 9e7210f92c5..19560c0bb2a 100644 --- a/documentation/docs/pages/network/architecture.mdx +++ b/documentation/docs/pages/network/architecture.mdx @@ -1,8 +1,8 @@ # Network Components Core components: -* A **Mixnet**, which mixes Sphinx packet traffic so that it cannot be determined who is communicating with whom. Our mixnet is based on a modified version of the [**Loopix** design](concepts/loopix). This is made up of [Nym nodes](architecture/mixnet/nodes) runnning on servers around the world maintained by a decentralised group of Operators. -* Various [**Nym clients**](architecture/mixnet/clients) which manage sending and receiving Sphinx packets, encrypting/decrypting traffic, and providing [cover traffic](./concepts/cover-traffic) to hide 'real' traffic timing. +* A **Mixnet**, which mixes Sphinx packet traffic so that it cannot be determined who is communicating with whom. Our mixnet is based on a modified version of the [**Loopix** design](concepts/loopix). This is made up of [Nym nodes](architecture/mixnet#nodes) runnning on servers around the world maintained by a decentralised group of Operators. +* Various [**Nym clients**](architecture/mixnet#nym-clients) which manage sending and receiving Sphinx packets, encrypting/decrypting traffic, and providing [cover traffic](./concepts/cover-traffic) to hide 'real' traffic timing. * A CosmWasm-enabled blockchain called [**Nyx**](architecture/nyx), the home of the various smart contracts used by the mixnet. A subset of Nyx Validators run [NymAPI](./architecture/nyx#nymapi) instances, taking part in also producing and verifying [zk-nym credentials](cryptography/zk-nym). ![arch_overview](/images/network/arch/overall-arch.png) diff --git a/documentation/docs/pages/network/architecture/nyx.mdx b/documentation/docs/pages/network/architecture/nyx.mdx index 4f2c82e4e1c..5795e76f779 100644 --- a/documentation/docs/pages/network/architecture/nyx.mdx +++ b/documentation/docs/pages/network/architecture/nyx.mdx @@ -66,7 +66,7 @@ The Vesting contract has multiple functions: * Interacting with the Mixnet using vesting (i.e. non-transferable) tokens, allowing users to delegate their unvested tokens. ### Multisig Contract -The multisig contract used by the [NymAPI Quroum](../cryptography/zk-nym/zk-nym-overview) - a subset of the Nyx Validator set taking on the additional work of generating and validating zk-nyms - to execute certain actions in the [zk-nym](./ecash.md) contract. +The multisig contract used by the [NymAPI Quroum](../cryptography/zk-nym/zk-nym-overview) - a subset of the Nyx Validator set taking on the additional work of generating and validating zk-nyms - to execute certain actions in the [zk-nym](../cryptography/zk-nym) contract. It is essentially an instance of the [canonical](https://github.com/CosmWasm/cw-plus/tree/main/contracts) `cw3-flex-multisig` using the `cw4-group` contract, with one minor change to restrict the addresses allowed to submit proposals. diff --git a/documentation/docs/pages/operators/binaries/pre-built-binaries.mdx b/documentation/docs/pages/operators/binaries/pre-built-binaries.mdx index 89a124b726e..1b3dcd27b8b 100644 --- a/documentation/docs/pages/operators/binaries/pre-built-binaries.mdx +++ b/documentation/docs/pages/operators/binaries/pre-built-binaries.mdx @@ -1,5 +1,7 @@ -import { Steps } from 'nextra/components' +import { Steps } from 'nextra/components'; import { VarInfo } from 'components/variable-info.tsx'; +import { Tabs } from 'nextra/components'; +import { MyTab } from 'components/generic-tabs.tsx'; # Pre-built Binaries @@ -27,11 +29,55 @@ In case you want to download binary to your current working directory, drop `` from the command -###### 2. Make the binary executable +###### 2. Verify the binary `sha256sum` hash + +
+ Manual check, + One-liner, + ]} defaultIndex="0"> + +To see your binary `sha256sum` hash, run: +```sh +sha256sum +``` +```sh +# for example +# sha256sum ./nym-wallet_1.2.15_amd64.AppImage +# or +# sha256sum ./nym-node +``` +- Download [`hashes.json`](https://github.com/nymtech/nym/releases) file from the same same *Assets* drop down like your binary +- Open it with your text editor or print its content with `cat hashes.json` +- Check it if your binary `sha256sum` output is in `hashes.json` by using the `sha256sum` and searching for it or using `grep` command: +``` +grep -i +``` + + +- Download [`hashes.json`](https://github.com/nymtech/nym/releases) file from the same same *Assets* drop down like your binary +- Run this command, substituting `` with your the one you want to check: +```sh +sha256sum | awk '{print $1}' | grep -qF "$(jq -r '.assets | to_entries | .[].value.sha256' hashes.json)" && echo "Hash matches an asset in the JSON file." || echo "Hash does not match any asset in the JSON file." +``` +```sh +# for example +# sha256sum ./nym-node | awk '{print $1}' | grep -qF "$(jq -r '.assets | to_entries | .[].value.sha256' hashes.json)" && echo "Hash matches an asset in the JSON file." || echo "Hash does not match any asset in the JSON file." +``` + + +
+ +- If your have to extract the binary (it would look like like `.tar.gz`) do it: +```sh +tar -xvzf .tar.gz +``` + +###### 3. Make the binary executable - Open terminal in the same directory and run: ```sh -chmod +x -# for example: chmod +x nym-mixnode +chmod u+x +# for example: chmod u+x nym-node ``` diff --git a/documentation/docs/pages/operators/changelog.mdx b/documentation/docs/pages/operators/changelog.mdx index 96d73d3183a..24c305d63d7 100644 --- a/documentation/docs/pages/operators/changelog.mdx +++ b/documentation/docs/pages/operators/changelog.mdx @@ -525,7 +525,7 @@ cargo Profile: release - `nym-node` has now implemented [IPv6 support for wireguard](https://github.com/nymtech/nym/pull/5059) -- [`network_tunnel_manager.sh` updated](network): run the commands below to make sure +- [`network_tunnel_manager.sh` updated](https://raw.githubusercontent.com/nymtech/nym/refs/heads/develop/scripts/network_tunnel_manager.sh): run the commands below to make sure
@@ -659,7 +659,7 @@ systemctl daemon-reload && service nym-node restart - Since `v2024.13-magura`, operators do not update their node version in the wallet. [Manual upgrading steps](nodes/maintenance/manual-upgrade.mdx) has been updated accordingly. -- CLI tool [`node_api_check.py`](nodes/performance-and-testing/node-api-check.mdx), helping operators to collect all API values about their nodes locally, is not up to date with the API changes introduced with `v2024.13-magura` release version. Please treat it as unstable before we fix it. +- CLI tool `node_api_check.py`, helping operators to collect all API values about their nodes locally, is not up to date with the API changes introduced with `v2024.13-magura` release version. Please treat it as unstable before we fix it. #### Error Log @@ -967,7 +967,7 @@ Confirm that the deployment workflows work through manual testing ### Operators Updates & Tooling -**Every operator has to make sure that their nodes [self-described endpoint works](nodes/performance-and-testing/node-api-check#basic-api-usage), otherwise the node will be un-routable and thus won't get any rewards!** +**Every operator has to make sure that their nodes self-described endpoint works, otherwise the node will be un-routable and thus won't get any rewards!** - **New technical documentation:** All Nym documentation starts from a new entry page [nymtech.net/docs](https://nymtech.net/docs/operators/introduction). To run locally or propose collaboration, start in our [repository](https://github.com/nymtech/nym/tree/develop/documentation) @@ -1165,7 +1165,7 @@ Some endpoints got purposely deprecated without any equivalent reimplemented sin ##### Mixnet Contract -**Every operator has to make sure that their nodes [self-described endpoint works](nodes/performance-and-testing/node-api-check#basic-api-usage), otherwise the node will be un-routable and thus won't get any rewards!** +**Every operator has to make sure that their nodes self-described endpoint works, otherwise the node will be un-routable and thus won't get any rewards!** ###### High Level Changes @@ -1979,7 +1979,7 @@ done - Vesting contract functionalities have been purged, users can only remove tokens from vesting - Migrating from `mixnode` or `gateway` smart contracts to a new unifying `nym-node` smart contract will be available soon using Nym desktop wallet, just like you are used to for bonding and node settings. After this migration all `nym-nodes` will be able to receive delegation and rewards. We will share a step by step guide once this migration will be deployed. No action needed now. -- [Nym API Check CLI](testing/node-api-check.md) is upgraded according to the latest API endpoints, output is cleaner and more concise. +- Nym API Check CLI is upgraded according to the latest API endpoints, output is cleaner and more concise. #### Operators Tasks @@ -2868,7 +2868,7 @@ warning: /home/alice/src/nym/nym/common/dkg/Cargo.toml: `default-features` is ig - Flow [chart](release-cycle.md#release-flow) - [Sandbox testnet](sandbox.md) guide: teaching Nym node operators how to run their nodes in Nym Sandbox testnet environment. - [Terms & Conditions flag](nodes/setup.md#terms--conditions) -- [Node API Check CLI](testing/node-api-check.md) +- Node API Check CLI - [Pruning VPS `syslog` scripts](troubleshooting/vps-isp.md#pruning-logs) - [Black-xit: Exiting the blacklist](troubleshooting/nodes.md#my-gateway-is-blacklisted) diff --git a/documentation/docs/pages/operators/nodes/maintenance.mdx b/documentation/docs/pages/operators/nodes/maintenance.mdx index fa686f906c0..1d182e3d856 100644 --- a/documentation/docs/pages/operators/nodes/maintenance.mdx +++ b/documentation/docs/pages/operators/nodes/maintenance.mdx @@ -101,23 +101,31 @@ For more information about your node's port configuration, check the [port refer Anything can happen to the server on which your node is running. To back up your `nym-node` keys and configuration protects the operators against the negative impact of unexpected events. To restart your node on another server, two essential pieces are needed: -1. Node keys to initialise the same node on a new VPS -2. Access to the bonding Nym account (wallet seeds) to edit the IP on smart contract +1. **Node keys to initialise the same node on a new VPS** +2. **Access to the bonding Nyx account (wallet seeds) to update host on the Mixnet smart contract** -Assuming that everyone access their wallets from local machine and does *not* store their seeds on VPS, point 2. should be a given. -To backup your `nym-node` keys and configuration in the easiest way possible, copy the entire config directory `.nym` from your VPS to your local desktop, using a special copy command `scp`: +Optionally, it can be useful to have a backup your configuration directories to setup [reverse proxy and WSS](nym-node/configuration/proxy-configuration.mdx) quickly as well. + +Assuming that everyone access their wallets from local machine and does *not* store their seeds on VPS, point \#2 should be a given. Never store your mnemonic seed anywhere online nor do *not* share it with anyone! +To backup your `nym-node` keys and configuration in the easiest way possible, copy the entire config directory `.nym` from your VPS to your local machine, using a special copy command `scp`: + -###### 1. Create a directory where you want to store your backup +###### 1. Create a local directory where you want to store your backup ```sh mkdir -pv ``` +```sh +# for example +# mkdir -pv $HOME/backup/my_nym_node/.nym +``` + ###### 2. Copy configuration folder `.nym` from your VPS to your newly created backup directory ```sh @@ -130,37 +138,96 @@ The `scp` command should print logs, an operator can see directly whether it was +Now you have everything needed to restore your `nym-node` on another server. If you are in a need of doing so, follow the steps in [*Restoring a node*](#restoring-a-node) chapter below. + +### Backup proxy configuration + +If you run your node behind a [reverse proxy and WSS](nym-node/configuration/proxy-configuration.mdx) (suggested for all Exit Gateways), you may find it useful to backup configuration directories for that as well. It's done by following the same logic, using `scp` command for remote copy: + + +Given that servers hosting a `nym-node` are expected to be a single purpose machines, we assume in this guide, that there are no other `` sub-directories in `/var/www` and `/etc/nginx/sites-available` then the ones relevant to `nym-node`. In case you prefer to only backup configuration for a particular hostname, just append your `` to the path in the commands below. + + + + +###### 1. Create local sub-directories where you want to store your backup + +```sh +mkdir -pv +mkdir -pv +``` + +```sh +# for example +# mkdir -pv $HOME/backup/my_nym_node/var/www +# mkdir -pv $HOME/backup/my_nym_node/etc/nginx/sites-available +``` + +###### 1. Backup `/var/www` directory + +```sh +scp -r @:/var/www +``` + +###### 2. Backup `/etc/nginx/sites-available` directory + +```sh +scp -r @:/etc/nginx/sites-available +``` + +###### 3. Verify the success of the backup + +The `scp` command should print logs, an operator can see directly whether it was successful or if it encountered any error. However, double check that all your needed configuration is in the backup target directory. + + + + +To copy files from the root directory (paths starting with `/`), you need root permissions on the remote machine. If your server is not running as the root user, the `scp` command won't work directly, as using the `sudo` prefix would apply to your local machine instead of the remote server. + +To resolve this, you need to SSH into the remote server first, and there use the `sudo cp -r ` command to copy the necessary directories to a location outside the root directory. After that, you can run `scp` with the correct source path to transfer the files. + + ## Restoring a node -In case your VPS shut down and you have a [backup](#backup-a-node) of your node keys and access to your bonding wallet, you can easily restore your node on another server without losing your delegation. +In case your VPS was terminated and you have a [backup](#backup-a-node) of your node keys and access to your [bonding](nym-node/bonding) wallet, you can easily restore your node on another server without losing your delegation. ###### 1. Prepare new VPS -- On VPS: Do all [preliminary steps](preliminary-steps.mdx) needed to run a `nym-node`. +SSH into your new VPS and start with: + +- Do all [preliminary steps](preliminary-steps.mdx) needed to run a `nym-node`. -- On VPS: Create a `.nym/nym-nodes` configuration folder: +- Create a `.nym/nym-nodes` configuration folder: ```sh mkdir -pv ~/.nym/nym-nodes ``` ###### 2. Restore your node configuration -From machine where your node is backed up (usually local desktop): Copy the folder with your node keys and configuration to the newly created folder on your VPS using `scp` command. Make sure to grab the entire `nym-node` configuration folder, which is called after your local `nym-node` identifier (``), the `-r` (recursive) flag will take care of all sub-directories and their content: +Copy the folder with your node configuration and keys from your local machine to the newly created folder on your VPS using `scp` command. Make sure to grab the entire `nym-node` configuration folder, which is called after your local `nym-node` identifier (``), the `-r` (recursive) flag will take care of all sub-directories and their content: + ```sh scp -r @:~/.nym/nym-nodes/ ``` +```sh +# for example: +scp -r $HOME/backup/my_nym_node/.nym/nym-nodes/default-nym-node root@my-nym-node:~/.nym/nym-nodes/ +``` -The `scp` command should print logs, an operator can see directly whether it was successful or if it encountered any error. However, double check that all your needed configuration is in the target directory `.nym/nym-nodes` on your VPS. +###### 3. Verify the success of the backup +The `scp` command should print logs, an operator can see directly whether it was successful or if it encountered any error. However, double check that all your needed configuration is in the target directory `.nym/nym-nodes` on your VPS. -###### 3. Configure your node on the new VPS -* Edit `~/.nym/nym-nodes//config/config.toml` config with the new listening address IP - it's the one under the header `[host]`, called `public_ips = [,]` and add your new location (field `location = `, formats like: 'Jamaica', or two-letter alpha2 (e.g. 'JM'), three-letter alpha3 (e.g. 'JAM') or three-digit numeric-3 (e.g. '388') can be provided). You can see your IP by running a command `echo "$(curl -4 https://ifconfig.me)"`. +###### 4. Configure your node on the new VPS +* SSH to your VPS +* Run a command `echo "$(curl -4 https://ifconfig.me)"` to see your public IPv4 +* Edit config file located at `~/.nym/nym-nodes//config/config.toml` correct IP - it's the field under the header `[host]`, called `public_ips = [,]` +* Add your new location field `location = `, (formats like: 'Jamaica', or two-letter alpha2 (e.g. 'JM'), three-letter alpha3 (e.g. 'JAM') or three-digit numeric-3 (e.g. '388') can be provided). * Try to run the node and see if everything works. - * Setup the [systemd](nym-node/configuration.mdx#systemd) automation (don't forget to add the [terms and conditions flag](nym-node/setup.mdx#terms--conditions)) to `ExecStart` command, reload the daemon and run the service. ###### 4. Change the node smart contract info via the wallet interface @@ -169,6 +236,63 @@ Open Nym Wallet, go to *Bonding*, open *Settings* and change *Host* value to the +Everything should work now. If not, have a look through the `config.toml` file and ensure that there are no details from the past VPS, things like WSS port, landing page asset etc. If you had a configuration with reverse proxy and WSS, continue to set that up as well. If you had it backed up, you can follow the steps to [restore proxy configuration](#restore-proxy-configuration) below, or you can start to [configure proxy from scratch](nym-node/configuration/proxy-configuration.mdx). + +### Restoring proxy configuration + +If operators moving to a new server had their [proxy configuration backed up](#backup-proxy-configuration), it's possible to simply restore it, following these steps: + + +###### 1. Copy your backed up directory `/var/www` for landing page to the server +- Start setting up reverse proxy and WSS following [this guide](nym-node/configuration/proxy-configuration.mdx) but instead of creating a new `/var/www/` directory, simply copy there the one from the old server, using `scp` command + +```sh +scp -r @:/var/www/ +``` +```sh +# for example: +scp -r $HOME/backup/my_nym_node/var/www root@my-nym-node:/var/www +``` +###### 2. Make sure that domain is correctly setup +As you see in the guide you use a domain (same like your ``), make sure you have it registered as and redirected to the new IP by logging into your DNS provider and editing the dashboard of the domain. + +###### 3. Proceed with all needed `node` configuration +- In the guide follow the steps to [configure your node reverse proxy](nym-node/configuration/proxy-configuration#reverse-proxy-configuration), like installing Nginx, opening the needed ports etc + +###### 4. Restore Nginx config +- When you arrive to the point to configure your [`/etc/nginx/sites-available/`](nym-node/configuration/proxy-configuration#2-add-your-endpoint-configuration-to-nginx-by-creating-a-config-file), use again `scp` instead of creating a new one + +```sh +scp -r @:/etc/nginx/sites-available +``` +```sh +# for example: +scp -r $HOME/backup/my_nym_node/etc/nginx/sites-available root@my-nym-node:/etc/nginx/sites-available +``` +###### 5. Edit Nginx configuration file with correct hostname +- Open the Nginx config file on your server and see if a domain name needs to be changed to new one. To open the file, use for example nano text editor: +```sh +nano /etc/nginx/sites-available/ +``` +###### 6. Continue with the Nginx setup +- Go back to the [proxy setup guide](nym-node/configuration/proxy-configuration#3-activate-and-test-nginx-configuration) and continue from the point [\#3](nym-node/configuration/proxy-configuration#3-activate-and-test-nginx-configuration) + +###### 7. Edit WSS configuration with the correct hostname +- Open the WSS config file on your server and see if a domain name needs to be changed to new one. To open the file, use for example nano text editor: +```sh +nano /etc/nginx/sites-available/wss-config-nym +``` +###### 8. Finish and test the setup + +Continue with the [activating and testing](nym-node/configuration/proxy-configuration#2-activate-and-test-nginx-wss-configuration) your reverse proxy and WSS until the end of the guide. + + + +To copy files to the root directory (paths starting with `/`), you need root permissions on the remote machine. If your server is not running as the root user, the `scp` command won't work directly, as using the `sudo` prefix would apply to your local machine instead of the remote server. + +To resolve this, you can SSH into the remote server and create the configuration files manually using the prefix `sudo` and then copy their content from your local backup. + + ## Moving a node In case of a need to move a Nym Node from one machine to another and avoiding to lose the delegation, here are few steps how to do it. diff --git a/documentation/docs/pages/operators/nodes/nym-node/bonding.mdx b/documentation/docs/pages/operators/nodes/nym-node/bonding.mdx index 2681b4de9fc..ef3ade74035 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/bonding.mdx +++ b/documentation/docs/pages/operators/nodes/nym-node/bonding.mdx @@ -28,7 +28,7 @@ Do not bond your node to the API if the previous steps weren't finished. Bad con Any new bonded node will provide only the bare minimum information: host, identity key and optionally custom port of its HTTP API - we highly recommend to set that one up to `8080`. Everything else will be discovered via the self-described API for maximum flexibility. This also includes the sphinx key, meaning if the API is not exposed, the node will be unable to route any traffic. -**Every operator has to make sure that their nodes [self-described endpoint works](nodes/performance-and-testing/node-api-check#basic-api-usage), otherwise the node will be un-routable and thus won't get any rewards!** +**Every operator has to make sure that their nodes [self-described endpoint works](../performance-and-testing#functionality--performance-check), otherwise the node will be un-routable and thus won't get any rewards!** **Reveal your menominc phrase only in areas out of surveillance of other people and never share it with others. Nym team will never ask you for your mnemonic phrase - in case you were asked by someone it's a scam, do *not* reply to it!** @@ -36,7 +36,7 @@ Any new bonded node will provide only the bare minimum information: host, identi ## Bond via the Desktop wallet (recommended) -You can bond your `nym-node` via the Desktop wallet. +You can bond your `nym-node` via the Desktop wallet. Nym wallet, just like any Nym binary can be downloaded, verified and made executable following [these simple steps](../../binaries/pre-built-binaries#setup-binaries). @@ -120,18 +120,13 @@ From `nym-wallet` version `1.2.15` onward the application allows and prompts ope -###### 1. Download the latest wallet from [the release page](https://github.com/nymtech/nym/releases) +###### 1. Download the latest wallet from [the release page](https://github.com/nymtech/nym/releases), verify and make executable -###### 2. Verify the binary and extract it if needed +Nym wallet, just like any Nym binary can be downloaded, verified and made executable following [these simple steps](../../binaries/pre-built-binaries#setup-binaries). -- Download [`hashes.json`](https://github.com/nymtech/nym/releases/download/nym-wallet-v1.2.15/hashes.json) -- Open it with your text editor or print it's content with `cat hashes.json` -- Run `sha256sum ` for example `sha256sum ./nym-wallet_1.2.15_amd64.AppImage` -- If your have to extract it (like `.tar.gz`) do it +###### 2. Open the wallet and sign in -###### 3. Open the wallet and sign in - -###### 4. Migrate! +###### 3. Migrate! - Go to Bonding and you will be prompted with such message: @@ -161,9 +156,9 @@ If you want to bond your Mix Node via the CLI, then check out the [relevant sect This is not relevant for operators running exclusively `mixnode` functionality. For any type of gateway functionality this is a preparation requirement for the upcoming [ticket rewarding](../../tokenomics/mixnet-rewards#roadmap). -Every `nym-node` client contains a mnemonic of a Nyx account, generated with node initialisation (first `run` command creating all configuration and data files). This mnemonic is located in `$HOME/.nym/nym-nodes//data/cosmos_mnemonic`. **This is *not* the same account as the one used for bondng!** +Every `nym-node` client contains a mnemonic of a Nyx account, generated with node initialisation (first `run` command creating all configuration and data files). This mnemonic is located in `$HOME/.nym/nym-nodes//data/cosmos_mnemonic`. **This is *not* the same account as the one used for bonding!** -This client account will be used for the process of redemption of tickets collected by nodes running as `entry-gateway` and `exit-gateway` as the redemption requires gateway to create a multisig proposal on the chain for which the client (node) needs to pay transaction fee. +This client account will be used for the process of redemption of [zk-nym tickets](../../../network/cryptography/zk-nym) collected by nodes running as `entry-gateway` and `exit-gateway` as the redemption requires gateway to create a multisig proposal on the chain for which the client (node) needs to pay transaction fee. Giving the low transaction cost on Cosmos, funding your client Nyx account with 25 NYM tokens should be more than enough. To do so, follow 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 6b613511d7a..c77b18de420 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/setup.mdx +++ b/documentation/docs/pages/operators/nodes/nym-node/setup.mdx @@ -178,7 +178,7 @@ http:///api/v1/swagger/#/ https:///api/v1/swagger/#/ ``` -For example to determine which mode your node is running, you can check the `:8080/api/v1/roles` endpoint. For example: +For example to determine which mode your node is running, you can check the `:8080/api/v1/roles` endpoint: ```sh # sustitude or with the one corresponding to your node # for http diff --git a/documentation/docs/pages/operators/nodes/performance-and-testing.mdx b/documentation/docs/pages/operators/nodes/performance-and-testing.mdx index 2246a76a9df..ba700cf031b 100644 --- a/documentation/docs/pages/operators/nodes/performance-and-testing.mdx +++ b/documentation/docs/pages/operators/nodes/performance-and-testing.mdx @@ -8,6 +8,34 @@ As developers we need to be constantly improving the software. Operators have as Therefore [monitoring](#monitoring) and [testing](#testing) are essential pieces of our common work. We call out all Nym operators to join the efforts! +## Functionality & Performance Check + +If you want to just quickly check your nodes performance, connectivity and much more, visit [harbourmaster.nymtech.net](https://harbourmaster.nymtech.net/). + +For more information about available endpoints and their status, you can refer to: +```sh +# sustitude or with the one corresponding to your node +# for http +http://:8080/api/v1/swagger/#/ +# or +http:///api/v1/swagger/#/ + +# for reversed proxy/WSS +https:///api/v1/swagger/#/ +``` + +For example to determine which mode your node is running, you can check the `:8080/api/v1/roles` endpoint: +```sh +# sustitude or with the one corresponding to your node +# for http +http://:8080/api/v1/roles +# or +http:///api/v1/roles + +# for reversed proxy/WSS +https:///api/v1/roles +``` + ## Monitoring There are multiple ways to monitor performance of nodes and the machines on which they run. For the purpose of maximal privacy and decentralisation of the data - preventing Nym Mixnet from any global adversary takeover - we created these pages as a source of mutual empowerment, a place where operators can share and learn new skills to **setup metrics monitors on their own infrastructure**. diff --git a/documentation/docs/pages/operators/nodes/performance-and-testing/_meta.json b/documentation/docs/pages/operators/nodes/performance-and-testing/_meta.json index b8b08c3e993..32d200a0dc1 100644 --- a/documentation/docs/pages/operators/nodes/performance-and-testing/_meta.json +++ b/documentation/docs/pages/operators/nodes/performance-and-testing/_meta.json @@ -1,5 +1,4 @@ { "gateway-probe": "Gateway Probe", - "node-api-check": "Node API Check", "prometheus-grafana": "Prometheus & Grafana" } diff --git a/documentation/docs/pages/operators/nodes/performance-and-testing/node-api-check.mdx b/documentation/docs/pages/operators/nodes/performance-and-testing/node-api-check.mdx deleted file mode 100644 index 43867da0889..00000000000 --- a/documentation/docs/pages/operators/nodes/performance-and-testing/node-api-check.mdx +++ /dev/null @@ -1,165 +0,0 @@ -import { Tabs } from 'nextra/components'; -import { Callout } from 'nextra/components'; -import { VarInfo } from 'components/variable-info.tsx'; -import { Steps } from 'nextra/components'; -import { MyTab } from 'components/generic-tabs.tsx'; -import NodeApiCheckHelp from 'components/outputs/command-outputs/node-api-check-help.md'; -import NodeApiCheckQueryHelp from 'components/outputs/command-outputs/node-api-check-query-help.md' - -# Node API Check - - -CLI tool `node_api_check.py`, helping operators to collect all API values about their nodes locally, is not up to date with the API changes introduced with `v2024.13-magura` release version. Please treat it as unstable before we fix it. - - - - -Operating a `nym-node` is not a *"set and forget"* endeavor, it takes some work. To diagnose node network performance through querying APIs, is a good knowledge to have. These are the main places to look for API endpoints regarding `nym-node`: - -- [`openapi.json`](https://validator.nymtech.net/api/v1/openapi.json): a list of all endpoints -- [Swagger UI page](https://validator.nymtech.net/api/swagger/index.html) - -Besides that, node operators can check out their node performance, connectivity and much more on [harbourmaster.nymtech.net](https://harbourmaster.nymtech.net/). - -### Basic API usage - -For information about available endpoints and their status, you can refer to: -```sh -# for http -http://:8080/api/v1/swagger/#/ -# or -http:///api/v1/swagger/#/ - -# for reversed proxy/WSS -https:///api/v1/swagger/#/ -``` - -For example to determine which mode your node is running, you can check `:8080/api/v1/roles` endpoint: -```sh -# for http -http://:8080/api/v1/roles -# or -http:///api/v1/roles - -# for reversed proxy/WSS -https:///api/v1/roles -``` - -## `node_api_check.py` - -To make this a bit easier, we made a CLI tool querying all available API endpoints based on node `Identity Key` (further denoted as ``) called `node_api_check.py`. To diagnose your node performance, whether by yourself or by sharing an output in our [operator channel](https://matrix.to/#/#operators:nymtech.chat), this tool provides you with a quick overview of live data. We recommend to run this checker alongside [`nym_gateway_probe`](gateway-probe.md) to triage both performance and an actual routing. - -Besides querying any bonded node APIs, `nym_api_check.py` has a function counting all existing nodes in provided version. - -### Setup - -#### Pre-requsities - - - -###### 1. Install and configure Python3 - - -- Start with installing Python3: -```sh -sudo apt install python3 -``` - -- Make sure Python3 is your default Python version: -```sh -update-alternatives --install /usr/bin/python python /usr/bin/python3 1 -``` - -- Verify: -```sh -python --version - -# should return higher than 3 -``` - -- Install Python modules `tabulate`, `pandas` and `argparse` either using [`pip`](https://python.land/virtual-environments/installing-packages-with-pip) or if you installed Python3 system-wide you can install modules directly: - -
- Using pip, - System-wide Python installation, - ]} defaultIndex="1"> - - ```sh - pip install tabulate pandas argparse - ``` - - - ```sh - sudo apt install python3-tabulate python3-pandas python3-argparse -y - ``` - - -
- -###### 2. Install `node_api_check.py` and make executable - -To run the program you neet to have [`node_api_check.py`](https://github.com/nymtech/nym/tree/develop/scripts/node_api_check.py) and [`api_endpoints.json`](https://github.com/nymtech/nym/tree/develop/scripts/api_endpoints.json). - -- If you [compiled from source](../../binaries/building-nym.mdx), you already have both of these files. Note that the latest version of this program may be on `develop` branch. - -- If you prefer to download them individually, do it by opening terminal in your desired location and running: -```sh -wget https://raw.githubusercontent.com/nymtech/nym/tree/develop/node_api_check.py - -wget https://raw.githubusercontent.com/nymtech/nym/tree/develop/api_endpoints.json -``` - -- Make executable: -```sh -chmod u+x node_api_check.py -``` - -
- -Now you are ready to check your node. - -### Usage & Commands - -- Run the program with `--help` flag to see the available commands: -```sh -./node_api_check.py --help -``` - -- Command Output: - - - -#### `query_stats` - -When you want to see all the options connected to any command, add a `--help` flag after the command of your choice. Command `query_stats` is the most useful one of this program. - -```sh -./node_api_check query_stats --help -``` - -- Command output: - - - -The most common usage may be `./node_api_check.py query_stats ` where `` is required, substitute it with node Identity Key. - -**Optional arguments** - -| Flag | Shortcut | Description | -| :--- | :--- | :--- | -| `--markdown` | `-m` | returns output in markdown format | -| `--no_routing_history` | None | returns output without routing history which can be lengthy | -| `--no_verloc_metrics` | None | returns output without verloc measurement which can be lengthy | -| `--output` | `-o` | exports output to a file, possible to add a target path | - -#### `version_count` - - -To see a quick overview of `nym-node` version distribution in numbers and graph, visit [Nym Harbourmaster](https://harbourmaster.nymtech.net). - - -Another command is `version_count` where at least one `nym-node` version is required. In case of multiple version count, separate the versions with space. We recommend to run this command with `--markdown` flag for a nicer output. This is an example where we want to look up how many registered nodes are on versions `1.1.0`, `1.1.1`, `1.1.2` and `1.1.3`: -```sh -./node_api_check version_count 1.1.0 1.1.1 1.1.2 1.1.3 --markdown -``` diff --git a/documentation/docs/pages/operators/troubleshooting/nodes.mdx b/documentation/docs/pages/operators/troubleshooting/nodes.mdx index 2838ef67305..c8e5d06b259 100644 --- a/documentation/docs/pages/operators/troubleshooting/nodes.mdx +++ b/documentation/docs/pages/operators/troubleshooting/nodes.mdx @@ -113,8 +113,6 @@ There are a few community explorers as well. Enter your **identity key** to find your node. Check the contents of the `Mixnode stats` and `Routing score` sections. -You can run [Node API Check CLI](../testing/node-api-check.mdx) to query all API endpoints of your node at once. - [Here](https://github.com/cosmos/chain-registry/blob/master/nyx/chain.json#L158-L187) is a dictionary with Nyx chain registry entry regarding all explorers. If you want more information, or if your node isn't showing up on the explorer of your choice and you want to double-check, here are some examples on how to check if the node is configured properly. @@ -345,7 +343,7 @@ In case your Gateway appeared on the [blacklist](https://validator.nymtech.net/a **What to do** -Begin with a sanity check by opening [harbourmaster.nymtech.net](https://harbourmaster.nymtech.net) and check your node there. To query all API endpoints of your node at once, you can run [Node API Check CLI](../testing/node-api-check.mdx). To see IPv4 and IPv6 routing in real time (harbourmaster can have a cache up to 90 min), run [Gateway Probe CLI](../testing/gateway-probe.mdx). +Begin with a sanity check by opening [harbourmaster.nymtech.net](https://harbourmaster.nymtech.net) and check your node there. To see IPv4 and IPv6 routing in real time (harbourmaster can have a cache up to 90 min), run [Gateway Probe CLI](../testing/gateway-probe.mdx). Then follow these steps: