As said in the article about mixnodes, NYM is a technology aiming for providing privacy for the communications.
Apart of the mixnodes, other key piece in the infrastructure are the validators.
As said, the project uses Open Source technology to run, and they have a nice docs with details on how to run a node at https://nymtech.net/docs/, and the one relevant for mixnodes at https://nymtech.net/docs/run-nym-nodes/validators/.
In this case, we can follow the instructions for compiling, but I faced some issues (compiling went fine, but initial sync failed), so in this case, we will use the pre-compiled version provided with the
Let’s now clone the repository:
1 2 3
The binaries we’re interested are inside the
validator folder, and two of them are important:
The official guide, already provides enough information about creating a systemd unit file, setting the
LD_LIBRARY_PATH environment variable in our
.bashrc, etc. So we will use them after installing the required packages:
1 2 3
Those packages will enable our system to serve secure web pages using a domain name validated with let’s encrypt.
Pay special attention to the required steps:
- Initialize the validator as described using
nymd init $SERVER --chain-id testnet-finney
wget -O $HOME/.nymd/config/genesis.json https://nymtech.net/testnets/finney/genesis.jsonto overwrite the created file with the one for
- Edit the
$HOME/.nymd/config/config.tomlfile as described (
- Edit the
$HOME/.nymd/config/app.tomlto set the proper values for
Once this is performed, initialize an user, and remember the key that you typed and of course, store the mnemonic properly.
Follow the steps on the guide for setting the systemd service so that the process starts automatically after each reboot:
systemctl enable nymd
systemctl start nymd
After a while, with the process started, you can create the validator using the command at the documentation by creating a transaction and staking (you’ll need tokens for that, and the program will ask your confirmation and password before signing and broadcasting the request).
Before it, remember to open the firewall ports:
1 2 3 4
Once it’s finished, you’re ready to run the validator as instructed in the official guide.
Once the remaining steps for setting it up have been followed, and the validator has been running for a while, you can check the obtained rewards:
Using the values obtained from previous command, you can withdraw all rewards with:
If you want to check your current balances, check them with:
1 2 3 4 5 6 7 8
You can, of course, stake back the available balance to your validator with the following command:
The value to be used instead of the
<amount>stake can be calculated from the available balance. For example, if you’ve
999989990556 in the balance, you can stake
999909990556, note that the 5th digit, has been changed from
0 to leave some room for fees (amounts are multiplied by 10^6).
Remember to replace
halvaloper with your validator address and
nym-admin with the user you created during initialization.
Additionally you can also fix some of the data provided for your validator with:
With above command you can specify the
gpg key last numbers (as used in
keybase) as well as validator details and your email for security contact