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

Upgrade substrate to v30 #660

Merged
merged 29 commits into from
Sep 4, 2023
Merged

Upgrade substrate to v30 #660

merged 29 commits into from
Sep 4, 2023

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
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.

@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

evm-precompiles/erc1155/Cargo.toml Show resolved Hide resolved
pallet/erc20-peg/src/lib.rs Outdated Show resolved Hide resolved
pallet/fee-control/src/mock.rs Show resolved Hide resolved
pallet/futurepass/src/lib.rs Outdated Show resolved Hide resolved
rust-toolchain.toml Show resolved Hide resolved
* 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
2 checks passed
@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.

6 participants