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

feat: staking v5 migrations #249

Merged
merged 10 commits into from
Sep 15, 2021
Merged

feat: staking v5 migrations #249

merged 10 commits into from
Sep 15, 2021

Conversation

weichweich
Copy link
Contributor

@weichweich weichweich commented Sep 7, 2021

  • rename Total
  • kill SelectedCandidates
  • rename CollatorState
  • rename CandidatePool
  • run benchmarks

custom types

This PR introduces new custom JS-types which are required for compatibility with our SDK and the Polkadot Apps. Please use the following types to test the code with the Polkadot Apps:

JS-Types
{}

Checklist:

  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • This PR does not introduce new custom types
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@weichweich weichweich marked this pull request as draft September 7, 2021 09:17
@weichweich weichweich self-assigned this Sep 10, 2021
@weichweich weichweich marked this pull request as ready for review September 14, 2021 12:05
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Do we not want to switch to the "correct way" of using storage versions?

pallets/parachain-staking/src/lib.rs

/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);
...
#[pallet::storage_version(STORAGE_VERSION)]

Apart from that some minor questions. Overall it looks good.

pallets/parachain-staking/src/migrations.rs Show resolved Hide resolved
pallets/delegation/src/migrations.rs Show resolved Hide resolved
pallets/did/src/migrations.rs Show resolved Hide resolved
@weichweich
Copy link
Contributor Author

Do we not want to switch to the "correct way" of using storage versions?

pallets/parachain-staking/src/lib.rs

/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);
...
#[pallet::storage_version(STORAGE_VERSION)]

Apart from that some minor questions. Overall it looks good.

I wouldn't do that now

Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Thanks for resolving my questions/would's. LGTM!

@weichweich weichweich merged commit c707e66 into develop Sep 15, 2021
@weichweich weichweich deleted the aw-staking-migrations branch September 15, 2021 12:44
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

Successfully merging this pull request may close these issues.

2 participants