How to setup your own node in a blink of an eye (Now support multi-nodes per host)

Hi do you need one infura key per virtual node.

Thanks
Jay

No, one is enough for all.

2 Likes

I am getting the following error message when I check on the startup/installation log sequence using journalctl:

IncNodeUpdt[3333]:Create new docker network
IncNodeUpdt[3375]: Error response from daemon: network with name inc_net already exists
IncNodeUpdt[3333]: Remove old container
IncNodeUpdt[3384]: inc_mainnet_0
IncNodeUpdt[3459]: inc_mainnet_0
IncNodeUpdt[3333]: Start the incognito mainnet docker container

My node on the node monitor appears to be working/syncing. I am using the most recent inc_node_installer.sh . When I list docker containers, I donā€™t see any ā€œinc_netā€ containers or any other containers than ā€œinc_mainnet_0ā€. Not sure what network with ā€œinc_netā€ refers to or how to prevent this error message. Any suggestions?

Hello @Socrates,

In this case the error youā€™re seeing is fine. The script attempted to make a network for your docker container with the name of inc_net, since this network was already created the script output an error.

In the event you run multiple nodes on the same host computer then they will all use the same docker network (inc_net).

2 Likes

Thanks for the clear response.

The last line of my startup/installation log sequence is this:

IncNodeUpdt[3888]: + set +x

Is this normal and what does it do/confirm?

I believe this is used to write all executed commands to a log file for debugging purposes later on.

2 Likes

@fredlee Regarding infura setup since no port need be specificied in installer script, does this mean if running behind a router in a LAN, no geth/infura port needs to be opened to pass through the router (NAT) to the node? I think I remember doing this in the past with GETH.

Yeah, with infura, your node will make outward calls to do the etherum lookup , there is no need to open any ports

3 Likes

As this is now the official way of installing/updating a node can the devs please update the app to reflect this? Itā€™s still having you look for eth_mainnet and run.sh. Also can OP add in some details that were in the old post that this one doesnā€™t have. Such as recommended CPU/RAM/Storage/Bandwidth and how to add the vnode to the app.

1 Like

Hi @Rocky, Thanks again for building out this script. This has made things a lot simpler for newbies to Linux (like myself).

Iā€™m planning to adding another vNode in a few weeks as I want to expand my support for this important project.

Just so Iā€™m clear on the process, please confirm the following steps:

  1. I need to run your script with the ā€œUninstallā€ command. Iā€™m lead to believe this removes everything including beacon and shard blockchain data.

  2. Download your script from
    https://raw.githubusercontent.com/incognitochain/incognito-chain/production/bin/inc_node_installer.sh

  3. Modify the script to add in my additional vNode Validator Key etc.

  4. Run your script and then wait for all vNodes to re-sync.

Have I missed any important steps?

Questions:

  1. I believe we no longer have to open any ports on my firewall, right?

  2. Is there a way to retain the ā€œ/mainnet/block/ā€ beacon and shard chains to reduce the amount of bandwidth and time needed to re-sync my previously active vNode or is this not advisable/possible?

Hello @Linnovations,

In order to add more vNodes at a later time all you would need to do is edit the inc_node_installer.sh and added your additional validator key and then save and re-run the script.

The script will automatically make another folder for the next node and use the next port so 8334 -> 8335 (which is what you would use in the app to add another node).

1 Like

Hey @Jared, Thanks for the prompt reply. So if I hear you correct, I do not need to stop any docker processes nor do I need to run the ā€œuninstallā€ command.

All I need to do is modify the inc_node_installer.sh script file by adding in my vNode Validator Key and then re-run the script?

Wow, if thatā€™s the case, thatā€™s awesome!

Follow-up Question:

  1. Letā€™s say I want to decommission one of my vNodes, is the reverse true - I.E.
    All I need to do is remove the vNode Validator Key from the script and then re-run the script?

Yes, this is correct. The script will automatically stop your containers prior to checking for new ones so you donā€™t need to stop them yourself.

That is correct. However, you will need to stop the container of that node and delete the data. Then remove the key from the script and re-run it.

1 Like

You still have to open the RPC port to be able to add the node to your incognito app and stake. Not sure if the incoming mainnet port is also needed for validators or just full nodes? Maybe someone else can answer that?

Iā€™ve done a lot of experimenting with data sharing between nodes. Every node will create its unique data. You can however copy a node and change the validator keys and continue running, which means that ā€œbootstrappingā€ is possible.

If your previous vNode is working as intended, you can copy all data to your new nodes.

3 Likes

Thanks for the guide and the script. Although, Iā€™ve got some questions.

Iā€™m trying to set up my very first virtual node. May I only know what value I have to type for VALIDATOR_K? It seems to me that it should be an alphanumeric string of some sort that I can retrieve somewhere.

Do I have to also run it as a full node to take rewards?

Do I have to change the INDEXER_ACCESS_TOKEN generating an hash from a random string?

Thanks in advance.

Hello @GGolov

Yes, you will need a validator key in order to run your vNode. This key can be found in your app under the wallet you plan on using for your vNode. Select Keychain from the home screen of the app. Next tap the key icon on the wallet youā€™d like to use. Here you will find the validator key (you can copy with the far right button).

No, a full node is not a validator and will not earn you rewards.

See below:

Please keep in mind that vNodes require 1750 PRV to be staked. Once you have acquired 1750 PRV simply transfer it to the wallet in the app you plan on using for your vNode.

While these instructions are outdated the steps to follow are not. Please read over this article to get an understanding of how setting up a vNode works.

3 Likes

I canā€™t seem to get the indexer working. When accessing the RPC I get the error

-13001: -13001: enhanced caching not supported by this node configuration

Looking at the run_incognito.sh file inside the container it says

--numindexerworkers=0 --indexeraccesstoken=$INDEXER_ACCESS_TOKEN 

Which means that it is always disabled?

In this example they set --numindexerworkers=100

When --numindexerworkers is set to 0 it will operate in basic mode only.

Read more here:

Thank you, yes I saw that setting 0 workers would disable the enhanced mode. But how do I do this with the docker container and the scripts from this thread? Does it require an updated docker image where run_incognito.sh reads the environment variable? Or is there something I can do?

Change this part of Rockyā€™s install script.

After you have changed those two lines just rerun your setup/install script.

If this doesnā€™t work let me know.