-
Notifications
You must be signed in to change notification settings - Fork 700
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
[Staking] Delegators can stake but stakers can't delegate #4904
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ank4n
added
R0-silent
Changes should not be mentioned in any release notes
T2-pallets
This PR/Issue is related to a particular pallet.
labels
Jun 27, 2024
gui1117
approved these changes
Jun 28, 2024
bkchr
approved these changes
Jun 28, 2024
gupnik
approved these changes
Jul 1, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to no response for status checks
Jul 1, 2024
kianenigma
approved these changes
Jul 1, 2024
gpestana
approved these changes
Jul 2, 2024
TomaszWaszczyk
pushed a commit
to TomaszWaszczyk/polkadot-sdk
that referenced
this pull request
Jul 7, 2024
…#4904) Related: paritytech#4804. Fixes the try state error in Westend: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6564522. Passes here: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6580393 ## Context Currently in Kusama and Polkadot, an account can do both, directly stake, and join a pool. With the migration of pools to `DelegateStake` (See paritytech#3905), the funds of pool members are locked in a different way than for direct stakers. - Pool member funds uses `holds`. - `pallet-staking` uses deprecated locks (analogous to freeze) which can overlap with holds. An existing delegator can stake directly since pallet-staking only uses free balance. But once an account becomes staker, we cannot allow them to be delegator as this risks an account to use already staked (frozen) funds in pools. When an account gets into a situation where it is participating in both pools and staking, it would no longer would be able to add any extra bond to the pool but they can still withdraw funds. ## Changes - Add test for the above scenario. - Removes the assumption that a delegator cannot be a staker.
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this pull request
Aug 2, 2024
…#4904) Related: paritytech#4804. Fixes the try state error in Westend: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6564522. Passes here: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6580393 ## Context Currently in Kusama and Polkadot, an account can do both, directly stake, and join a pool. With the migration of pools to `DelegateStake` (See paritytech#3905), the funds of pool members are locked in a different way than for direct stakers. - Pool member funds uses `holds`. - `pallet-staking` uses deprecated locks (analogous to freeze) which can overlap with holds. An existing delegator can stake directly since pallet-staking only uses free balance. But once an account becomes staker, we cannot allow them to be delegator as this risks an account to use already staked (frozen) funds in pools. When an account gets into a situation where it is participating in both pools and staking, it would no longer would be able to add any extra bond to the pool but they can still withdraw funds. ## Changes - Add test for the above scenario. - Removes the assumption that a delegator cannot be a staker.
This was referenced Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
R0-silent
Changes should not be mentioned in any release notes
T2-pallets
This PR/Issue is related to a particular pallet.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #4804.
Fixes the try state error in Westend: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6564522.
Passes here: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6580393
Context
Currently in Kusama and Polkadot, an account can do both, directly stake, and join a pool.
With the migration of pools to
DelegateStake
(See #3905), the funds of pool members are locked in a different way than for direct stakers.holds
.pallet-staking
uses deprecated locks (analogous to freeze) which can overlap with holds.An existing delegator can stake directly since pallet-staking only uses free balance. But once an account becomes staker, we cannot allow them to be delegator as this risks an account to use already staked (frozen) funds in pools.
When an account gets into a situation where it is participating in both pools and staking, it would no longer would be able to add any extra bond to the pool but they can still withdraw funds.
Changes