Why my nodes get so little mining reward, even averaged over long time?

There are some discussions in the router mining community about they are getting much less mining reward after mainnet. The main reason is that some of them have low cost routers, and some of them have limitation on uplink, and some have both.

First of all, NKN implements a routing algorithm that is both random and also favoring low latency links. The “latency” in NKN network, which decides which route will be chosen, takes into account of both processing power and network condition. it is not a simple ping in TCP/IP, but more a handshake between two nodes on the protocol level measuring whether the node can receive packet fast enough (mostly determined by downlink), process packet fast enough (mostly determined by CPU, RAM, etc), and send packet fast enough (mostly determined by uplink).

In addition, in v0.9 closed beta test, most of the times 95% of the nodes are low cost routers, so “everyone is as poor as its neighbor”. During that period, most low cost routers get average mining reward. However in mainnet 1.x, it is a global and open network, and the majority is VPS, cloud virtual machines, and personal computers which typically have good performance CPU and high speed Internet connection. So the low cost routers do have a disadvantage in terms of processing power and network connectivity.

Therefore, computing performance do have some impact, but only to an extent. e.g. there is probably little difference between a Raspberry Pi 3B (Quad core, ARM64, 1.2GHz, 1GB ram) and a VPS unit, if their network connections are equal. But if it is a low cost wifi router built on single core MIPS32 650MHz chip, then the processing might be so slow that its neighbors sometimes will not consider it to relay message.

Below is a graph showing the difference of latency “RoundTripTime” between Google Cloud nodes and Nodes with Chinese IP address. The GCP nodes has average latency of 280ms and then dropped to around 150ms after July’29. The nodes with Chinese IP addresses exhibit much higher latency of 460-800ms (with peak as high as 1200ms). Please refer to appendix for sampled IP range.

Graphic of China_IP & GCP_IP neighbors’s avg(RTT), Last 7d

A good indicator if your node is fast enough (both network and CPU) for the mainnet, is to check its relayed message count over a long period of time and then compare to other nodes.

NKN is always trying to make sure that NKN node software can run on as many types of devices as possible, including WiFi routers, NAS, TV set top boxes, and Raspberry Pi. Both in testnet and now in mainnet, we have optimized code relentlessly to reduce computing, memory, networking, and storage requirement, while still keeping the network safe and secure from all kinds of attacks.

In conclusion, NKN software and code are exactly the same and fair to all nodes. But we cannot guarantee that all nodes will earn equal amount of mining rewards. The diversity in node hardware and network connection decides the difference in mining outcome.

Appendix: Sampled IP Range

We measured the averaged round trip time (RTT) between node and its successors neighbors using JSON API response (same as nknc info --ring). We sample a few IP range from China and Google Cloud Platform (GCP). The sampled IP ranges are:

Sampled Chinese IP Range (122 nodes):

  • 36.107.*
  • 114.99.*
  • 140.246.*
  • 223.215.*
  • 60.16[79].*

Sample GCP IP Range (179 nodes):

  • 35.24[0-9].*