Staking Flow v3 Guide 😍

Hello node operators,

Staking Flow v3 was successfully rolled out. Going forward each node will sync beacon data & 1 shard’s worth of data. Each node was assigned to a random shard. Below are the steps to clear all other shard data for unneeded shards.

:warning: To avoid possibly getting slashed please make sure your node is not in committee or about to be in committee before you follow this guide.

:warning: New vNode Operators: When requesting to un-stake your vNode must go through committee prior to your stake of 1750 PRV being returned to you.

Step 1 - Update Node

Before continuing to Step 2, please ensure your node is running the latest docker tag of 20211005_1 by following instructions in this Step 1. This guide has been broken up into sub-parts depending on pNode (#a) and vNode (#b) instructions when appropriate.

Step 1a - pNode Docker Tag Update


Access your pNodes Dashboard with (change **pNode_IP_Address**):

http://pNode_IP_Address:5000

You can locate your pNodes IP address in the app:

image

If your app does not show an IP address here please refer to your router’s config or use the FING app (www.fing.com).

Now click Terminal button at the top of the page.

Next, find the button Restart Docker and press this button. During this process, your node will check for any new Incognito updates and apply them. Please note you will have to confirm this action by clicking Yes as seen in Figure 1 - Update Docker & Confirm (both buttons are indicated with magenta squares highlighting them).

Bitmap (1)
Figure 1 - Update Docker & Confirm

Step 1b - vNode Docker Tag Update


Note: Commands for vNodes assume you are running with root permissions. If not, sudo should be added to the beginning of each command.

First, let’s check for updates to your server (this should be run weekly or monthly to maintain the security of your server):

apt update && apt upgrade -y

After that has finished, shut down your Docker containers with:

docker container stop $(docker container ls -q --filter name=inc_mainnet_*)

After this has been completed re-run your install script with:

./inc*

After roughly 3 minutes, you can continue on to Step 2.

Step 2 - Check Assigned Shard


Go to the Node Monitor. On this page check which shard your node has been assigned. Make note of this shard number somewhere as it can get confusing if you have multiple nodes.

Step 3 - Remove Unneeded Shard Data

Step 3a - pNode Shard Removal


Access your pNodes Dashboard with:

http://pNode_IP_Address:5000

Next click Terminal at the top.

You should now see buttons at the bottom like Delete Shard 3 & Delete Shard 4, etc (as referenced in Figure 2 with a magenta box surrounding).

Bitmap
Figure 2 - Shard Delete Buttons

Go through and click each button one by one, avoiding the shard that your node has been assigned to. Please allow some time after each button press. You should see the output of the button press in the terminal.

After you have clicked to delete each un-needed shard’s data click Reboot. This will reboot your pNode and only sync your assigned shard data.

Step 3b - vNode Shard Removal

Begin by stopping your Docker container from running (replace # with your docker container number, counting starts at 0):

docker container stop inc_mainnet_#

Access your vNode and send the following commands to remove each unneeded shard data.

Use the following command to enter into your nodes data folder (Please note you will have to change the # to the correct node, for those who run multiple nodes. Node counting begins with 0):

cd /home/incognito/node_data_#/mainnet/block/

Next, we will delete each unneeded shard #. Run the following code changing the # to each unneeded shard; avoid the shard # you have been assigned to.

cd shard#/ && rm -rfv * && cd ..

For example:
Let's say our node was selected for shard 4. We would run the following:
cd shard0/ && rm -rfv * && cd ..
cd shard1/ && rm -rfv * && cd ..
cd shard2/ && rm -rfv * && cd ..
cd shard3/ && rm -rfv * && cd ..
Skip shard4
cd shard5/ && rm -rfv * && cd ..
cd shard6/ && rm -rfv * && cd ..
cd shard7/ && rm -rfv * && cd ..

If more than 1 vNode runs on this same computer/server re-run Step 3b for each remaining vNode.

Restart your vNode(s) with the following:

cd && ./inc*


In Review

Congratulations, your node is now running with only beacon & 1 shards worth of data. This is a huge improvement that should allow pNodes to run for several years without needing to upgrade the hard drive. pNode operators should get slashed less often (if at all) due to the sync pool that was added. This improvement allows both pNodes and vNodes to sync faster due to only having to download 1/8th of the previously required shard data. Node operators should also see a decrease in bandwidth usage. Please do me a favor and take a few seconds to leave a comment below showing the devs some love :heart_eyes: for this awesome update!

As usual, if anyone has any questions, comments, or needs anything clarified feel free to post below or message the @support account.

13 Likes

should I use the docker update to not being slash again ? where can I run the docker update ?

Please open a support ticket by messaging @Support.

So the shard # that will be assigned will be in the pending section in the app on the Pnode?
Screenshot_20211008-011211

Yes, that’s correct. You can also find the pending shard via the Node Monitor (monitor.incognito.org). Whichever you find to be more convenient.

I did all of them except 7 but I still see all of them listed shard numbers.

Yes, that is correct. You will never see any of those shards syncing, however, they will still be displayed.

@Jared Thanks for the guidance. I have completed pnode upgrade. My tag is uptodate and all shards but my current shard are deleted. In my pnode terminal experience, I would like to note that I did not see “Done” at end of a few minutes waiting for rm command to complete. I also had to issue the Delete shard button/command twice for the shard to disappear from the terminal display result/list. It all appeared to work.

Regarding my vnodes, I am a docker noob and am learning the basics of navigating docker. A little more guidance on how to enter docker containers, navigate to those shard folders would be helpful since I don’t have access to /home/incognito/node_data_#/mainnet/block directly from my user bash. I am sure I will eventually figure it out from docker documentation, but a little extra confirmation from you here wouldn’t hurt.

Screenshot_20211008-012253

Please open a support ticket so we can further look into this.

I will update the guide.

It should not be required to enter docker containers

That is odd. Did you change the # with your node number?
If you need assistance please open a support ticket by messaging @Support.

Sorry, my bad. I had forgotten for this node I defined another data dir so it was not in the place you listed but the one I listed and forgot about. I do have access outside of docker. Thank you. I have deleted the shards I am not using on the vnodes too. I do have two nodes on the same shard. If the community wants us to have each vnode and pnode on a different shard as a matter of good decentralized practice, I will need some more guidance on that later. Even if not obligatory to have one’s nodes distributed over separate shards, the community and developers explaining what is good/optimal practice I hope will be made clear.

Each node is given a randomized shard. If we implemented a functionality to choose what shard a node runs this could be an attack point for someone to control a shard.

1 Like

@Jared Understood and good point. It occurred to me also that some, maybe many, will probably have more than 8 nodes in which case it would not be possible for some node owners to avoid being on the same shard with multiple nodes.

1 Like

does the Pnode version still exist ? They unstake my 1750 PRV, I stake it again will this solve the issue ?

I’m not following what you mean. Are you referring to pNode software version numbers?

If you are slashed you can simply re-stake once your node is back to latest on Sync State.

You need to follow the pNode troubleshooting guide or message @Support for further assistance.

what I mean is can you still mine using the physical Incognito node ?

This is the issue shard 5 is and other shard does not sync ?

Yes. Fix your stalling with this guide:

If you need further assistance please message the support account:

https://we.incognito.org/g/support