Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't quit pools when reward account is non-empty #1824

Closed
KtorZ opened this issue Jun 29, 2020 · 3 comments
Closed

Can't quit pools when reward account is non-empty #1824

KtorZ opened this issue Jun 29, 2020 · 3 comments
Assignees

Comments

@KtorZ
Copy link
Member

KtorZ commented Jun 29, 2020

Context

Information -
Version All
Platform All
Installation Sources

Steps to Reproduce

  1. Join a pool
  2. Wait until there's some reward in the reward account.
  3. Quit the pool

Expected behavior

To be clarified. The wallet should either return a clear error explaining that the reward account must be emptied first. Or, the reward should be automatically redeemed when quitting. The latter is perhaps a little nicer in terms of user experience (although quite implicit) but also require more work to fix.

Actual behavior

The server returns a 500 Internal Server Error after getting an error from the ledger.


Resolution


QA

@rvl
Copy link
Contributor

rvl commented Jul 3, 2020

Reminder to whoever is working on this - uncomment the second part of the "STAKE_POOLS_JOIN_04 - Rewards accumulate and stop" test scenario once this is fixed.

@KtorZ
Copy link
Member Author

KtorZ commented Jul 3, 2020

@rvl yes and no :s.
In order to "fix" this, I am going to:

  1. Wrap up the work on Tentatively allow having an initial reserve amount for running coin selection. #1821, so that rewards can be turned into UTxO
  2. Make the server fail with a proper error "you need to consume your reward before quitting".

Then, being able to automatically consume the rewards when quitting will be done as part of a next U/S. Note that we are currently discussing the existence of this "quit" endpoint, which in essence, is against the protocol. Instead, it would probably end-up being merged with the migration endpoint, so that quitting only happens behind the scene AND, only when a user is migrating his wallet (because we don't want to de-register stake key under normal circumstances).

@piotr-iohk
Copy link
Contributor

When quitting the pool and having rewards earned there is now following error being shown:

Code = 403,
Message = {"code":"non_null_rewards","message":"It seems that you're trying to retire from delegation although you've unspoiled rewards in your rewards account! Make sure to withdraw your 33080446 lovelace first."}

One is able to join another pool even if he earned rewards 👌 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants