{"id":7711,"date":"2019-09-13T19:03:29","date_gmt":"2019-09-13T19:03:29","guid":{"rendered":"https:\/\/nkn.org\/community\/blog\/nkn-mining-guide-for-mainnet\/"},"modified":"2021-10-29T17:06:56","modified_gmt":"2021-10-29T17:06:56","slug":"nkn-mining-guide-for-mainnet","status":"publish","type":"post","link":"https:\/\/nkn.org\/ru\/community\/blog\/nkn-mining-guide-for-mainnet\/","title":{"rendered":"NKN Mining Guide for Mainnet"},"content":{"rendered":"<p>V0.1, September 2019 edition<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/0*GkfiKjbR2dmrn1LC\" data-width=\"1600\" data-height=\"900\" \/><\/figure>\n<h3>Welcome newcomers<\/h3>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>If you are a NKN testnet veteran, you can safely skip this chapter and proceed directly to the next chapter.<\/p>\n<h3>What is NKN\u00a0mining?<\/h3>\n<p>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\u2019s role is crucial for the NKN ecosystem.<\/p>\n<h3>Is it profitable?<\/h3>\n<p>Maybe, it depends on a few factors:<\/p>\n<ul>\n<li>NKN token price<\/li>\n<li>How many nodes are actively mining at the moment<\/li>\n<li>Your cost of running the node<\/li>\n<li>Your luck<\/li>\n<\/ul>\n<p>The rate NKN tokens are being mined is constant for each year, and they are shared by all the mining nodes on the network.<\/p>\n<h3>Do I need to stake or own NKN to\u00a0mine?<\/h3>\n<p>No. You can start a NKN full node to mine without owning any NKN.<\/p>\n<h3>What kind of computer do I need to\u00a0mine?<\/h3>\n<p>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:<\/p>\n<ul>\n<li>Has a minimum of 512MB of RAM (1GB is recommended)<\/li>\n<li>Has a minimum of 16GB of disk (25GB or more is recommended)<\/li>\n<li>Most CPU (Intel, AMD, ARM, MIPS) will work<\/li>\n<li>Have a fast Internet connection (&gt;10Mbps) is recommended<\/li>\n<li>You have either a public IPv4 address or are able to configure port forwarding on your router (TCP\/UDP ports 30001\u201330003)<\/li>\n<\/ul>\n<p>It can be one of the following:<\/p>\n<ul>\n<li>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.<\/li>\n<li>A home computer: desktop of laptop, Windows or Mac or Linux<\/li>\n<li>A home embedded device such as a Raspberry Pi, WiFi router, Network Attached Storage (Network Disk), or a TV set top box<\/li>\n<\/ul>\n<h3>I\u2019m a newbie, what is the easiest way to\u00a0mine?<\/h3>\n<p>The easiest ways at the moment are:<\/p>\n<ol>\n<li>1-click cloud deployment (see the chapter on \u201cMining on cloud computer\u201d)<\/li>\n<li>\u201cFast Deploy\u201d from nknx.org (see next section)<\/li>\n<\/ol>\n<h3>nknx.org and \u201cFast\u00a0Deploy\u201d<\/h3>\n<p>nknx.org, a community project, has recently implemented \u201cFast Deploy\u201d method. By using a single line of script (copy pasted into your computer\u2019s command line), you can deploy NKN nodes software on cloud machines or home computers, and automatically registered on nknx.org for monitoring.<\/p>\n<p>Here is a recent step-by-step experience of \u201cFast Deploy\u201d for a home Raspberry Pi computer:<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/nknx-fast-deploy-on-raspberry-pi-3-a-successful-test-drive\/1486\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/nknx-fast-deploy-on-raspberry-pi-3-a-successful-test-drive\/1486<\/a><\/p>\n<h3>I\u2019m stuck, who can help\u00a0me?<\/h3>\n<p>If you cannot find the answer in this FAQ, here are some very useful resources:<\/p>\n<ol>\n<li>Search our <a href=\"https:\/\/forum.nkn.org\/c\/nodes-mining\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/c\/nodes-mining<\/a> 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.<\/li>\n<li>Join our Discord #mainnet channel <a href=\"https:\/\/discord.gg\/yVCWmkC\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/discord.gg\/yVCWmkC<\/a>, 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\u2019t get near real-time responses.<\/li>\n<\/ol>\n<h3>Welcome back: testnet\u00a0veterans<\/h3>\n<h3>What has changed since\u00a0testnet?<\/h3>\n<p>A lot! You might want to check our release note for v1.0 as well as subsequent releases.<\/p>\n<p><a href=\"https:\/\/github.com\/nknorg\/nkn\/releases\/tag\/v1.0-beta\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/nknorg\/nkn\/releases\/tag\/v1.0-beta<\/a><\/p>\n<p>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\u2019s mining rewards. All the new instructions, 1-clicks, and Fast Deploy will show your how to configure the BeneficiaryAddress.<\/p>\n<h3>Can I upgrade from testnet node to\u00a0mainnet?<\/h3>\n<p>It is certainly feasible for 1-click cloud images, but we do not recommend it. The reasons are simple:<\/p>\n<ul>\n<li>Mainnet is significantly different from testnet, and incompatible<\/li>\n<li>Wallet, blockchain data, and a lot more have changed since testnet<\/li>\n<li>You node most likely will need an Operating System upgrade and thorough security patch anyway<\/li>\n<\/ul>\n<h3>Mining on cloud\u00a0machines<\/h3>\n<p>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.<\/p>\n<p>Summary of all three cloud platforms updated for NKN mainnet:<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/1-click-nkn-node-image-updated-for-mainnet-on-3-cloud-platforms\/1413\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/1-click-nkn-node-image-updated-for-mainnet-on-3-cloud-platforms\/1413<\/a><\/p>\n<h3>DigitalOcean (DO)<\/h3>\n<ul>\n<li>NKN 1-click on MarketPlace<br \/>\n<a href=\"https:\/\/marketplace.digitalocean.com\/apps\/nkn-full-node\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/marketplace.digitalocean.com\/apps\/nkn-full-node<\/a><\/li>\n<li>NKN 1-click on DigitalOcean guide:<br \/>\n<a href=\"https:\/\/forum.nkn.org\/t\/one-click-to-build-a-new-kind-of-network-node-on-digitalocean\/172\" target=\"_blank\" rel=\"noopener noreferrer\">One-Click to build a New Kind of Network node on DigitalOcean<\/a><\/li>\n<\/ul>\n<h3>Google Cloud Platform\u00a0(GCP)<\/h3>\n<ul>\n<li>NKN 1-click on MarketPlace<br \/>\n<a href=\"https:\/\/console.cloud.google.com\/marketplace\/details\/nkn-public\/nkn-full-node\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/console.cloud.google.com\/marketplace\/details\/nkn-public\/nkn-full-node<\/a><\/li>\n<li>NKN 1-click on Google Cloud guide:<br \/>\n<a href=\"https:\/\/forum.nkn.org\/t\/deploy-nkn-full-node-from-google-cloud-marketplace\/296\" target=\"_blank\" rel=\"noopener noreferrer\">Deploy NKN Full Node from Google Cloud Marketplace<\/a><\/li>\n<\/ul>\n<h3>Amazon Web Service\u00a0(AWS)<\/h3>\n<ul>\n<li>NKN 1-click on MarketPlace<br \/>\n<a href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/B07PWJ69BF\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/aws.amazon.com\/marketplace\/pp\/B07PWJ69BF<\/a><\/li>\n<li>NKN 1-click on AWS guide (general and advanced):<br \/>\n<a href=\"https:\/\/forum.nkn.org\/t\/deploy-nkn-full-node-from-aws-marketplace\/332\" target=\"_blank\" rel=\"noopener noreferrer\">Deploy NKN Full Node from AWS Marketplace<br \/>\n<\/a><a href=\"https:\/\/forum.nkn.org\/t\/deploy-nkn-full-node-on-aws-advanced-option\/333\" target=\"_blank\" rel=\"noopener noreferrer\">Deploy NKN Full Node on AWS Advanced Option<\/a><\/li>\n<\/ul>\n<h3>Mining at\u00a0home<\/h3>\n<p>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\u2019t use. For most people, there is almost zero monthly cost to run a NKN node at home.<\/p>\n<h3>Public IPv4 address and port forwarding<\/h3>\n<p>There are some limitations of mining at home, since each NKN mining node needs a unique public IP address.<\/p>\n<ul>\n<li>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\u201330003 (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.<\/li>\n<li>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.<\/li>\n<\/ul>\n<p>You can use this tool to check your public IP address and if the ports are open or not:<\/p>\n<p><a href=\"https:\/\/www.yougetsignal.com\/tools\/open-ports\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.yougetsignal.com\/tools\/open-ports\/<\/a><\/p>\n<p>And here are some general guides on how to configure port forwarding in leading brands of home routers:<\/p>\n<p><a href=\"https:\/\/www.noip.com\/support\/knowledgebase\/general-port-forwarding-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.noip.com\/support\/knowledgebase\/general-port-forwarding-guide\/<\/a><\/p>\n<p>This guide is a port forwarding how to for the very beginner. Follow the steps outlined to find your default gateway for general port forwarding.<\/p>\n<p><a href=\"https:\/\/portforward.com\/router.htm\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/portforward.com\/router.htm<\/a><\/p>\n<h3>I have an extra computer at home, how I can I\u00a0mine?<\/h3>\n<p>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:<\/p>\n<p>Mac and Linux guide:<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/web-ui-for-nkn-mining-nodes-mac-and-linux-edition\/1712\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/web-ui-for-nkn-mining-nodes-mac-and-linux-edition\/1712<\/a><\/p>\n<p>Windows guide:<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/web-ui-for-nkn-mining-nodes-windows-edition\/1608\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/web-ui-for-nkn-mining-nodes-windows-edition\/1608<\/a><\/p>\n<h3>How can I mine with Raspberry Pi, wifi routers, NAS, and TV set top\u00a0box?<\/h3>\n<p>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.<\/p>\n<p>Raspberry Pi (mainnet, via nknx.org Fast Deploy)<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/nknx-fast-deploy-on-raspberry-pi-3-a-successful-test-drive\/1486\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/nknx-fast-deploy-on-raspberry-pi-3-a-successful-test-drive\/1486<\/a><\/p>\n<p>Raspberry Pi (testnet, manual, might be outdated)<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/make-your-own-nkm-new-kind-of-miner-out-of-a-raspberry-pi\/92\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/make-your-own-nkm-new-kind-of-miner-out-of-a-raspberry-pi\/92<\/a><\/p>\n<p>OpenWRT WiFi routers (testnet, might be outdated)<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/mining-nkn-on-your-openwrt-router\/599\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/mining-nkn-on-your-openwrt-router\/599<\/a><\/p>\n<p>Phicomm N1 Network storage device (in Chinese, might be outdated)<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/n1-nkn\/884\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/n1-nkn\/884<\/a><\/p>\n<h3>Monitoring, updates and maintenance<\/h3>\n<h3>Wallet and\u00a0explorer<\/h3>\n<p>The official NKN wallet is:<\/p>\n<p><a href=\"https:\/\/wallet.nkn.org\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/wallet.nkn.org<\/a><\/p>\n<p>The official NKN explorer is:<\/p>\n<p><a href=\"https:\/\/explorer.nknx.org\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/explorer.nknx.org<\/a><\/p>\n<p>To check if your node is working properly:<\/p>\n<p><a href=\"https:\/\/explorer.nknx.org\/ips\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/explorer.nknx.org\/ips<\/a><\/p>\n<h3>Miner portal<\/h3>\n<p>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.<\/p>\n<p><a href=\"https:\/\/nknx.org\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/nknx.org<\/a><\/p>\n<h3>Command line interface CLI<\/h3>\n<p>The NKN client (nknc) is the CLI for NKN. For complete refernce:<\/p>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/command-line-wallet-nknc-options-reference\/370\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/command-line-wallet-nknc-options-reference\/370<\/a><\/p>\n<h3>Do it yourself local monitoring<\/h3>\n<p>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 developed by community member AG. It was designed for testnet, so you need to update yourself to make it work for mainnet.<\/p>\n<p><a href=\"https:\/\/github.com\/hashtafak\/nknag\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/hashtafak\/nknag<\/a><\/p>\n<h3>Why I\u2019m not getting any NKN mining\u00a0reward?<\/h3>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/no-rewards-what-am-i-doing-wrong\/1371\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/no-rewards-what-am-i-doing-wrong\/1371<\/a><\/p>\n<h3>Why I\u2019m not getting the average mining reward over long period of\u00a0time?<\/h3>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/why-my-nodes-get-so-little-mining-reward-even-averaged-over-long-time\/1499\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/why-my-nodes-get-so-little-mining-reward-even-averaged-over-long-time\/1499<\/a><\/p>\n<h3>How do I update my NKN Mining\u00a0node?<\/h3>\n<p>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?<\/p>\n<ul>\n<li>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.<\/li>\n<li>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\u2019t want it to be overwritten.<\/li>\n<li>If you compiled the software from source during installation, you can fetch the latest release code and re-build.<\/li>\n<\/ul>\n<h3>Contributing to NKN software development<\/h3>\n<p>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.<\/p>\n<h3>Contribute to NKN core software development<\/h3>\n<p><a href=\"https:\/\/github.com\/nknorg\/nkn\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/nknorg\/nkn<\/a><\/p>\n<h3>New Kind of Proposal (NKP)\u00a0process<\/h3>\n<p>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.<\/p>\n<p>Examples of recent NKPs:<\/p>\n<ul>\n<li>[<a href=\"https:\/\/forum.nkn.org\/t\/nkp-0013-p-e-d-s-persistent-data-storage\/1539\" target=\"_blank\" rel=\"noopener noreferrer\">NKP-0013<\/a>] P.E.D.S\u200a\u2014\u200aPersistent data storage<\/li>\n<li>[<a href=\"https:\/\/forum.nkn.org\/t\/nkp-0014-use-pow-to-prevent-generate-id-txn-spam\/1668\" target=\"_blank\" rel=\"noopener noreferrer\">NKP-0014<\/a>] Use PoW to prevent generate ID txn spam (implemented in v1.1)<\/li>\n<li>[<a href=\"https:\/\/forum.nkn.org\/t\/nkp-0015-removing-inactive-id-to-reduce-database-size\/1669\" target=\"_blank\" rel=\"noopener noreferrer\">NKP-0015<\/a>] Removing inactive ID to reduce database size<\/li>\n<\/ul>\n<h3>Building application on top of\u00a0NKN<\/h3>\n<p>You can start from the Developer Portal:<\/p>\n<p><a href=\"https:\/\/www.nkn.org\/developer\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.nkn.org\/developer\/<\/a><\/p>\n<p>Our developer SDKs are here:<\/p>\n<p><a href=\"https:\/\/github.com\/nknorg\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/nknorg<\/a><\/p>\n<p>The technical documents are here:<\/p>\n<p><a href=\"https:\/\/docs.nkn.org\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/docs.nkn.org<\/a><\/p>\n<p>And our Discord dev channels are the best place to hang out:<\/p>\n<p><a href=\"https:\/\/discord.gg\/yVCWmkC\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/discord.gg\/yVCWmkC<\/a><\/p>\n<h3>References<\/h3>\n<ol>\n<li>The original Mining FAQ was written by community developer ChrisT. It has not been updated for mainnet but still has lots of good information:<\/li>\n<\/ol>\n<p><a href=\"https:\/\/forum.nkn.org\/t\/nkn-mining-faq\/165\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/forum.nkn.org\/t\/nkn-mining-faq\/165<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>V0.1, September 2019 edition 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 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":6038,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"mc4wp_mailchimp_campaign":[]},"categories":[259,228],"tags":[432,608,351,546],"acf":[],"_links":{"self":[{"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/posts\/7711"}],"collection":[{"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/comments?post=7711"}],"version-history":[{"count":2,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/posts\/7711\/revisions"}],"predecessor-version":[{"id":10868,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/posts\/7711\/revisions\/10868"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/media\/6038"}],"wp:attachment":[{"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/media?parent=7711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/categories?post=7711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nkn.org\/ru\/wp-json\/wp\/v2\/tags?post=7711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}