NKN Mining Guide for Mainnet: wiki version

NKN%20Mining%20Machine

Welcome newcomers

Mining can sound daunting for newcomers, especially when you hear about the expensive ASIC based Bitcoin mining machines or very high end cloud servers needed for other leading blockchain projects.

Fear no more, NKN mining software requires inexpensive computers (home routers or network hard disks, old laptops, and $5 virtual machines on cloud) and are super easy to run for non-technical person. We created true 1-clicks, Web user interfaces, and automated scripts to make it easy, super easy.

If you are a NKN testnet veteran, you can safely skip this chapter and proceed directly to the next chapter.

What is NKN mining?

In blockchain world, mining simply means doing some useful work to earn cryptocurrency or tokens. For NKN, miner earns NKN tokens by sharing their network connection and relaying data. In addition, miners work together to ensure the network is safe and secure. So miner’s role is crucial for the NKN ecosystem.

Is it profitable?

Maybe, it depends on a few factors:

  • NKN token price
  • How many nodes are actively mining at the moment
  • Your cost of running the node
  • Your luck

The rate NKN tokens are being mined is constant for each year, and they are shared by all the mining nodes on the network.

The good news is that there is zero cost to try out NKN mining: most cloud providers has free trial credits ($100-$300); or if you mine from home, you can re-use idle or old computers. After the free credits are used up, you can make your own calculations if it is profitable for you or not.

Do I need to stake or own NKN to mine?

No. You can start a NKN full node to mine without owning any NKN.

What kind of computer do I need to mine?

To mine, you need to run a NKN software called full node software on a computer that has an Internet connection. There are some basic requirements on the computer:

  • Has a minimum of 512MB of RAM (1GB is recommended)
  • Has a minimum of 16GB of disk (25GB or more is recommended)
  • Most CPU (Intel, AMD, ARM, MIPS) will work
  • Have a fast Internet connection (>10Mbps) is important
  • You have either a public IPv4 address or are able to configure port forwarding on your router (TCP/UDP ports 30001-30003)

It can be one of the following:

  • A cloud virtual machine from any cloud service providers: we officially support DigitalOcean, Google Cloud Platform, AWS; but many of our community members successfully run their nodes on all kind of cloud computing providers.
  • A home computer: desktop of laptop, Windows or Mac or Linux
  • A home embedded device such as a Raspberry Pi, WiFi router, Network Attached Storage (Network Disk), or a TV box

I’m a newbie, what is the easiest way to mine?

The easiest ways at the moment are:

  1. 1-click cloud deployment (see the chapter on “Mining on cloud computer”)
  2. “Fast Deploy” from nknx.org (see next section)

nknx.org and “Fast Deploy”

nknx.org, a community project, has recently implemented “Fast Deploy” method. By using a single line of script (copy pasted into your computer’s command line), you can deploy NKN nodes software on cloud machines or home computers, and automatically registered on nknx.org for monitoring.

Here is a recent step-by-step experience of “Fast Deploy” for a home Raspberry Pi computer:

I’m stuck, who can help me?

If you cannot find the answer in this FAQ, here are some very useful resources:

  1. Search our https://forum.nkn.org/c/nodes-mining for related posts. And if you cannot find anything related to your problem, you can ask a question by creating a post on the forum. This is recommended, since future newcomers will benefit from the knowledge we accumulate in the forum.
  2. Join our Discord #mainnet channel https://discord.gg/yVCWmkC, ask a question, and mostly likely someone will answer. This is ad hoc support by NKN dev team and community, so please be patient if you don’t get near real-time responses.

Welcome back: testnet veterans

What has changed since testnet?

A lot! You might want to check our release note for v1.0 as well as subsequent releases.

One relevant change is that you can no longer use the same wallet across many mining nodes. Each mainnet mining node needs its unique wallet. To simplify management, we introduced BeneficiaryAddress so mining rewards from many mining nodes can automatically deposited into one single beneficiary wallet. This also increases security of miner’s mining rewards. All the new instructions, 1-clicks, and Fast Deploy will show your how to configure the BeneficiaryAddress.

Can I upgrade from testnet node to mainnet?

It is certainly feasible for 1-click cloud images, but we do not recommend it. The reasons are simple:

  • Mainnet is significantly different from testnet, and incompatible
  • Wallet, blockchain data, and a lot more have changed since testnet
  • You node most likely will need an Operating System upgrade and thorough security patch anyway

Mining on cloud machines

1-click cloud deployment is one of the signatures of NKN, since we pioneered it since February 2019. All you need to do is to register an account in one of three leading cloud platforms, follow our links or search for NKN in their marketplace, and follow the instructions there.

Summary of all three cloud platforms updated for NKN mainnet:

Most cloud providers has free trial credits, so there is zero cost to try out NKN mining

  • DigitalOcean provide $100 credit for three months via referral link
  • Google Cloud Platform provides $300 credit for 12 months
  • AWS provide 1 free T2-Micro virtual machine for 12 months

DigitalOcean (DO)

Google Cloud Platform (GCP)

Amazon Web Service (AWS)

Mining at home

Mining at home is probably the most economic way to run NKN, since you have already paid for your Internet connection and can reuse some of the computers at home you don’t use. For most people, there is almost zero monthly cost to run a NKN node at home.

Public IPv4 address and port forwarding

There are some limitations of mining at home, since each NKN mining node needs a unique public IP address.

  • If your router does not support uPnP, then you need to configure port forwarding to make NKN software working. You need to be able to log into your router and configure port forwarding for 30001-30003 (TCP and UDP). And because there are hundreds of different types of routers out there, there is no standard way to log in and configure them.
  • Most home Internet Service Providers only give home users 1 public IP address per household, so technically you cannot run more than 1 NKN node.

You can use this tool to check your public IP address and if the ports are open or not:

https://www.yougetsignal.com/tools/open-ports/

And here are some general guides on how to configure port forwarding in leading brands of home routers:


https://portforward.com/router.htm

I have an extra computer at home, how I can I mine?

Since mainnet release v1.1, a built-in Web-UI simplifies monitoring and configuration for miners. Here are the step by step guides for Windows, Mac, and Linux on your home computers:

Mac and Linux guide:

Windows guide:

How can I mine with Raspberry Pi, wifi routers, NAS, and TV set top box?

The instruction really varies depending on your particular device. Here are a few guides but many of them might be outdated. Please contact the original author for updates.

Raspberry Pi (mainnet, via nknx.org Fast Deploy)

Raspberry Pi (testnet, manual, might be outdated)

OpenWRT WiFi routers (testnet, might be outdated)

Phicomm N1 Network storage device (in Chinese, might be outdated)

Monitoring, updates and maintenance

Wallet and explorer

The official NKN wallet is:

https://wallet.nkn.org

The official NKN explorer is:

To check if your node is working properly:

Miner portal

Right now the best miner tool is nknx.org, which is a combination of node and wallet manager with miner focused portal. Nknx.org is developed and maintained by the nknx community team, and they have a Discord channel if you have any questions.

Command line interface CLI

The NKN client (nknc) is the CLI for NKN. For complete refernce:

Do it yourself local monitoring

If you have many mining nodes, can do some coding and do not want to monitor your nodes through nknx.org, here is an alternative by community developer lightmyfire (co-author of nknx.org):

Another alternative developed by community member AG. It was designed for testnet, so you need to update yourself to make it work for mainnet.

Why I’m not getting any NKN mining reward?

Why I’m not getting the average mining reward over long period of time?

How do I update my NKN Mining node?

NKN core dev team regularly release new NKN full node software, in order to enhance security, improve security, add new features, and fix bugs. So what should miner do?

  • If you deployed your node via 1-click cloud image, nknx.org Fast Deploy, or have auto-update scripts in your mining node, you do not need to do anything. The node will update itself, within 24 hours of the official release. If you are impatient to get the latest release, you can always reboot your mining node to do the auto-update right away.
  • If you installed using the binary or executable files from official release: you just need to download the latest binary files, decompress and overwrite the older existing files. Just be careful if you have changed config.json file and you don’t want it to be overwritten.
  • If you compiled the software from source during installation, you can fetch the latest release code and re-build.

Contributing to NKN software development

NKN is an open-source community project. We have a highly competent but small core developer team, and fortunately a group of dedicated community developers joined us over the last 15 months. But we need your help.

Contribute to NKN core software development

New Kind of Proposal (NKP) process

New Kind of Proposal or NKP, is the NKN community process for submitting, reviewing, debating, and deciding on changes and improvements to the NKN blockchain ecosystem. Both technical and economic changes are covered by NKP.

Examples of recent NKPs:

  • [NKP-0013] P.E.D.S - Persistent data storage

  • [NKP-0014] Use PoW to prevent generate ID txn spam (implemented in v1.1)

  • [NKP-0015] Removing inactive ID to reduce database size

Building application on top of NKN

You can start from the Developer Portal:

https://www.nkn.org/developer/

Our developer SDKs are here:

The technical documents are here:

https://docs.nkn.org

And our Discord dev channels are the best place to hang out:

References

  1. The original Mining FAQ was written by community developer ChrisT. It has not been updated for mainnet but still has lots of good information:
3 Likes

Hi admin, I am a newbie and I would like to have a node in the cloud to undermine NKN, either with digital ocean or any of the other 2 providers, I would like some member of the community to advise me which to activate, that is not so complicated to my for my newbie quality, it catches my attention to do it with digital ocean, I wait for advice and thanks in advance

admin, could you send me a referral link for the promotion of the $ 100 for 3 months of testing in digital ocean, thanks