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

Cleanup Westend & Rococo Gov V1 storage #1618

Closed
liamaharon opened this issue Sep 18, 2023 · 3 comments
Closed

Cleanup Westend & Rococo Gov V1 storage #1618

liamaharon opened this issue Sep 18, 2023 · 3 comments
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@liamaharon
Copy link
Contributor

liamaharon commented Sep 18, 2023

          @liamaharon @al3mart could this cleanup be done in a separate PR? 

we really need this to be merged asap :)

Thanks!

Originally posted by @mordamax in #1177 (comment)


Westend/Rococo Gov V1 storage is removed. Need to clean up the storage. See paritytech/polkadot#7314 for how this was done for Kusama & Polkadot.

@liamaharon liamaharon added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. T1-FRAME This PR/Issue is related to core FRAME, the framework. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Sep 18, 2023
al3mart added a commit that referenced this issue Sep 27, 2023
Migrating [PR from the archived polkadot
repo](paritytech/polkadot#7272)

As per
paritytech/polkadot#7272 (comment),
the changes in this MR include the following pallets into [x] Rococo and
[x] Westend runtimes:

    pallet_conviction_voting
    pallet_referenda
    pallet_ranked_collective
    pallet_custom_origins
    pallet_whitelist

And only for westend-runtime:

    pallet_treasury

Following [Kusama runtime
config](https://github.com/paritytech/polkadot/tree/dbae30efe080a1d41fe54ef4da8af47614c9ca93/runtime/kusama/src)
as a baseline.

Benchmarking of the following pallets done for both Rococo and Westend:

    pallet_conviction_voting
    pallet_referenda
    pallet_ranked_collective (only on Rococo)
    pallet_whitelist

And only for Westend:

    pallet_treasury

Removed Gov1 from Rococo as in
paritytech/polkadot#6701

Rococo Gov1 storage will be cleaned in a different PR - [issue ](#1618)

---------

Co-authored-by: Giles Cope <gilescope@gmail.com>
@eagr
Copy link
Contributor

eagr commented Oct 5, 2023

I wanna help out if it's ok.

I presume the cleanup will be done by migrations, right? I could get a rough idea of how to do migrations from paritytech/polkadot#7314, but I'm not sure how to determine what exactly should be removed or unreserved.

@al3mart
Copy link
Contributor

al3mart commented Oct 11, 2023

I have made a dry-run of the migrations and the values I got are the following

Module Total Accounts Total stake to unlock Total deposit to unreserve
Elections Phragmen 27 1,132.821063320441 ROC 1.465386531600 ROC
Democracy 69 2733.923509345613 ROC 0.166666665000 ROC
Tips 4 N/A 0.015099999849 ROC

The migrations will also remove the following amount of keys

103 Democracy keys 🧹
5 Council keys 🧹
1 TechnicalCommittee keys 🧹
25 PhragmenElection keys 🧹
1 TechnicalMembership keys 🧹
9 Tips keys 🧹

During the dry-run I have noticed the following output

Logic error: Unexpected underflow in reducing consumer

I understand that means that there are some accounts that haven't been reaped before because of these pallets. The total # of accounts in this situation is 37 (at least that message was logged 37 times). Should we address these in any way ?

@liamaharon
Copy link
Contributor Author

I understand that means that there are some accounts that haven't been reaped before because of these pallets. The total # of accounts in this situation is 37 (at least that message was logged 37 times). Should we address these in any way ?

Yeah this is expected and is benign/can be ignored.

Thanks for handling it :)

al3mart added a commit that referenced this issue Oct 16, 2023
Following
[polkadot#7314](paritytech/polkadot#7314) and
after merging #1177 this
PR solves #1618

The following is a summary of the outcome of the migration.

| Module | Total Accounts | Total stake to unlock | Total deposit to
unreserve |
| ------- | --------------- | --------------------- |
-------------------------- |
| Elections Phragmen | 27 | 1,132.821063320441 ROC | 1.465386531600 ROC
|
| Democracy | 69 | 2733.923509345613 ROC | 0.166666665000 ROC |
| Tips | 4 | N/A | 0.015099999849 ROC |

The migrations will also remove the following amount of keys

103 Democracy keys 🧹
5 Council keys 🧹
1 TechnicalCommittee keys 🧹
25 PhragmenElection keys 🧹
1 TechnicalMembership keys 🧹
9 Tips keys 🧹
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 27, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
bkchr pushed a commit that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Done
Development

No branches or pull requests

3 participants