(Solved) Need help withdrawing rewards

I think I need some @Support with another issue.

Trying to withdraw recent committee rewards using the incognito-cli but I ran into some problems.

./incognito-cli --host http://localhost:8334 checkrewards  --address 12sqLYdoev3d88mB
Rewards of address 12sqLYdoev3d88mB:
3f89c75324b46f13c7b036871060e641d996a24c09b3065835cb1d38b799d6c1: 3
716fd1009e2a1669caacc36891e707bfdf02590f96ebd897548e8963c95ebac0: 2
0000000000000000000000000000000000000000000000000000000000000004: 56635908760

As seen there is 56.63PRV to be withdrawn. When trying to withdraw, I get this error txHash changes after unmarshalling

./incognito-cli --host http://localhost:8334 withdrawreward --privateKey 112t8rnXVmBiTD1f  --address 12sqLYdoev3d88mB 
Withdrawing the reward for tokenID 0000000000000000000000000000000000000000000000000000000000000004, using tx version 2
{"Version":2,"Type":"n","LockTime":1633686756,"Fee":100,"Info":"","SigPubKey":"...","Sig":"...","PubKeyLastByteSender":7,"Metadata":{"Type":44,"PaymentAddress":{"Pk":"...","Tk":"...","OTAPublic":"..."},"TokenID":"0000000000000000000000000000000000000000000000000000000000000004","Version":0}}
2021/10/08 11:52:36 init txver2 error: txHash changes after unmarshalling: 057b5fd5748b8cb8, 3acb8f44a9d9920e

Using incognito-cli version v0.0.2

1 Like

Hi @fredlee,

Thank you for reporting. It seems that the problem lies in the go-sdk. We’ll get back to you when it’s resolved.

Hi @fredlee,

We have identified the problem and will release a fix in a few days. In the mean time, you can check-out the development branch if you want to withdraw your rewards.

1 Like

The development branch version is gold!

./incognito-cli http://localhost:8334 withdrawreward -p 112t8rnXVmBiTD1f...
Withdrawing the reward for tokenID 0000000000000000000000000000000000000000000000000000000000000004, using tx version 2
txHash: 77854ea4fdf70174...

Worked right away. Also noticed the stake and unstake command which makes it very convenient as it derives all needed keys from the private one. No more accidentally creating staking transactions with the wrong validator key. :blush:

Quick setup instructions for anyone else wanting to run the “good” incognito-cli version. :stuck_out_tongue:

  1. Install golang (using Ubuntu in this example)
    sudo apt install golang-go

  2. Clone the repository
    git clone https://github.com/incognitochain/incognito-cli.git

  3. Switch to the development branch
    git checkout development

  4. Build it
    go build

  5. Copy it to bin (optional)
    sudo cp incognito-cli /usr/local/bin

4 Likes