rusk icon indicating copy to clipboard operation
rusk copied to clipboard

Web-wallet doesnt allow claim rewards without active stake

Open Rikkie82 opened this issue 1 year ago • 11 comments

Describe the bug After ITN issues and the request to unstake i did an unstake via cli-wallet. This did not auto-claim rewards. When trying to claim rewards via webwallet got an error: Schermafbeelding 2024-02-18 010008 Schermafbeelding 2024-02-18 005944 Claiming rewards via CLI-wallet worked afterwards

To Reproduce

  1. unstake from cli-wallet
  2. check staked amount is zero but reward value is still showing up (both in webwallet and CLI wallet
  3. try to claim via webwallet.

Expected behaviour Would expect an unstake action to autoclaim rewards. If this not happens would expect to be able to claim rewards via web-wallet as well

Logs/Screenshot see above screenshots

Platform

Windows 11 laptop W23H2 Chrome: Versie 121.0.6167.185 (Officiële build) (64-bits)

Additional context N/A

Rikkie82 avatar Feb 18 '24 15:02 Rikkie82

This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267

Daksh14 avatar Feb 18 '24 18:02 Daksh14

This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267

Just remove the "has_stake", since makes no sense

herr-seppia avatar Feb 18 '24 19:02 herr-seppia

This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267

Just remove the "has_stake", since makes no sense

removing has_staked is okay but that's not the culprit for sure because other people are able to withdraw while they were unstaked. I think it mostly might be a cache issue or the node not being able to return the stake-info correctly

Daksh14 avatar Feb 18 '24 19:02 Daksh14

Same situation for me, I’m just gonna add my case wether it helps or not: I unstaked from the cli-wallet and did not receive my rewards automatically. What’s also weird is once I opened the cli-wallet again I still had the option to unstake! Don't want to mess around with that right now, so I'll leave it be Bildschirmfoto 2024-02-19 um 09 46 21

I can see my rewards in the web-wallet, I try to claim them which takes a few seconds but transaction fails.

Bildschirmfoto 2024-02-19 um 09 52 55 Bildschirmfoto 2024-02-19 um 09 53 08

I tried to login to the cli-wallet again to check if Unstake is still there and now I get this error:

thread 'main' panicked at 'Invalid cache IO error: While lock file: /root/.dusk/rusk-wallet/cache/LOCK: Resource temporarily unavailable', src/bin/main.rs:86:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Edit: the last error for the wallet just seemed to be random. I can access the wallet again (both cli and web).

ichbindas avatar Feb 19 '24 08:02 ichbindas

I unstaked from the cli-wallet and did not receive my rewards automatically.

Correct, rewards must be withdrawn with a different transaction

What’s also weird is once I opened the cli-wallet again I still had the option to unstake!

If you try to unstake you'll get informed that you're not allowed to

I tried to login to the cli-wallet again to check if Unstake is still there and now I get this error:

thread 'main' panicked at 'Invalid cache IO error: While lock file: /root/.dusk/rusk-wallet/cache/LOCK: Resource temporarily unavailable', src/bin/main.rs:86:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Edit: the last error for the wallet just seemed to be random. I can access the wallet again (both cli and web).

That means that you have multiple rusk-wallet instance running at the same time

herr-seppia avatar Feb 19 '24 10:02 herr-seppia

Oh I'm sorry I thought rewards were automatically withdrawn with the unstake transaction. My fault, I misremembered this.

If you try to unstake you'll get informed that you're not allowed to

And wow I didn't recognize that this option is always there..

That means that you have multiple rusk-wallet instance running at the same time

Thanks, I should've known better.

ichbindas avatar Feb 19 '24 11:02 ichbindas

Update: Have checked with Daksh and Seppia – the issue is to be resolved by removing the !info.has_staked check from stake.js.

nortonandreev avatar Mar 11 '24 10:03 nortonandreev

Sorry to be that guy, but can we correct the typo? It is "consensus" not "concensus"

autholykos avatar Mar 22 '24 20:03 autholykos

Sorry to be that guy, but can we correct the typo? It is "consensus" not "concensus"

Seems like the error has been removed altogether. Reference

However, this change is not yet released.

nortonandreev avatar Mar 23 '24 11:03 nortonandreev

True, not releases yet, on new testnet issue is still present on web-wallet. Would expect it to throw a gas required action since we don’t have ndusk yet, but it will shows the “no active stake” error.

Rikkie82 avatar Mar 23 '24 11:03 Rikkie82

Can this issue be closed now? cc: @Daksh14 @herr-seppia

nortonandreev avatar Mar 26 '24 09:03 nortonandreev