feat: introduce pallet-parameters to Westend to parameterize inflation#4938
Conversation
|
User @marcuspang, please sign the CLA here. |
|
@kianenigma may I ask how I should benchmark and get the weight info? I'm not sure if I should run it with the Github action to derive the values |
|
bot help |
|
Here's a link to docs |
|
bot bench polkadot-pallet --pallet=pallet_parameters --runtime=westend |
|
@kianenigma https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6652919 was started for your command Comment |
|
Let's see if this works :) |
|
@kianenigma Command |
Done! |
|
/tip medium |
|
@marcuspang Contributor did not properly post their account address. Make sure the pull request description (or user bio) has: "{network} address: {address}". |
|
/tip medium |
1 similar comment
|
/tip medium |
|
@kianenigma Invalid tip size. Please specify one of small, medium, large. |
|
/tip medium |
|
@kianenigma A referendum for a medium (80 DOT) tip was successfully submitted for @marcuspang (5DybbVdLvVWd7MiA1YwkzLUNL1ThMDicozbuLc8v9pQEScPQ on polkadot). |
|
The referendum has appeared on Polkassembly. |
|
|
||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn try_successful_origin(_key: &RuntimeParametersKey) -> Result<RuntimeOrigin, ()> { | ||
| // Provide the origin for the parameter returned by `Default`: |
There was a problem hiding this comment.
| // Provide the origin for the parameter returned by `Default`: | |
| // Provide the origin for the parameter returned by `Default`. |
| /// A specialized function to compute the inflation of the staking system, tailored for polkadot | ||
| /// relay chains, such as Polkadot, Kusama and Westend. |
There was a problem hiding this comment.
| /// A specialized function to compute the inflation of the staking system, tailored for polkadot | |
| /// relay chains, such as Polkadot, Kusama and Westend. | |
| /// A specialized function to compute the inflation of the staking system. |
Nit but in this runtime it is implicit that the configs/impls are for Westend relay chain.
| t.into() | ||
| } | ||
|
|
||
| pub fn deprecated_era_payout( |
There was a problem hiding this comment.
Since this fn is not used anywhere but in the tests, does it need #[allow(dead_code)] to avoid compilation warnings?
I'd probably have moved this implementation and the tests into a mod test_inflation {} as we probably dont use this code in the runtime anymore.
There was a problem hiding this comment.
nit but moving this code under a mod gated by cfg(test) also make sense given that in the prdoc, it says that the old era payout impl has been removed :)
There was a problem hiding this comment.
Yes, it currently lives under
#[cfg(test)]
mod tests {
in L265
* master: Bump slotmap from 1.0.6 to 1.0.7 (#5096) feat: introduce pallet-parameters to Westend to parameterize inflation (#4938) Bump openssl from 0.10.64 to 0.10.66 (#5107) Bump lycheeverse/lychee-action from 1.9.1 to 1.10.0 (#5094) docs: remove the duplicate word (#5095) Prepare PVFs if node is a validator in the next session (#4791) Update parity publish (#5105)
|
@ggwpez @EgorPopelyaev what is the way to track "when this will land on westend"? is there a public chat/agenda about when westend gets updated? |
paritytech#4938) Fixes paritytech#4907 ## Changes - Add `pallet-parameters` to Westend runtime - Add `relay_era_payout` function to Polkadot runtime common + deprecate previous `era_payout` function - Add unit tests for `relay_era_payout`, matching previous unit tests for `era_payout` - Remove `pallet_staking_reward_curve` in Westend runtime - Add `dynamic_params` to replace constants used for `pallet_staking_reward_curve` Polkadot address: 5DybbVdLvVWd7MiA1YwkzLUNL1ThMDicozbuLc8v9pQEScPQ --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: command-bot <>
I think unfortunately there is no way to easily see this. Sometimes devops posts in chat... yea we need some "Release Comms". |

Fixes #4907
Changes
pallet-parametersto Westend runtimerelay_era_payoutfunction to Polkadot runtime common + deprecate previousera_payoutfunctionrelay_era_payout, matching previous unit tests forera_payoutpallet_staking_reward_curvein Westend runtimedynamic_paramsto replace constants used forpallet_staking_reward_curvePolkadot address: 5DybbVdLvVWd7MiA1YwkzLUNL1ThMDicozbuLc8v9pQEScPQ