😎
Nodes & Validators
  • About Me
  • DISCLAIMER
  • NODES
    • X1
    • NYM
    • MUON/PION
    • LAVA
    • POWERLOOM
    • XAI
    • QUAI
    • TAIKO (HEKLA TestNet)
    • FLEEK
    • GELIOS
    • CELESTIA
    • IronFish
    • Koii
    • NIM
    • EIGENLAYER
  • STAKING
  • MINERS
    • X1/XEN
    • XAI
    • QUAI
  • AIRDROP
    • X1
    • XAI
    • POWERLOOM
  • WALLETS
    • ZERION
    • TRUST WALLET
    • METAMASK
  • Blockchain Explorers
    • X1
    • NYM
    • MUON / PION
    • LAVA
Powered by GitBook
On this page
  • Building from Source
  • Building Nym
  • Prerequisites
  • Download and build Nym binaries
  • Mix Nodes
  • Current version
  • Preliminary steps
  • Mix node setup
  • Node Description (optional)
  • Running your Mix Node
  • Bonding your Mix Node
  • Node Families
  • Checking that your node is mixing correctly
  • Maintenance
  1. NODES

NYM

PreviousX1NextMUON/PION

Last updated 1 year ago

NYM is a privacy-focused blockchain aiming to provide anonymity and privacy to normal people in the age of blockchain and AI.

  1. HARDWARE REQUIREMENTS

We will need to rent a VPS or a dedicated bare metal host to run your node on. One key reason for this is that your node must be able to send TCP data using both IPv4 and IPv6 (as other nodes you talk to may use either protocol).

For the moment, we haven’t put a great amount of effort into optimizing concurrency to increase throughput, so don’t bother provisioning a beastly server with multiple cores. This will change when we get a chance to start doing performance optimizations in a more serious way. Sphinx packet decryption is CPU-bound, so once we optimize, more fast cores will be better.

For now, see the below rough specs:

  • Processors: 2 cores are fine. Get the fastest CPUs you can afford.

  • RAM: Memory requirements are very low - typically a mix node may use only a few hundred MB of RAM.

  • Disks: The mixnodes require no disk space beyond a few bytes for the configuration files.

  • RAM: Memory requirements depend on the amount of users your Gateway will be serving at any one time. If you’re just going to be using it yourself, then minimal RAM is fine. If you’re running your Gateway as part of a Service Grant, get something with at least 4GB RAM.

  • Disks: much like the amount of RAM your Gateway could use, the amount of disk space required will vary with the amount of users your Gateway is serving. If you’re running your Gateway as part of a Service Grant, get something with at least 40GB storage.

  1. OPERATING SYSTEM REQUIREMENT

Ubuntu 22.04.4 LTS (for long-term support)

  1. NYM STAKING REQUIREMENT

If you don’t already have one, please create a Nym address using the wallet, and fund it with tokens. The minimum amount required to bond a mix node is 100 NYM, but make sure you have a bit more to account for gas costs.

Remember that you can only use Cosmos NYM tokens to bond your mix node. You cannot use ERC20 representations of NYM to run a node.

  1. NYM MIXNODE pre-requisites and INSTALLATION steps (we are excluding NYM GATEWAYS for now)

Nym runs on Mac OS X, Linux, and Windows. All nodes except the Desktop Wallet and NymConnect on Windows should be considered experimental - it works fine if you’re an app developer but isn’t recommended for running nodes.

Nym has two main codebases:

  • Debian/Ubuntu: pkg-config, build-essential, libssl-dev, curl, jq, git

apt install pkg-config build-essential libssl-dev curl jq git
  • Arch/Manjaro: base-devel

pacman -S base-devel
  • Mac OS X: pkg-config , brew, openss1, protobuf, curl, git Running the following the script installs Homebrew and the above dependencies:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Rust & cargo >= 1.66

The following commands will compile binaries into the nym/target/release directory:

rustup update
git clone https://github.com/nymtech/nym.git
cd nym

git reset --hard # in case you made any changes on your branch
git pull # in case you've checked it out before

git checkout master # master branch has the latest release version: `develop` will most likely be incompatible with deployed public networks

cargo build --release # build your binaries with **mainnet** configuration

Quite a bit of stuff gets built. The key working parts are:

The repository also contains Typescript applications which aren’t built in this process. These can be built by following the instructions on their respective docs pages.

You cannot build from GitHub’s .zip or .tar.gz archive files on the releases page - the Nym build scripts automatically include the current git commit hash in the built binary during compilation, so the build will fail if you use the archive code (which isn’t a Git repository). Check the code out from github using git clone instead.

Any syntax in <> brackets is a user’s unique variable. Exchange with a corresponding name without the <> brackets.

1.1.36

The nym-mix node binary is currently one point version ahead of the rest of the platform binaries due to a patch applied between releases.

To begin, move to /target/release directory from which you run the node commands:

cd target/release

You can check that your binaries are properly compiled with:

./nym-mixnode --help

Which should return a list of all available commands.

Console output

You can also check the various arguments required for individual commands with:

./nym-mixnode <COMMAND> --help

Adding --no-banner startup flag will prevent Nym banner being printed even if run in tty environment.

To check available configuration options for initializing your node use:

./nym-mixnode init --help
Console output

Initialise your Mix Node with the following command, replacing the value of --id with the moniker you wish to give your Mix Node. Your --host must be publicly routable on the internet in order to mix packets, and can be either an Ipv4 or IPv6 address. The $(curl -4 https://ifconfig.me) command returns your IP automatically using an external service. If you enter your IP address manually, enter it without any port information.

./nym-mixnode init --id <YOUR_ID> --host $(curl -4 https://ifconfig.me) 

If <YOUR_ID> was my-node, the output will look like this:

Console output

The init command will refuse to destroy existing Mix Node keys.

During the init process you will have the option to change the http_api, verloc and mixnode ports from their default settings. If you wish to change these in the future you can edit their values in the config.toml file created by the initialization process, which is located at ~/.nym/mixnodes/<YOUR_ID>/.

In order to easily identify your node via human-readable information later on, you can describe your Mix Node with the following command:

./nym-mixnode describe --id <YOUR_ID>

Node description is a short text that describes your node. It is displayed in the ./nym-mixnode list command and in the ./nym-mixnode node-details --id <YOUR_ID> command. It also shows up in the node explorer to let people know what your node is about and link to your website.

You can set your node description, by creating a file called description.toml and put it in the same directory as your config.toml file (~/.nym/mixnodes/<YOUR_ID>/config/description.toml). The file should look like this example:

name = "Winston Smith"
description = "I am the Sphinx"
link = "https://nymtech.net"
location = "Giza, Egypt"

Remember to restart your nym-mixnode process in order for the new description to be propagated.

Run your Mix Node with:

./nym-mixnode run --id <YOUR_ID>

Have a look at the saved configuration files in $HOME/.nym/mixnodes/ to see more configuration options.

Caution

From v1.1.3, if you unbond your Mix Node that means you are leaving the mixnet and you will lose all your delegations (permanently). You can join again with the same identity key, however, you will start with no delegations.

To initialise, run and bond your Mix Node are the minimum steps to do in order for your Mix Node to work. However we recommend to do a few more steps before bonding. These steps will make it easier for you as a node operator on a long run as well as for others to possibly delegate Nym tokens to your Mix Node. These steps are:

You can bond your Mix Node via the Desktop wallet.

  • Open your wallet, and head to the Bond page, then select the node type Mixnode and input your node details. Press Next.

  • Enter the Amount, Operating cost and Profit margin and press Next.

  • You will be asked to run a the sign command with your mixnode - copy and paste the long signature as the value of --contract-msg and run it.

./nym-mixnode sign --id <YOUR_ID> --contract-msg <PAYLOAD_GENERATED_BY_THE_WALLET>

It will look something like this:

Console output
  • Copy the resulting signature:

# >>> The base58-encoded signature is:
2bbDJSmSo9r9qdamTNygY297nQTVRyQaxXURuomVcRd7EvG9oEC8uW8fvZZYnDeeC9iWyG9mAbX2K8rWEAxZBro1
  • And paste it into the wallet nodal, press Next and confirm the transaction.

  • Your node will now be bonded and ready to mix at the beginning of the next epoch (at most 1 hour).

You are asked to sign a transaction on bonding 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.

Note that your node’s public identity key is displayed during startup, you can use it to identify your node in the list.

Node family involves setting up a group of Mix Nodes that work together to provide greater privacy and security for network communications. This is achieved by having the nodes in the family share information and routes, creating a decentralized network that makes it difficult for third parties to monitor or track communication traffic.

To create a Node family, you will need to install and configure multiple Mix Nodes, and then use the CLI to link them together into a family. Once your Node family is up and running, you can use it to route your network traffic through a series of nodes, obscuring the original source and destination of the communication.

Change directory by cd <PATH>/<TO>/<THE>/<RELEASE> and run the following on the family head to obtain the signature for the member:

./nym-mixnode sign --id <YOUR_ID> --text <TEXT>
Console output

Using nym-cli:

--mnemonic is the mnemonic of the member wanting to be the head of family.

/nym-cli cosmwasm execute <WALLET_ADDRESS> '{"create_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>","owner_signature":"<NODE_OWNER_SIGNATURE>","label": "<NODE_LABEL>"}}' --mnemonic <MNEMONIC_FROM_THE_NODE_TO_THE_HEAD>

Using nyxd:

--from is mnemonic of the member wanting to join the family.

./nyxd tx wasm execute ${MIXNET-CONTRACT} '{"join_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>"}}' --node ${VALIDATOR-ENDPOINT} --from mix1 --chain-id nyx --gas-prices 0.025unym --gas auto --gas-adjustment 1.3 -y -b block

To get the node owner signature, use:

./nym-mixnode node-details --id <NODE_ID>

Change directory by cd <PATH>/<TO>/<THE>/<RELEASE> and run the following on the family head to obtain the signature for the member:

./nym-mixnode sign --id <YOUR_ID> --text <TEXT>
Console output

Using nym-cli:

./nym-cli cosmwasm execute <WALLET_ADDRESS> '{"join_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>","owner_signautre": "<OWNER_SIGNATURE_FROM_NODE_TO_JOIN>", "label":"<NODE_TO_JOIN_LABEL>"}}'  --mnemonic <MNEMONIC_FROM_NODE_TO_JOIN>

Using nyxd:

./nyxd tx wasm execute ${MIXNET-CONTRACT} '{"join_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>"}}' --node ${VALIDATOR-ENDPOINT} --from mix1 --chain-id nyx --gas-prices 0.025unym --gas auto --gas-adjustment 1.3 -y -b block

To get the node owner signature, use:

./nym-mixnode node-details --id <NODE_ID>

If wanting to leave, run the same initial command as above, followed by:

Using nym-cli:

./nym-cli cosmwasm execute <WALLET_ADDRESS> '{"leave_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>","owner_signautre": "<OWNER_IGNATURE_FROM_NODE_TO_LEAVE>"}}'  --mnemonic <MNEMONIC_FROM_NODE_TO_LEAVE>

Using nyxd:

./nyxd tx wasm execute ${MIXNET-CONTRACT} '{"join_family": {"signature": "<base58-encoded-signature>","family_head": "<TEXT>"}}' --node ${VALIDATOR-ENDPOINT} --from mix1 --chain-id nyx --gas-prices 0.025unym --gas auto --gas-adjustment 1.3 -y -b block

Once you’ve started your Mix Node and it connects to the validator, your node will automatically show up in the ‘Mix Nodes’ section of either the Nym Network Explorers:

Enter your identity key to find your node. There are numerous statistics about your node on that page that are useful for checking your up-time history, packets mixed, and any delegations your node may have.

Before you initialise and run your mix node, head to the NYM and download the Nym wallet for your operating system. If pre-compiled binaries for your operating system aren’t available, you can build the wallet yourself with instructions .

NYM can be purchased via Bity from the wallet itself with BTC or fiat, and is currently present on several .

the , written in Rust. This contains all of our code except for the validators.

the , written in Go.

This page details how to build the main Nym platform code. If you want to build and run a validator, instead.

We recommend using the . Installing cargo from your package manager (e.g. apt) is not recommended as the packaged versions are usually too old.

If you really don’t want to use the shell script installer, the contain instructions for many platforms.

: nym-mixnode

: nym-gateway

: nym-client

: nym-socks5-client

: webassembly-client

: nym-network-requester

: nym-cli

: nym-api

The Nym Mix Node binary was built in the section. If you haven’t yet built Nym and want to run the code, go there first.

Make sure you do the preparation listed in the before setting up your Mix Node.

Now that you have built the , set up your , and have a VPS with the nym-mix node binary, you can set up your Mix Node with the instructions below.

Set the , in case you haven’t automated with

This image is just an example, copy-paste your own base58-encoded signature

If everything worked, you’ll see your node running on the either the or the , depending on which network you’re running.

If you want to bond your Mix Node via the CLI, then check out the docs.

You can use either nym-cli which can be downloaded from the or compiling nyxd.

There are also 2 community explorers which have been created by :

For more details see

For Mix Node upgrade, firewall setup, port configuration, API endpoints, VPS suggestions, automation and more, see the

For mix node
For Gateway
website
here
exchanges
Building from Source
Building Nym
Nym platform
Nym validators
go here
Prerequisites
Rust shell script installer
Rust installation docs
Download and build Nym binaries
mix node
gateway node
websocket client
socks5 client
webassembly client
network requester
nym-cli tool
nym-api
Nym Wallet
Nym Connect
Network Explorer UI
Mix Nodes
building nym
Current version
Preliminary steps
preliminary steps page
Mix node setup
codebase
wallet
Viewing command help
Initialising your Mix Node
Node Description (optional)
Running your Mix Node
Bonding your Mix Node
Describe your Mix Node
Configure your firewall
Automate your Mix Node
ulimit
systemd
Bond via the Desktop wallet (recommended)
Sandbox testnet network explorer
mainnet network explorer
Bond via the CLI (power users)
relevant section in the Nym CLI
Node Families
Create a Node Family
release page
Joining a Node Family
Leaving a family
Checking that your node is mixing correctly
Network explorers
Mainnet
Sandbox testnet
Nodes Guru
Mainnet
Sandbox testnet
Troubleshooting FAQ
Maintenance
maintenance page