-
Notifications
You must be signed in to change notification settings - Fork 688
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: introduce pallet-parameters to Westend to parameterize inflation #4938
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 |
…/make-westend-inflation-parameterizable
…com:marcuspang/polkadot-sdk into feat/make-westend-inflation-parameterizable
@marcuspang can you please add your address for a tip to the pr description? |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 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.
@@ -371,6 +393,46 @@ mod tests { | |||
t.into() | |||
} | |||
|
|||
pub fn deprecated_era_payout( |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it currently lives under
#[cfg(test)]
mod tests {
in L265
6e520eb
* 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 <[email protected]> Co-authored-by: kianenigma <[email protected]> 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-parameters
to Westend runtimerelay_era_payout
function to Polkadot runtime common + deprecate previousera_payout
functionrelay_era_payout
, matching previous unit tests forera_payout
pallet_staking_reward_curve
in Westend runtimedynamic_params
to replace constants used forpallet_staking_reward_curve
Polkadot address: 5DybbVdLvVWd7MiA1YwkzLUNL1ThMDicozbuLc8v9pQEScPQ