Nodes with equal id

I realized that I made some nodes the wrong way using google cloud, all my nodes made in the google cloud have the same id, I think it is probably wrong, because each node must have a unique id.

According to a comment made by @zbruceli in the topic below:

How do I delete a node’s wallet and create a new one? I really need to do this so that each node of mine has a unique id.

Hi,

My turn to help you :grin:

SSH to your machine then go the nkn-node folder

cd ../nkn/nkn-commercial/services/nkn-node/

Delete the wallet and password files

sudo rm -f wallet*

Re-create a wallet and provide a password when prompted

sudo ./nknc wallet --name wallet.json --create

Create a new password file and put the password in it (echo tunneling doesn’t work apparently, so use vi)

sudo vi wallet.pswd

When vi is open, hit the “i” key and just paste your password then hit “Esc” then type in “:wq” followed by “Enter”.

Restart the service

sudo systemctl restart nkn-commercial.service
1 Like

I noticed a difference in the NKN mined compared to those received in my wallet, and I discovered that the reason was this.

Can I recover these NKNs that are “blocked” by the bad configuration caused by me?

It’s 300 NKN: /

I am not an expert, and maybe others can help better, but I don’t think it’s possible that NKN are “blocked” because of this kind of misconfiguration. If a server which has by mistake the same wallet as another gets a reward by any way (should not be possible though I guess), the reward still goes to the existing wallet.

Nothing is lost as long as you filled in your beneficiary address correctly. Node mining rewards will go to beneficiary address. When you have multiples nodes sharing the same ID, nothing is lost, you just waste some resources running those duplicate nodes for nothing.

I am looking for what is causing this problem in my knots. Look at the difference between the total balance of the wallet and the mined ones.

diffe

I think this is because of transactions fees. Because you have been rewarded a lot, the difference is more significant. On my side I also have mined more than I actually have.

Maybe someone from NKN team can confirm?

1 Like

Do you have anything to say about that? I saw some people reporting on the same thing.

More coins mined than received in the wallet.

@zbruceli

I think that’s because nknx assume each node has unique id, otherwise it will give wrong stat. Assume you have 100 nodes using the same id and one of them mined a block, then when nknx look at any one of these nodes, it will check its id, and thinks the node mined a block. It will do the same for all 100 nodes and thought you mined 100 blocks instead of 1 :joy:

1 Like

@yilun I think this does not explain this situation. I have the same on my side. Are all mined NKN sent to the beneficiary wallet?

All mining reward will go to beneficiary address immediately. I can think of a few other possibilities:

  1. If you used nknx fast deploy, the first block reward on each node will go to their (nknx’s) team wallet.
  2. If you have transferred any token from your beneficiary address wallet, the balance will also change as it’s showing real time balance.

On my side i did not use fast deploy, but nkn-commercial. Is it the same?

I didn’t transfer any amount from my wallet anywhere yet and I see a difference of a bit more than 2%. Looks like it’s almost 10% for @brounk9x.

NKN commercial does not change beneficiary address, so you should get all the mining reward. Maybe the nknx stat is somehow inaccurate… What is the different between those two balance for you?

For me it’s 57.08 mined and 55.49 in the wallet. I think 57.08 is the wrong value, cause I had 5 rewards so far and 5 times the current reward value gives 55.49 as a result.

I probably know the reason now… The block reward is changing as height increase (see our economic model for more info). It was around 11.4 before, but has changed to around 11 since block height 1,576,800. Your node has mined 5 blocks, but somehow nknx was still using the old reward amount (11.4 * 5 = 57) instead of the actual block reward (11 * 5 = 55).

1 Like

That was indeed the problem - I fixed it some seconds ago and mined amount should now get more accurate.

2 Likes

I found the argument --password value in the documentation, with this argument you can directly add the password on the command line.

sudo ./nknc wallet --name wallet.json --password 123456 --create

If you already have password saved in a file (e.g. wallet.pswd), you can use

cat wallet.pswd wallet.pswd | ./nknc wallet -c

to avoid your password from being exposed to bash history.