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

Migrate pallets old versions #2555

Merged
merged 5 commits into from
Dec 8, 2023
Merged

Migrate pallets old versions #2555

merged 5 commits into from
Dec 8, 2023

Conversation

rimbi
Copy link
Contributor

@rimbi rimbi commented Nov 8, 2023

What does it do?

Fixes the incorrect pallet versions for the following pallets:

TreasuryCouncilCollective 0 -> 4
OpenTechCommitteeCollective 0 -> 4
Balances 0 -> 1
Referenda 0 -> 1

The incorrect versions causes try-runtime-cli to raise errors.

It also applies 2 existing migrations to the pallet_balances, which

  • first, deactivates the balance for the XCM teleport account (not used in moonbeam)
  • then kills the inactive issuances

Here is the relevant log:

2023-11-08 09:19:42 [🌗] performing migration MM_MissingBalancesMigrations, available weight: Weight(ref_time: 496328193830, proof_size: 5176120)
2023-11-08 09:19:42 [🌗] Migrating storage from version StorageVersion(0)
2023-11-08 09:19:42 [🌗] Total balance to be deactivated = 49126913761788105000
2023-11-08 09:19:42 [🌗] Storage to version 1
2023-11-08 09:19:42 [🌗] Killing inactive issuance 4455285130501229342817269
2023-11-08 09:19:42 [🌗] Storage to version 0
2023-11-08 09:19:42 [🌗] Migrating storage from version StorageVersion(0)
2023-11-08 09:19:42 [🌗] Total balance to be deactivated = 49126913761788105000
2023-11-08 09:19:42 [🌗] Storage to version 1
2023-11-08 09:19:42 [🌗] performing migration MM_SetCollectivePalletVersions, available weight: Weight(ref_time: 495953193830, proof_size: 5176120)
2023-11-08 09:19:42 [🌗] Setting collective pallet versions to 4
2023-11-08 09:19:42 [🌗] Setting referenda pallet version to 1

The upgrade was tested with a fork.

TreasuryCouncilCollective 0 -> 4
OpenTechCommitteeCollective 0 -> 4
Balances 0 -> 1
Referenda 0 -> 1
@rimbi rimbi requested a review from librelois November 8, 2023 09:40
@rimbi rimbi self-assigned this Nov 8, 2023
@rimbi rimbi added not-breaking Does not need to be mentioned in breaking changes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes labels Nov 8, 2023
@rimbi rimbi added the D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. label Nov 8, 2023
@noandrea noandrea changed the title Fix the pallet versions Migrate pallets old versions Dec 8, 2023
@noandrea noandrea merged commit 5f6ba30 into master Dec 8, 2023
31 of 32 checks passed
@noandrea noandrea deleted the cem-fix-pallet-versions branch December 8, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants