-
Notifications
You must be signed in to change notification settings - Fork 645
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] Currency <> Fungible migration #5501
Open
Ank4n
wants to merge
70
commits into
ankan/staking-migrate-currency-to-fungible
Choose a base branch
from
ankan/staking-migrate-currency-to-fungible-2
base: ankan/staking-migrate-currency-to-fungible
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 63 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
c92a0bd
add fungible to config
Ank4n ebf60ef
rustdoc fix
Ank4n 07e3ca9
rename Fungible to Currency
Ank4n 58e8e83
add support for fungible imbalance handler in pallet treasury
Ank4n a9d0345
fix unused imports
Ank4n 5157b3b
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n e6c705e
missing import
Ank4n c4a9c9d
conditional import of fun mutate
Ank4n f5c6fe9
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 6f503f7
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 6659456
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n e5b80ce
fix event count with fungibles
Ank4n 426ac1c
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n b2cbe7d
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 6a7368c
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 0ec6a3b
fix failing tests
Ank4n 7f7e394
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 59f22f0
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 0188158
best effort while minting money
Ank4n d03469c
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 0dc0ca4
fix ed bug while minting
Ank4n f0ef9d1
release/dec consumer before dec providers
Ank4n ca81fea
works, but hacky
Ank4n b15efb6
fix provider
Ank4n b1f313b
remove the hack provider logic
Ank4n 32be80c
verify only for tests
Ank4n e0fac32
hacky to pass tests for now
Ank4n d74ebd6
unused import
Ank4n c5a7730
staking does not need to inc consumer anymore
Ank4n dedecbc
purge session key when trying to kill stash
Ank4n 9053d4f
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n bcdb749
small updates
Ank4n 18928a4
kill stake is fallible
Ank4n 6a7001e
fail ledger kill if stake cannot be killed
Ank4n ef54e9a
doc fixes
Ank4n 4555209
fmt
Ank4n 684828a
fix migrate test
Ank4n a7272be
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 6d94601
rename agent kill function
Ank4n a3267af
small edits
Ank4n dc4a9a4
fmt
Ank4n 605f698
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 9570a61
remove provider inc in pallet-delegated-staking
Ank4n 09f20e1
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 0e7e8d5
add migrate function to staking
Ank4n 7fad817
remote test
Ank4n bb7b8a0
fmt
Ank4n 03242b2
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n 7bc7086
add OldCurrency to runtime configs
Ank4n 9ed4716
add old currency to config
Ank4n c009a62
ensure ledger update also updates holds
Ank4n 17c4aa3
new call to migrate currency
Ank4n c4af869
force withdraw test
Ank4n e1f1d42
fmt
Ank4n b57660d
add reap stash fail test
Ank4n dc55b97
split stakeable into staked and free to stake
Ank4n 591945d
refactor remote test migration
Ank4n 2760773
Merge branch 'ankan/staking-migrate-currency-to-fungible' into ankan/…
Ank4n a1ccab7
add bench for migrate currency
Ank4n 8c59b58
fix try states
Ank4n 36bb12e
prdoc
Ank4n c06e60b
clippy fix
Ank4n 5c29547
improve tests
Ank4n 7f1165e
Merge branch 'ankan/staking-migrate-currency-to-fungible' of https://…
f07061b
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
da0a7c3
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
b3352dd
comment about ignoring resolve err
Ank4n f0d2d14
total balance for ED
Ank4n 3ca1081
ensure ti is updated at reward
Ank4n 7a16988
make slash resolve to treasury defensive
Ank4n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Currency to Fungible migration for pallet-staking | ||
|
||
doc: | ||
- audience: Runtime User | ||
description: | | ||
Lazy migration of staking balance from `Currency::locks` to `Fungible::holds`. New extrinsic | ||
`staking::migrate_currency` removes the old lock along with other housekeeping. Additionally, any ledger mutation | ||
creates hold if it does not exist. | ||
|
||
crates: | ||
- name: westend-runtime | ||
bump: minor | ||
- name: kitchensink-runtime | ||
bump: minor | ||
- name: pallet-delegated-staking | ||
bump: patch | ||
- name: pallet-nomination-pools | ||
bump: patch | ||
- name: frame-support | ||
bump: patch | ||
- name: pallet-treasury | ||
bump: minor | ||
- name: sp-staking | ||
bump: minor |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agents don't need provider anymore as staking account does not have consumers.
TODO: add migration for agents to dec provider.