Editor’s notes: this article was originally authored by NKN Community member ChrisT, published on Medium: https://medium.com/nknetwork/nkn-mining-faq-7182f01fb5b4
NKN Mining FAQ
From the beginning of the NKN testnet till today there was an amazing number of community members successfully implementing and maintaining their own node. Many questions were asked, all of them were answered.
Because of this I decided to write down a comprehensive FAQ to get all of your questions covered. This article will be maintained actively so new questions are added regularly.
General
How can I mine in NKN testnet?
Can I earn money by setting up a node in NKN testnet?
Of course you can! By participating in NKN testnet with your personal node you will earn tNKN tokens. tNKN tokens will get exchanged at a given ratio upon mainnet launch. However the team sometimes run community incentive programs for early redemption.
How much money I will earn by running a node in NKN testnet?
That depends on many things: Costs for running a node, network availability or number of participants in the NKN testnet.
But one thing is worth mentioning: The NKN team plan to adjust the conversion ratio between tNKN and NKN on each redemption so that it will reflect the latest token price and mining cost, in order to continuously incentivize the mining community.
I got a natted IP (that means that your Provider only gives you an IPv6 address and no IPv4 address). Can I set up a miner?
At the moment it is not possible to run a NKN node through a natted IPv6 address. The problem here is that NKN will only run with IPv4 or IPv6. Since IPv6 is not the most common protocol IPv4 was choosen.
Many ISPs offer you a private IPv4 address — so it is worth asking them.
Is there any tutorial how to set up a NKN node?
Sure there is:
- Complete Linux and VPS with autoupdate and restart function: Setting up a NKN Miner in 5 Minutes and run it free for 2 months with DigitalOcean
- Video tutorial to quick — set up a node: https://youtu.be/NEoshg_jf4I
- Raspberry pi: Make your own NKM (New Kind of Miner) out of a Raspberry pi
- Windows 7 and 10: How to set up a NKN Miner on Windows 10 and run it as an automatic service
I don’t like typing in stupid commands into a terminal — Is there an easier way of running NKN?
Yes, there is! Digital Ocean got a pre-configured NKN server for you: One-Click to build a New Kind of Network node on DigitalOcean
And guess what? Google has it too: Deploy NKN Full Node from Google Cloud Marketplace — Okay, you got me, Amazon is also on board: NKN launches 1-click Full Node on AWS Marketplace
Also there is an GUI mining tool available: https://github.com/nknorg/nkn-mining
Just use the “How to use” section and you’re fine. You can download the latest release from https://github.com/nknorg/nkn-mining/releases
How many resources does a node need (memory, bandwidth, cpu)?
A NKN node requires at least 1GB RAM (on 1GB you should install a swap space) and a decent CPU (a raspberry pi is enough). Make sure your node has good latency — nodes with lower latency are preferred for relaying, thanks to proximity routing, hence you’ll earn more.
Can i use one wallet for many nodes?
Yes, you can. Just copy your wallet.dat file (or copy the contents to a new file) with scp or a sftp program like FileZilla from one node to another, use the same password and start the node — done!
VPS users can also just clone their existing server as well.
Where can I monitor my nodes?
A very neat tool for that is https://nknx.org. If you create an account you can add all your nodes to the Node Manager, see their status and tell NKNx to send you an eMail if anything goes wrong.
My node shows “SyncStarted” or “WaitForSyncing” for more than 30 minutes and seems to be stuck. What can I do?
Don’t panic! In the most cases you just have to reset your Chain and replace it with a current snapshot. You can find how to do that in the CLI miner section.
Where can I see that my node is working?
The easiest way is to add your node to https://nknx.org — the Node Manager will tell you if something’s wrong. If you decide to monitor it manually there are some things to look for:
- A running node should always be in the state
PersistFinished
orSyncStarted
- A running node should steadily increase it’s block height until it reaches the current network block height
- A running node should be reachable over port 30001, 30002 and 30003. You can use a tool like this to check it.
My nodes are working like a charm but it seems like I’m not getting the amount of testnet tokens that is expected — is there something wrong?
The NKN network uses different techniques by selecting the fastest relay-path to the destination address. Currently it gets heavily tested and analysed.
Or in short — You didn’t do anything wrong, the devs are investigating this.
WEN BINANCE?!
Really…?
CLI miner (https://github.com/nknorg/nkn)
How can I update my node?
For everyone who followed my tutorials (above) you just have to wait. The update script will take care of it. If you are not willing to wait just connect to your node and run:
sudo ./nkn-updater
If you didn’t install the auto updater you can also do the update by hand:
cd ~/go/src/github.com/nknorg/nkn
sudo systemctl stop nkn.service
git pull
make deepclean
make vendor
make
sudo systemctl start nkn.service
if you not followed any tutorials you’re probably smart enough to find it out by yourself
How do I replace my chain file with a snapshot?
For everyone who followed my tutorials (above) here is how to do it:
If it’s the first time you’re resetting your Chain you maybe have to run
sudo apt-get install unzip
to get started.
First of all check our Telegram channel #testnet. In the pinned message you can find the announcement of the current snapshot file
In this case the snapshot file is https://storage.googleapis.com/nkn-testnet-snapshot/Chain_567511.zip. Copy it — we will need it in a few seconds. Now let’s head back to the command line:
cd ~/go/src/github.com/nknorg/nkn
sudo systemctl stop nkn.service
rm -R Chain
wget https://storage.googleapis.com/nkn-testnet-snapshot/Chain_567511.zip
unzip Chain_567511.zip && rm Chain_567511.zip
sudo systemctl start nkn.service
That’s it. Your node has now been resetted to the snapshot height and will begin to sync shortly.
For the ones who didn’t follow any tutorial the above commands are pretty much the same. You maybe have to adjust the folder names to your needs.
Make vendor fails with the error “Unable to update repository: exit status 255” or “Unable to update checked out version: exit status 128”. Help?
Actually that is no problem of NKN itself — it is a problem with the packet manager it is using. Resetting the glide files should fix your problems:
sudo rm -rf /home/*/.glide
after that you have to reinstall it of course:
make glide
Now you can run “make vendor” again.
My miner shows many errors while running? What’s wrong?
Most of the errors the NKN node throws are 99% irrelevant and only for development purposes — so you can ignore it.
GUI miner (https://github.com/nknorg/nkn-mining)
How can I update my node?
The GUI miner updates the mining software automatically. You don’t have to take care of it.
How can I update the GUI Miner Webinterface?
The GUI Miner Webinterface is the visual part of the GUI miner (the website you’re opening in your browser). That part doesn’t update by itself. You have to get the latest release (https://github.com/nknorg/nkn-mining/releases) and replace the old files to update it.
NKNx
The NKNx node manager responds “Ports not opened” if I try to add my node. What’s wrong?
Well, obviously the ports are not opened or forwarded correctly. NKNx checks them on adding. If you’re on a private machine check https://portforward.com/ to get help. When you’re on a VPS you should check the VPS-Section.
VPS
I tried to add my node to NKNx but it says “Ports not opened” — what can I do?
That depends on which VPS you’re on.
- Digitalocean doesn’t need any port forwarding
- Google cloud needs a little bit of configuration — check this
Other questions
I can’t find my problem in this FAQ — who can help me?
In this case we highly recommend you our discord server. The channels #gui-miner and #testnet are the right place to be.
If you got further questions jump into our discord or use our social media channels to tell the whole world about NKN!
Home: https://nkn.org/
Email: [email protected]
Telegram: https://t.me/nknorg
Twitter: https://twitter.com/NKN_ORG
Medium: https://medium.com/nknetwork
Linkedin: https://www.linkedin.com/company/nknetwork/
Github: https://github.com/nknorg
Reddit: https://www.reddit.com/r/nknblockchain
Discord: https://discord.gg/yVCWmkC
YouTube: http://www.youtube.com/c/NKNORG