Files
nym/documentation/docs/pages/operators/nodes/nym-node/bonding.mdx
T
import this cba35a7523 [new-docs/operators] : Fix callout syntax (#5006)
* fix callout syntax from color to type

* correct callout from danger to warning
2024-10-24 13:58:38 +02:00

101 lines
4.8 KiB
Plaintext

import { Callout } from 'nextra/components';
import { Tabs } from 'nextra/components';
import { VarInfo } from 'components/variable-info.tsx';
import { Steps } from 'nextra/components'
# Bonding Nym Node
<Callout type="warning" emoji="⚠️">
To you unbond your Nym Node means you are leaving Nym network and you will lose all your delegations (permanently). You can join again with the same identity key, however, you will start with **no delegations**.
</Callout>
Nym Mixnet operators are rewarded for their work every epoch (60 minutes). To prevent centralisation, [Nym API](../validator-setup/nym-api.mdx) is ran by distributed validators on Nyx blockchain.
You are asked to `sign` a transaction and bond your node to Nyx blockchain so that the Mixnet smart contract is able to map your nym address to your node. This allows us to create a nonce for each account and defend against replay attacks.
**Before you bond your `nym-node` make sure you went through all the previous steps**
1. [Build](../../binaries/building-nym.mdx) or [download](../../binaries/pre-built-binaries.mdx) `nym-node` binary
2. [Configure VPS]( ../preliminary-steps/vps-setup.mdx) correctly
3. [Prepare Nym wallet](../preliminary-steps/wallet-preparation.mdx)
4. [Setup & Run](setup.mdx) the node
5. [Configure your node](configuration.mdx)
<Callout type="warning" emoji="⚠️">
Do not bond your node to the API if the previous steps weren't finished. Bad connectivity, closed ports, or other poor setup will result in your node getting blacklisted.
</Callout>
## Bond via the Desktop wallet (recommended)
You can bond your `nym-node` via the Desktop wallet.
<Steps>
###### 1. Insert bonding information
- Open your wallet, and head to the `Bond` page, then select the node type `Mixnode` and input your node details. Press `Next`.
- To find out your `nym-node` details, run this command in your VPS:
```sh
./nym-node bonding-information --id <ID>
```
- To get a correct host address, run this command in your VPS
```sh
echo "$(curl -4 https://ifconfig.me)"
```
###### 2. Bond to correct ports
- In your wallet: Open the box called `Show advanced options` and make sure all your ports are set correctly, like the values in this table:
| Node type | Port name | Correct port value |
| :-- | :-- | :-- |
| Mixnode | Mix port | `1789` |
| Mixnode | Verloc port | `1790` |
| Mixnode | HTTP api port (picture below) | `8080` |
| Gateway (entry & exit) | Mix port | `1789` |
| Gateway (entry & exit) | Client WS API port | `9000` |
- If you bonding `nym-node --mode mixnode` through *Bond mixnode* desktop wallet menu, change manually *HTTP api port* value from deprecated `8000` to `8080` - a generic `nym-node` HTTP port (for all modes).
![](/images/operators/wallet-screenshots/new_http_port.png)
###### 3. Enter your values and sign with your node
- Enter the `Amount`, `Operating cost` and `Profit margin` and press `Next`
<Callout type="warning" emoji="⚠️">
If you are part of [Nym Delegation Program](https://delegations.explorenym.net) or Service Grants Program, make sure your values are within the [rules](https://forum.nymtech.net/t/nym-delegations-program-update/466) of the programs. Operators setting up larger OP or PM than defined in the rules will be excluded from the program without prior warning!
</Callout>
- You will be asked to run a `sign` command with your `nym-node` - copy and paste the long signature as the value of `--contract-msg` and sing it on your VPS:
```sh
./nym-node sign --contract-msg <PAYLOAD_GENERATED_BY_THE_WALLET>
```
- Copy the resulting signature string and paste it into the wallet nodal, press `Next` and confirm the transaction:
```sh
# This is just an example, copy the one from your process
>>> The base58-encoded signature is:
2bbDJSmSo9r9qdamTNygY297nQTVRyQaxXURuomVcRd7EvG9oEC8uW8fvZZYnDeeC9iWyG9mAbX2K8rWEAxZBro1
```
![Paste Signature](/images/operators/wallet-screenshots/wallet-sign.png)
*This image is just an example, copy-paste your own base58-encoded signature*
</Steps>
Your node will now be bonded and ready to receive traffic, latest at the beginning of the next epoch (at most 1 hour).
If everything worked, you'll see your node running on the either the [Sandbox testnet network explorer](https://sandbox-explorer.nymtech.net) or the [mainnet network explorer](https://explorer.nymtech.net), depending on which environment you're running.
## Bond via the CLI (power users)
If you want to bond your Mix Node via the CLI, then check out the [relevant section in the Nym CLI](https://nymtech.net/docs/tools/nym-cli.html#bond-a-mix-node) docs.