Skip to content

Conversation

@surangap
Copy link
Contributor

@surangap surangap commented Jul 21, 2023

Upgrades substrate version from polkadot-v0.9.27 to polkadot-v0.9.30

Migrations

  • Staking pallet is in V7_0_0. need to bring it up to date with v27. i.e V10_0_0

Upto v27 - need to update the storage version to v10

Staking

  • V8_0_0, // populate VoterList.
    We have already populated values in porcini/root
    and this is an expensive operation
  • V9_0_0, // inject validators into VoterList as well.
    we have validators + nominators in porcini
    root only have validators
  • V10_0_0, // remove EarliestUnappliedSlash.
    UnappliedSlashes is empty for porcini/root

TransactionPayment

  • we are on V1Ancient. there has been a PR for V2. We are already in V2. But the storage version gives the default value V1Ancient. maybe we should update the version for the sake of future migrations

After v27 - migration required

Staking

  • V11_0_0, // Move pallet storage prefix, e.g. BagsList -> VoterBagsList
    We already have it under the prefix "VoterList", and no change
    can run the migration with the same name to update the storage version
  • V12_0_0, // remove HistoryDepth.
    Move from storage value to config type alias
    migration required

migration comparison
paritytech/substrate@polkadot-v0.9.27...polkadot-v0.9.28
paritytech/substrate@polkadot-v0.9.28...polkadot-v0.9.29
paritytech/substrate@polkadot-v0.9.29...polkadot-v0.9.30

@surangap surangap force-pushed the feat/substrate-v30 branch from 5873954 to 03145e6 Compare July 24, 2023 03:45
@surangap surangap marked this pull request as ready for review July 26, 2023 02:27
@surangap
Copy link
Contributor Author

Migration
upto v27 -> https://centralitydev.atlassian.net/browse/TRN-250
from v27 - v30

  • V11 - migration added. But this will only increase the storage version to v11. no other effect
  • V12 - migration added.

@surangap surangap force-pushed the feat/substrate-v30 branch from 61409ca to 636b7ab Compare July 31, 2023 00:15
@surangap surangap force-pushed the feat/substrate-v30 branch from ccff78c to 1b068aa Compare July 31, 2023 23:36
@surangap surangap force-pushed the feat/substrate-v30 branch 2 times, most recently from 6671bed to 491848a Compare August 22, 2023 00:49
@justinfrevert
Copy link
Contributor

The bulk of the changes look good. I have one part I have to come back to and look at, then should be good to go

Copy link
Contributor

@justinfrevert justinfrevert left a comment

Choose a reason for hiding this comment

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

Nice work 💪

Copy link
Contributor

@JasonTulp JasonTulp left a comment

Choose a reason for hiding this comment

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

Looking good! Thanks for doing this Suranga

@surangap surangap force-pushed the feat/substrate-v30 branch from aad4121 to a81186a Compare August 28, 2023 01:06
* Add pallet-preimage

* Update pallet-scheduler to use locally generated weight file.

* Update pallet-preimage to use locally generated weights.
@surangap surangap merged commit c5f33d2 into main Sep 4, 2023
@surangap surangap deleted the feat/substrate-v30 branch September 4, 2023 02:38
This was referenced Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants