-
Notifications
You must be signed in to change notification settings - Fork 336
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
pallet_staking: Introduce Additional Account for Inflation Distribution Alongside PBR #2958
Conversation
WASM runtime size check:Compared to target branchMoonbase runtime: 2188 KB (no changes) ✅ Moonbeam runtime: 2152 KB (no changes) ✅ Moonriver runtime: 2152 KB (no changes) ✅ Compared to latest release (runtime-3200)Moonbase runtime: 2188 KB (+228 KB compared to latest release) Moonbeam runtime: 2152 KB (+228 KB compared to latest release) Moonriver runtime: 2152 KB (+228 KB compared to latest release) |
Coverage Report@@ Coverage Diff @@
## master tarekkma/staking-add-address +/- ##
================================================================
+ Coverage 79.31% 79.34% +0.03%
Files 298 298
+ Lines 87140 87193 +53
================================================================
+ Hits 69114 69183 +69
- Misses 18026 18010 -16
|
/// Parachain bond config info { account, percent_of_inflation } | ||
pub(crate) type ParachainBondInfo<T: Config> = | ||
StorageValue<_, ParachainBondConfig<T::AccountId>, ValueQuery>; | ||
pub(crate) type InflationDistributionInfo<T: Config> = StorageMap< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too complex and less efficient to use a StorageMap here.
Please go back to a StorageValue, and create instead a struct InflationDistributionConfig that contains all the field you need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TarekkMA also, the StorageMap imply more reads at round change block, more complex code in staking pallet that is already too complex, and more complex and costly benchmarks.
We need to reduce the complexity of this pallet, as it was the place of many critical bugs in the past, It is very important not to add unnecessary complexity!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will work on the new impl in this PR: #2976
Closed in favor of #2976 |
Todo
What does it do?
What important points reviewers should know?
Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?