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

Migrations from 11ace4ef8b2ad176293ad6db2b3dd795befd2c79 to polkadot-v0.9.11 of substrate #604

Closed
25 tasks done
icodezjb opened this issue Jan 25, 2022 · 0 comments
Closed
25 tasks done

Comments

@icodezjb
Copy link
Member

icodezjb commented Jan 25, 2022

codebase 2020.11.17 -> 2021.10.15

(✔): chainx require(✗): chainx not require

known migrations(substrate PRs)

From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines

storages now use PalletInfo for module_prefix instead of the one given to decl_storage: Thus any use of this pallet in construct_runtime! should be careful to update name in order not to break storage or to upgrade storage (moreover for instantiable pallet). If pallet is published, make sure to warn about this breaking change.

migrate prefix

  • GrandpaFinality -> Grandpa
  • Instance1Collective -> Council
  • Instance2Collective -> TechnicalCommittee
  • Instance1Membership -> TechnicalMembership
  • Treasury -> Tips
  • Treasury -> Bounties
  • PhragmenElection -> Elections

migrate order

Ordering migrations

If you are running on a Substrate version after commit #bd8c1cae, the storage migration order has been updated to:

  1. Custom on_runtime_upgrade
  2. frame_system::on_runtime_upgrade
  3. All on_runtime_upgrade functions defined in all included pallets.

The reason is to cater for scenarios where one needs to write custom code to make
frame_system::on_runtime_upgrade run and return successfully.
Refer to the details here.

  • confirm migration order
// 1. RemoveCollectiveFlip
// 2. MigratePalletVersionToStorageVersion
// 3. PhragmenElectionDepositRuntimeUpgrade
// 4. SystemToTripleRefCount
// 5. BabeEpochConfigMigrations
// 6. GrandpaStoragePrefixMigration
// 7. CouncilStoragePrefixMigration
// 8. TechnicalCommitteeStoragePrefixMigration
// 9. TechnicalMembershipStoragePrefixMigration
// 10. CouncilStoragePrefixMigration
// 11. MigrateTipsPalletPrefix
// 12. BountiesPrefixMigration
// 13. ElectionsPrefixMigration

migrations test

  • fork mainnet
  • upgrade runtime success
2022-02-24 19:52:18 🔍️ RemoveCollectiveFlip start    
2022-02-24 19:52:18 🚀 RemoveCollectiveFlip end    
2022-02-24 19:52:18 🔍️ MigratePalletVersionToStorageVersion start    
2022-02-24 19:52:18 🚀 MigratePalletVersionToStorageVersion end    
2022-02-24 19:52:18 🔍️ PhragmenElectionDepositRuntimeUpgrade start    
2022-02-24 19:52:18 Running migration for elections-phragmen with storage version StorageVersion(0)    
2022-02-24 19:52:18 migrated 1 voter accounts.    
2022-02-24 19:52:18 migrated 5 candidate accounts.    
2022-02-24 19:52:18 🚀 PhragmenElectionDepositRuntimeUpgrade end    
2022-02-24 19:52:18 🔍️ SystemToTripleRefCount start    
2022-02-24 19:52:19 Applied migration from unique to triple reference counting to 19126 elements.    
2022-02-24 19:52:19 🚀 SystemToTripleRefCount end    
2022-02-24 19:52:19 🔍️ BabeEpochConfigMigrations start    
2022-02-24 19:52:19 🚀 BabeEpochConfigMigrations end    
2022-02-24 19:52:19 🔍️ GrandpaStoragePrefixMigration start    
2022-02-24 19:52:19 Running migration to v3.1 for grandpa with storage version StorageVersion(0)    
2022-02-24 19:52:19 new prefix: Grandpa    
2022-02-24 19:52:19 🚀 GrandpaStoragePrefixMigration end    
2022-02-24 19:52:19 🔍️ CouncilStoragePrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for collective with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration, prefix: 'Instance1Collective' ==> 'Council'    
2022-02-24 19:52:19 🚀 CouncilStoragePrefixMigration end    
2022-02-24 19:52:19 🔍️ TechnicalCommitteeStoragePrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for collective with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration, prefix: 'Instance2Collective' ==> 'TechnicalCommittee'    
2022-02-24 19:52:19 🚀 TechnicalCommitteeStoragePrefixMigration end    
2022-02-24 19:52:19 🔍️ TechnicalMembershipStoragePrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for membership with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration, prefix: 'Instance1Membership' ==> 'TechnicalMembership'    
2022-02-24 19:52:19 🚀 TechnicalMembershipStoragePrefixMigration end    
2022-02-24 19:52:19 🔍️ CouncilStoragePrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for collective with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration, prefix: 'Instance1Collective' ==> 'Council'    
2022-02-24 19:52:19 🚀 CouncilStoragePrefixMigration end    
2022-02-24 19:52:19 🔍️ MigrateTipsPalletPrefix start    
2022-02-24 19:52:19 Running migration to v4 for tips with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration prefix of storage 'Tips': 'Treasury' ==> 'Tips'    
2022-02-24 19:52:19 migration prefix of storage 'Reasons': 'Treasury' ==> 'Tips'    
2022-02-24 19:52:19 🚀 MigrateTipsPalletPrefix end    
2022-02-24 19:52:19 🔍️ BountiesPrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for bounties with storage version StorageVersion(0)    
2022-02-24 19:52:19 migration prefix of storage 'BountyCount': 'Treasury' ==> 'Bounties'    
2022-02-24 19:52:19 migration prefix of storage 'Bounties': 'Treasury' ==> 'Bounties'    
2022-02-24 19:52:19 migration prefix of storage 'BountyDescriptions': 'Treasury' ==> 'Bounties'    
2022-02-24 19:52:19 migration prefix of storage 'BountyApprovals': 'Treasury' ==> 'Bounties'    
2022-02-24 19:52:19 🚀 BountiesPrefixMigration end    
2022-02-24 19:52:19 🔍️ ElectionsPrefixMigration start    
2022-02-24 19:52:19 Running migration to v4 for elections-phragmen with storage version StorageVersion(3)    
2022-02-24 19:52:19 new prefix: Elections    
2022-02-24 19:52:19 🚀 ElectionsPrefixMigration end    
2022-02-24 19:52:19 ✅ no migration for System    
2022-02-24 19:52:19 ✅ no migration for Sudo    
2022-02-24 19:52:19 ✅ no migration for Tips    
2022-02-24 19:52:19 ✅ no migration for Bounties    
2022-02-24 19:52:19 ✅ no migration for Proxy    
2022-02-24 19:52:19 ✅ no migration for XTransactionFee    
2022-02-24 19:52:19 ✅ no migration for Currencies    
2022-02-24 19:52:19 ✅ no migration for XGenesisBuilder    
2022-02-24 19:52:19 ✅ no migration for XSpot    
2022-02-24 19:52:19 ✅ no migration for XGatewayBitcoin    
2022-02-24 19:52:19 ✅ no migration for XGatewayCommon    
2022-02-24 19:52:19 ✅ no migration for XGatewayRecords    
2022-02-24 19:52:19 ✅ no migration for XMiningAsset    
2022-02-24 19:52:19 ✅ no migration for XStaking    
2022-02-24 19:52:19 ✅ no migration for XAssets    
2022-02-24 19:52:19 ✅ no migration for XAssetsRegistrar    
2022-02-24 19:52:19 ✅ no migration for XSystem    
2022-02-24 19:52:19 ✅ no migration for Multisig    
2022-02-24 19:52:19 ✅ no migration for Utility    
2022-02-24 19:52:19 ✅ no migration for Identity    
2022-02-24 19:52:19 ✅ no migration for Treasury    
2022-02-24 19:52:19 ✅ no migration for TechnicalMembership    
2022-02-24 19:52:19 ✅ no migration for Elections    
2022-02-24 19:52:19 ✅ no migration for TechnicalCommittee    
2022-02-24 19:52:19 ✅ no migration for Council    
2022-02-24 19:52:19 ✅ no migration for Democracy    
2022-02-24 19:52:19 ✅ no migration for AuthorityDiscovery    
2022-02-24 19:52:19 ✅ no migration for ImOnline    
2022-02-24 19:52:19 ✅ no migration for Grandpa    
2022-02-24 19:52:19 ✅ no migration for Session    
2022-02-24 19:52:19 ✅ no migration for Historical    
2022-02-24 19:52:19 ⚠️ Offences declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2022-02-24 19:52:19 have 0 deferred offences, applying.    
2022-02-24 19:52:19 ✅ no migration for Authorship    
2022-02-24 19:52:19 ✅ no migration for TransactionPayment    
2022-02-24 19:52:19 ✅ no migration for Balances    
2022-02-24 19:52:19 ✅ no migration for Indices    
2022-02-24 19:52:19 ✅ no migration for Timestamp    
2022-02-24 19:52:19 ✅ no migration for Babe    
2022-02-24 19:52:19 ✅ no migration for Scheduler 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant