Skip to content

Conversation

@Ank4n
Copy link
Contributor

@Ank4n Ank4n commented Mar 1, 2025

Summary

The existing fungible migration code has an issue when handling partially unbonding accounts, leaving them in an inconsistent state. These changes fix it by properly withdrawing overstake from unlock chunks.

This PR also removes the withdraw_overstake extrinsic from pallet-staking, as this scenario could only occur before the fungible migration. With fungibles, over-staking is no longer possible.

TODO

  • Backport to stable2503.

@Ank4n Ank4n changed the title Ankan/fungible migrate overstake fix [staking] Currency Migration and Overstake fix Mar 1, 2025
@Ank4n
Copy link
Contributor Author

Ank4n commented Mar 2, 2025

/cmd prdoc

@Ank4n Ank4n added A3-backport Pull request is already reviewed well in another branch. T2-pallets This PR/Issue is related to a particular pallet. labels Mar 2, 2025
@Ank4n Ank4n marked this pull request as ready for review March 2, 2025 22:12
@Ank4n Ank4n requested a review from kianenigma March 3, 2025 14:49
@Ank4n Ank4n requested a review from tdimitrov March 12, 2025 00:48
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13801193293
Failed job name: check-runtime-migration

@kianenigma kianenigma mentioned this pull request Mar 12, 2025
40 tasks
Copy link
Contributor

@tdimitrov tdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look sane but a disclaimer - I'm not very familiar with this topic.

@Ank4n Ank4n added this pull request to the merge queue Mar 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2025
@Ank4n Ank4n added this pull request to the merge queue Mar 12, 2025
Merged via the queue into master with commit f540d2b Mar 12, 2025
236 of 243 checks passed
@Ank4n Ank4n deleted the ankan/fungible-migrate-overstake-fix branch March 12, 2025 22:10
ordian added a commit that referenced this pull request Mar 13, 2025
* master:
  Remove execute_with_origin implementation in the XCM executor (#7889)
  [staking] Currency Migration and Overstake fix (#7763)
  fix westend try-state CI (#7895)
@Ank4n Ank4n removed the A3-backport Pull request is already reviewed well in another branch. label Mar 13, 2025
@Ank4n Ank4n added A3-backport Pull request is already reviewed well in another branch. A4-needs-backport and removed A3-backport Pull request is already reviewed well in another branch. labels Mar 13, 2025
@paritytech-release-backport-bot

Created backport PR for stable2407:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-7763-to-stable2407
git worktree add --checkout .worktree/backport-7763-to-stable2407 backport-7763-to-stable2407
cd .worktree/backport-7763-to-stable2407
git reset --hard HEAD^
git cherry-pick -x f540d2b3d26d24a952e792cdae05bb89c43e5173
git push --force-with-lease

@paritytech-release-backport-bot

Created backport PR for stable2409:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-7763-to-stable2409
git worktree add --checkout .worktree/backport-7763-to-stable2409 backport-7763-to-stable2409
cd .worktree/backport-7763-to-stable2409
git reset --hard HEAD^
git cherry-pick -x f540d2b3d26d24a952e792cdae05bb89c43e5173
git push --force-with-lease

@paritytech-release-backport-bot

Created backport PR for stable2412:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-7763-to-stable2412
git worktree add --checkout .worktree/backport-7763-to-stable2412 backport-7763-to-stable2412
cd .worktree/backport-7763-to-stable2412
git reset --hard HEAD^
git cherry-pick -x f540d2b3d26d24a952e792cdae05bb89c43e5173
git push --force-with-lease

github-actions bot added a commit that referenced this pull request Mar 13, 2025
## Summary
The existing fungible migration code has an issue when handling
partially unbonding accounts, leaving them in an inconsistent state.
These changes fix it by properly withdrawing overstake from unlock
chunks.

This PR also removes the `withdraw_overstake` extrinsic from
pallet-staking, as this scenario could only occur before the fungible
migration. With fungibles, over-staking is no longer possible.

## TODO
- [ ] Backport to stable2503.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit f540d2b)
@paritytech-release-backport-bot

Successfully created backport PR for stable2503:

EgorPopelyaev pushed a commit that referenced this pull request Mar 17, 2025
Backport #7763 into `stable2503` from Ank4n.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Ankan <[email protected]>
alindima pushed a commit that referenced this pull request Apr 8, 2025
## Summary
The existing fungible migration code has an issue when handling
partially unbonding accounts, leaving them in an inconsistent state.
These changes fix it by properly withdrawing overstake from unlock
chunks.

This PR also removes the `withdraw_overstake` extrinsic from
pallet-staking, as this scenario could only occur before the fungible
migration. With fungibles, over-staking is no longer possible.

## TODO
- [ ] Backport to stable2503.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T2-pallets This PR/Issue is related to a particular pallet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants