Multi-VNode script

I haven’t looked at my logs. I just check that the port is open and that it maintains uptime.

I’m trying this out on a vps with an existing node. I replaced key 1 with the existing node and key 2 with the new validator key.

  • I run it and after some errors around the initial node already binding the port.
  • I check docker ps. In docker I see inc_mainnet, eth_mainnet and inc_mainnet_1 which looks good to me, inc_1 is cranking away at ~100% CPU.
  • I added the node in the app and staked it.
  • When I added it to https://incognito.mesquka.com/nodes I don’t see an error but it is blank in the box. Should I expect it to say -2 if everything is good? Or how long will it take the tool to catch up?

If the node is showing up in the incognito tool, it’s up. Does it display a BLS key? If so it’s running fine.

One does now but one is still blank. For a test I added nonsense ip and port to see if the tool threw an error but it didn’t which is why I reached out.

I realize now that I had one with ‘direct connect’ and one without. Without is now showing -2. I’ve removed direct connect from the other, we’ll see if it shows up

If it displays in the node tab, then the node is running. When the BLS key shows then the node is ready to stake and will begin earning once the node is synced. I’ve got a backlog of things to work on, but am hoping to get back to the incognito tool and work on making error messages etc. better.

1 Like

Now I unclicked direct connection everything is showing -2 as expected. Thanks for creating the script!

Hello,
thank you for your script and for your website.
If I want to add or remove a VNode is it only necessary to modify incognito.sh and to run again the script?
thank you

If you want to remove a vnode completely you’ll need to remove the docker container manually. That’s not a big deal though, adding a vnode and running the script will overwrite unused node containers that you’ve removed from the script previously.

1 Like

Thank you

Thank you, @mesquka - this is a great script. I used it for the first time today, and it works like a charm!

For my case - I was looking to spin off two nodes on the same VPS (4 CPUs, 8GB RAM, 240GB SSD). I ran the script after adding my validator keys. It did everything as expected, but it didn’t start docker automatically. I had to manually start docker and rerun the script before it kicked off both nodes.

Indeed a big time saver when you compare it to creating a copy of the run.sh script and customizing it for your 2nd node. Great work!

2 Likes

Can u have multiple vnodes on one computer or?

Yes, that is what this script does.

More then one server needed or how does it work

You need 1750 PRV for each vnode you want to run, and your server needs to have enough CPU power and storage to run multiple vnodes.

I’ve got an i7-8650u with 16GB RAM running 5 servers. Each vnode takes about 20GB storage space with one outlier taking 27GB of storage space. You’ll want to have about 50GB of space for each vnode you want to run as the blockchain grows in size.

Once you have the PRV and your accounts setup in the wallet, download the script onto an Ubuntu machine, replace the validator keys list at the top with the validator keys for your accounts, and then run it. Open the incognito wallet and add the nodes under the ‘power’ tab. The ports for the nodes start at 9334 and increase one by one (first node is IP:9334, second is IP:9335 etc.). You can now stake your coins.

5 Likes

Lovely work my friend! Will surely try this to setup next node, when rewards are collected! :wink:

have theses specs been working well for you @sid? I have 2 servers that are pretty close to those specs, currently have 1 vNode per machine… but was thinking of doubling them up…

1 Like

Did you add eth_mainnet start up to the script… I was looking through but didnt see it, but I could have missed it.

Putting 2 vNodes on one VPS server will work fine.

And yes this script runs eth_mainnet. It does everything just like the original script but creates multiple nodes based on how many validator keys you provide and assigns each new instance with a new port number.

2 Likes

@doc - I think adding an extra vnode on your server (with similar specs) should work perfectly okay. I haven’t seen any problems running 2 vnodes on a VPS with 4 CPUs, 8GB RAM and 240 GB SSD. Its been up for a couple of months now and so far, so good!

3 Likes

@Jared when I ran the script and then checked with

sudo docker ps 

CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                                            NAMES                                                      
bb8d66cfbc3f        incognitochain/incognito-mainnet:20200910_1   "/bin/bash run_incog…"   10 minutes ago      Up 10 minutes       0.0.0.0:9335->9335/tcp, 0.0.0.0:9434->9434/tcp   inc_mainnet_1                                              
4750a3cfcca1        incognitochain/incognito-mainnet:20200910_1   "/bin/bash run_incog…"   10 minutes ago      Up 10 minutes       0.0.0.0:9334->9334/tcp, 0.0.0.0:9433->9433/tcp   inc_mainnet_0    

I only see the incognito mainnet running… not eth_mainnet. Any idea what could possibly be causing this?