Tired of transferring your rewards from multiple validators' accounts to a single account?

If yes :slight_smile: , here is the solution.

The procedure below cannot be applied to the existing staked accounts. Owners of those accounts should unstake them first. Others mustn’t apply Step 6 of How to host a Virtual Node. The staking will be performed via the procedure below, not the wallet apps. So please do not use the wallet apps for staking.

  1. Install python3 into your VPS if not installed.

  2. Clone git repository of my Python API by running git clone https://github.com/abduramann/incognitosdk-python command.

  3. Run cd incognitosdk-python command.

  4. Run pip3 install . command.

  5. Run cd tester command.

  6. Run python3 ApiTester.py command.

  7. Run stake Validator_Account_Private_Key Validator_Account_Address Validator_Account_Validator_Key Reward_Receiver_Address command in the opened application. Note that when the user presses Stake button, Incognito wallet apps set Validator_Account_Address and Reward_Receiver_Address to the same address (i.e. validator account’s address). Here, we change this. This is the difference.

That’s all. Enjoy it.

13 Likes

To write this, I’ve waited to confirm the whole process. Yes, the existing stakers can follow the first post without any loss after unstaking. Here is the summary:

1- Start unstaking your node via the app.
2- Wait for unstaking up to 21 days.
3- Once your node is selected to a committee, your node will earn last time, and then your node will be unstaked.
4- After unstaking is completed (~5 minutes), you do NOT need to touch your validator software. Leave it as running.
5- Apply the steps in the first post.

That’s all.

1 Like

When using this method, I am guessing the rewards still have to be withdrawn under the Power tab? I used the Reward_Receiver_Address of a keychain that does not belong to a node and am now realizing that might be quite inconvenient?

Yes, correct.

Your rewards won’t be lost but you may need to run a validator for that address as well to withdraw them. Please write the result.

Wow, just found this. I LOATHE having to move all my rewards around after withdrawing.

I see above, a user used a separate address of an account that is not a validator to receive the rewards. I would actually like to do that, but you implied it won’t work right (maybe?). Can you confirm this or not?

Does the Reward_Receiver_Address have to be from a staked/running validator?

Also for step 7 above, i presume everything in that command is a variable that should be replaced by the keys/addresses it references? It is not 100% clear. Can you provide a real-life example of step 7?

I’m not sure. To be sure, either I should examine the code or try this case myself. The withdrawal of rewards requires a server task. At the beginning of the mainnet, the app was responsible for this task. Because of UX issues, it has moved to the server side. Probably, the app initiates the task and the rest is performed by the validator software. Because of that, a node may be required on the reward receiver address.

Yes, every variable should be replaced by the corresponding keys. You will replace them by private key, address, validator key of the validator keychain/account and address of the keychain which will get the reward, respectively.

Thank you for that info. I am totally going to be using your method. its become such a chore to do it all manually and my server is undergoing adjustments because of slashing right now anyway, so perfect time :slight_smile:

@fredlee can you comment on your experience with using a non-validator address for the receiver rewards?
DId it work?

1 Like

@abduraman what is the min version of python needed?
just 3.0?

Is there a “recommended” version?

I use python 3.6.9 but I don’t think it is tied to a specific version. Probably python3 will be sufficient.

@brico84 Using a non-validator address works fine. If you want to see the reward balance inside the app, you can temporarily setup a node and add it to the power tab. You do not need to stake it, you will still be able to see and withdraw the rewards.

An alternative is to use the latest development version of incognito-cli to check and withdraw reward.
incognito-cli checkrewards --addr <reward public address>
incognito-cli withdrawreward -p <reward private key>

That version also have stake and unstake commands.
incognito-cli stake --rewardAddress <reward public address> -p <validator private key>

2 Likes

I’m getting the following error on step 6. Any idea what’s going on?Screenshot_20211016-081349-508

You need to install websocket module: https://pypi.org/project/websocket-client/

2 Likes

I did, still same error

Either your python interpreter does not see websocket-client module or you have installed the incorrect package (not websocket, it is websocket-client).