Error unselecting staking pool during staking pool withdrawal
See original GitHub issueProblem
Calling unselect_staking_pool
will fail during withdrawal if the user staked again after triggering Unstake. This will be a more common issue when we launch partial unstaking.
Expected Behavior
We should not trigger unselect_staking_pool
during Withdrawal, only withdraw_all_from_staking_pool
.
Steps to reproduce
- Stake a small amount (not your entire lockup balance)
- Unstake
- Stake again
- When your first stake is ready to withdraw, initiate the withdrawal
- Attempt to approve
unselect_staking_pool
Details
Failed TX: https://explorer.near.org/transactions/7ujCVsCHSBWfzRSkhhG79N9uj2MNLCCeh4ny7SDR4S8F
Error text:
panicked at 'assertion failed: `(left == right)`\n left: `499999980183345121319654`,\n right: `0`: There is still a deposit on the staking pool', src/owner.rs:56:9
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Staking Troubleshooting - The Sandbox - GitBook
You do not need to withdraw your stake. The staking pool will resume again shortly. We generally cannot provide any accurate timeframes for...
Read more >How to Claim/Exit/Unstake From the DeFi Pool | by RioDeFi
There are three actions you could take to exit from the DeFi staking. Effect: By exiting the pool, you withdraw both your RFUEL...
Read more >I'm having trouble unstaking / withdrawing my SOL - Phantom
Your stake is still "Activating" or "Deactivating". You will need to wait for your stake to be "Inactive" in order to withdraw it....
Read more >Dozens of Ethereum 2.0 Validators Slashed Due to Staking ...
Ethereum 2.0 staking pool Staked penalized for $30000 due to bad behavior in an attempt to improve the efficiency of block validation.
Read more >Withdrawing pledge - Operate a Stake Pool - Cardano Forum
In fact, i need to know where it will transfer and how? The second question is about managing the payment address in staking...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kcole16 the issue seems to be specifically with calling “unselect” while there is still something staked? Despite calling “withdrawal all” and successfully withdrawing all of the available balance, correct?
I will add a check to lockup withdraw function that will not unselect pool until all balances are “0” with validator.
I’m using it right now to determine if you currently have a balance with a validator. Seems unusual to me that we’d keep the validator selected even if I don’t have any balance with the validator, but can adjust if needed.