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/rename staking to provider boost #1976 #1977

Conversation

shannonwells
Copy link
Collaborator

@shannonwells shannonwells commented May 22, 2024

Goal

The goal of this PR is to unify naming for the Provider Boost feature. Everything that was called St*ing Rewards is now ProviderBoost or Boosting Rewards

Part of #1976

Discussion

Only renames. Also seeking alternate suggestions.

@shannonwells shannonwells changed the base branch from main to feat/capacity-staking-rewards-impl May 22, 2024 01:18

/// The StakingRewardsProvider used by this pallet in a given runtime
type RewardsProvider: StakingRewardsProvider<Self>;
/// The BoostingRewardsProvider used by this pallet in a given runtime
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I called it "BoostingRewardsProvider" because "ProviderBoostRewardsProvider" seemed a bit much. Welcoming alternatives.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer ProviderBoostRewardsProvider it reads better.

@@ -198,10 +198,10 @@ pub mod pallet {
/// Note that you can claim rewards even if you no longer are boosting, because you
/// may claim rewards for past eras up to the history limit.
#[pallet::constant]
type StakingRewardsPastErasMax: Get<u32>;
type ProviderBoostRewardsPastErasMax: Get<u32>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"BoostingRewardsPastErasMax"? Or "ProviderBoostHistoryLimit" or "ProviderBoostHistorySize", or ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like ProviderBoostHistoryLimit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Enddy.

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 lines in your changes are missing coverage. Please review.

Files Coverage Δ
pallets/capacity/src/lib.rs 94.93% <100.00%> (ø)
pallets/capacity/src/types.rs 95.63% <100.00%> (ø)
...lets/capacity/src/migration/provider_boost_init.rs 0.00% <0.00%> (ø)

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels May 22, 2024
@shannonwells shannonwells removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels May 22, 2024
@shannonwells shannonwells marked this pull request as ready for review May 22, 2024 17:52
@shannonwells shannonwells requested a review from wilwade as a code owner May 22, 2024 17:52
@@ -285,7 +285,7 @@ pub mod pallet {
/// Reward Pool history
#[pallet::storage]
#[pallet::getter(fn get_reward_pool_for_era)]
pub type StakingRewardPool<T: Config> =
pub type ProviderBoostRewardPool<T: Config> =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe the plural is better, ProviderBoostRewardPools, because it stores multiple RewardPoolInfo records.

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

👍 nice naming updates!

@shannonwells shannonwells merged commit 810ce42 into feat/capacity-staking-rewards-impl May 22, 2024
@shannonwells shannonwells deleted the feat/rename-staking-to-provider-boost-#1976 branch May 22, 2024 22:46
@shannonwells shannonwells restored the feat/rename-staking-to-provider-boost-#1976 branch May 22, 2024 23:52
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.

3 participants