Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

pallet-staking: Reorg migration, pallet and pallet impls#9410

Merged
10 commits merged into
masterfrom
zeke-breakup-staking
Jul 27, 2021
Merged

pallet-staking: Reorg migration, pallet and pallet impls#9410
10 commits merged into
masterfrom
zeke-breakup-staking

Conversation

@emostov

@emostov emostov commented Jul 22, 2021

Copy link
Copy Markdown
Contributor

closes #9408

The main thing left out of this is moving the storage items and types to their own module (they are left in lib.rs for now). I think that should be easy to do in a follow up PR and leaving it out now will make it slightly easier to merge this change into other open PRs that touch staking.

Note, the visibility on few functions in impl.rs was increased from either private or pub(super) to pub(crate).

cc @kianenigma

@emostov

emostov commented Jul 22, 2021

Copy link
Copy Markdown
Contributor Author

@kianenigma I am thinking for now we can just move the migrations module. And then once the bags PR becomes very stable we can do a bigger re-org. My concern with doing a big re-org now is that transferring those changes to the bags PR would be difficult and may result in us losing some details without realizing.

@kianenigma

Copy link
Copy Markdown
Contributor

I am fine with both. The bags PR has a small footpring in the rest of the pallet, so I think it is possible to do the full move as well. Nonetheless, this is not worth risking anything. We can always do this later.

@emostov emostov changed the title [WIP] pallet-staking: Reorg migration and pallet and pallet impls pallet-staking: Reorg migration and pallet and pallet impls Jul 27, 2021
@emostov emostov marked this pull request as ready for review July 27, 2021 03:21
@emostov emostov requested a review from kianenigma as a code owner July 27, 2021 03:21
@emostov emostov added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 27, 2021
Comment thread frame/staking/src/migrations.rs
Comment thread frame/staking/src/lib.rs Outdated

/// A `Convert` implementation that finds the stash of the given controller account,
/// if any.
pub struct StashOf<T>(sp_std::marker::PhantomData<T>);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

types.rs?

@emostov emostov Jul 27, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was thinking something like that for a follow up

@kianenigma kianenigma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add license header and an appropriate //! single line of module doc to each new file, and I am all fine with this change.

@emostov emostov changed the title pallet-staking: Reorg migration and pallet and pallet impls pallet-staking: Reorg migration, pallet and pallet impls Jul 27, 2021

@shawntabrizi shawntabrizi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't really see the need for the pallet folder, rather than a simple lib.rs file for that stuff, but okay.

@emostov

emostov commented Jul 27, 2021

Copy link
Copy Markdown
Contributor Author

bot merge

@ghost

ghost commented Jul 27, 2021

Copy link
Copy Markdown

Trying merge.

@ghost ghost merged commit a019b57 into master Jul 27, 2021
@ghost ghost deleted the zeke-breakup-staking branch July 27, 2021 23:23
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Split as much of staking as possible

3 participants