NG
Nym

Nym

Setup Guide

This guide covers installation of Nym mixnode for the Mainnet

!!!!!! YOU MUST SAVE YOUR KEYS FILES FROM ~/.nym/mixnodes/<your_id>/data (four .pem files) IN SAFE PLACE! And wallet mnemonic phrase.

Installing

Replace YOUR_WALLET with your Nym Mainnet wallet address.

wallet=YOUR_WALLET
echo 'export wallet='$wallet >> $HOME/.bash_profile

Nym-0
Use our script for a quick installation:

wget -O nym_mainnet.sh https://api.nodes.guru/nym_mainnet.sh && chmod +x nym_mainnet.sh && ./nym_mainnet.sh

Open Nym Wallet App. Log in with the mnemonic phrase or with password.
Go to the Bond wallet section and fill out all the lines, the data for filling can be found by running the command:

. $HOME/.bash_profile
nym-mixnode node-details --id $node_id

Nym-1
Nym-2
Nym-3
Nym-4
Replace YOUR_IDENTITY_KEY with the key obtained above:

nym-mixnode sign --id $node_id --contract-msg YOUR_IDENTITY_KEY

Nym-5
Nym-6
Nym-7
Press Confirm, everything should go without errors. If all went well you should get this result
Nym-8
Let’s get back to terminal and check when your node starts mixing packets.
Command to check:

journalctl -u nym-mixnode -o cat | grep "Since startup mixed" 

Nym-9
1.5 Make sure you have your ports open: 1789, 1790, 8000 (and 443, 22, 80) for correct operation and rewards. More info about ports in official docs.
If everything goes correctly, your node will appear in NG Mixnet Explorer

DELEGATION

To delegate, you need to open a wallet and select Delegate, do not forget to leave a coin for the commission.
Mixnode Identity – Identity key of mixnode to delegate to (Nodes.Guru mixnode 8D5QgyAGqCgChDCxMqQKZpYPNb8hpDNQS43eBJUWagnW)
Amount to delegate – amount of tokens to delegate
Click DELEGATE STAKE.

Nym-10You can check your delegation in the list of that mixnode you delegate to at NG Mixnet Explorer

Useful commands

Describe your mixnode(the name that will be displayed in the explorer):

nym-mixnode describe --id $node_id
systemctl restart nym-mixnode

Check how many packets your node mixed:

journalctl -u nym-mixnode -o cat | grep "Since startup mixed" | tail -1

Restart your node:

systemctl restart nym-mixnode

Updating a node to the latest release.
After updating, be sure to indicate the new version of the mixnode in your wallet!

wget -O nym_update.sh https://api.nodes.guru/nym_update.sh && chmod +x nym_update.sh && ./nym_update.sh

Extend ulimit (important for mixnode’s health in future):
– oneliner autoscript

wget -O nym_ulimit.sh https://api.nodes.guru/nym_ulimit.sh && chmod +x nym_ulimit.sh && ./nym_ulimit.sh

– commands for manual change

echo "DefaultLimitNOFILE=65535" >> /etc/systemd/system.conf
sudo systemctl daemon-reload
sudo systemctl stop nym-mixnode
sudo systemctl start nym-mixnode

Check that ulimit has changed to 65535

grep -i "Max open files" /proc/$(ps -A -o pid,cmd|grep nym-mixnode | grep -v grep |head -n 1 | awk '{print $1}')/limits

Ipv6 checks
See whats your external ipv6:

curl http://v4v6.ipv6-test.com/api/myip.php && echo

Check connection via ipv6 to google.de:

ping6 www.google.de

Check if you got ipv6 on your network settings:

hostname -I

Decypher your public Identity and Sphinx keys:
Run commands (snapd may be installed differently on your OS):

apt install snapd
snap install base58
ls -1 $HOME/.nym/mixnodes/*/data/public_identity.pem | while read F; do echo === $F ===; grep -v ^- $F | openssl base64 -A -d | base58; echo; done
ls -1 $HOME/.nym/mixnodes/*/data/public_sphinx.pem | while read F; do echo === $F ===; grep -v ^- $F | openssl base64 -A -d | base58; echo; done

Delete node:

sudo systemctl stop nym-mixnode
sudo systemctl disable nym-mixnode
rm -rf ~/nym ~/.nym
rm -f /etc/systemd/system/nym-mixnode.service
rm -f /usr/bin/nym-mixnode

Troubleshooting

If you still got problems with node (for example ‘could not create TCP Listener’; or mixed packets are still 0 after 10 minutes of running), check the following:
1) is TCP 1789 port opened on server?
2) is TCP 1789 port opened for inbound and outbount on Firewall at your server control panel (website)?
3) If you use Google Cloud, AWS, run node on hostings outside those NodesGuru recommend, or even run it at desktop or virtual machine:
4.1) check that you got static ip
4.2) check official docs about custom –init and how to set internal/external ips as host/announce host
4.3) make sure you put external ip in Bond form

Undelegate NYM tokens from the mixnode via cli, NOT REQUIRED FOR MIXNODE OPERATORS.

Binary installation:

wget -q -O nyx.sh https://api.nodes.guru/nyx.sh && chmod +x nyx.sh && sudo /bin/bash nyx.sh && source ~/.bash_profile

Restore Wallet:

nyxd keys add wallet --recover

Tokens undelegation. Replace only $MIX_ID with the Mix ID of the mixnode you delegated to, don’t change anything else:

nyxd tx wasm execute n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0cznr '{"undelegate_from_mixnode":{"mix_id":"$MIX_ID"}}' --from wallet --fees=50000unym --chain-id nyx --broadcast-mode block --note "undelegating through NG" --node https://rpc-1.nyx.nodes.guru:443/ --gas=auto --gas-adjustment 1.4

Full command example:

nyxd tx wasm execute n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0cznr '{"undelegate_from_mixnode":{"mix_id":10}}' --from wallet --fees=50000unym --chain-id nyx --broadcast-mode block --note "undelegating through NG" --node https://rpc-1.nyx.nodes.guru:443/ --gas=auto --gas-adjustment 1.4
Stuck? Ask!

By continuing to use our website, you consent to our use of cookies in accordance with our cookie policy