Skip to content

Commit

Permalink
Alcyone 2.0.2 (#616)
Browse files Browse the repository at this point in the history
Update max_inflation from 20% to 14%
Update reward claim weights
  • Loading branch information
adamdossa authored Sep 18, 2020
1 parent 3aec939 commit 8f5451e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pallets/runtime/develop/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 2002,
spec_version: 2003,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -339,7 +339,7 @@ impl pallet_session::historical::Trait for Runtime {
pallet_staking_reward_curve::build! {
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
min_inflation: 0_025_000,
max_inflation: 0_200_000,
max_inflation: 0_140_000,
ideal_stake: 0_700_000,
falloff: 0_050_000,
max_piece_count: 40,
Expand Down
4 changes: 2 additions & 2 deletions pallets/runtime/testnet/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 2002,
spec_version: 2003,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -338,7 +338,7 @@ impl pallet_session::historical::Trait for Runtime {
pallet_staking_reward_curve::build! {
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
min_inflation: 0_025_000,
max_inflation: 0_200_000,
max_inflation: 0_140_000,
ideal_stake: 0_700_000,
falloff: 0_050_000,
max_piece_count: 40,
Expand Down
7 changes: 5 additions & 2 deletions pallets/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,9 @@ decl_module! {
<Self as Store>::UnappliedSlashes::insert(&era, &unapplied);
}

/// Polymesh-Note - Weight changes to 1/4 of the actual weight that is calculated using the
/// upstream benchmarking process.
///
/// Pay out all the stakers behind a single validator for a single era.
///
/// - `validator_stash` is the stash account of the validator. Their nominators, up to
Expand All @@ -2230,11 +2233,11 @@ decl_module! {
/// - Write Each: System Account, Locks, Ledger (3 items)
/// # </weight>
#[weight =
120 * WEIGHT_PER_MICROS
((120 * WEIGHT_PER_MICROS
+ 54 * WEIGHT_PER_MICROS * Weight::from(T::MaxNominatorRewardedPerValidator::get())
+ T::DbWeight::get().reads(7)
+ T::DbWeight::get().reads(5) * Weight::from(T::MaxNominatorRewardedPerValidator::get() + 1)
+ T::DbWeight::get().writes(3) * Weight::from(T::MaxNominatorRewardedPerValidator::get() + 1)
+ T::DbWeight::get().writes(3) * Weight::from(T::MaxNominatorRewardedPerValidator::get() + 1)) * 25) / 100
]
pub fn payout_stakers(origin, validator_stash: T::AccountId, era: EraIndex) -> DispatchResult {
ensure!(Self::era_election_status().is_closed(), Error::<T>::CallNotAllowed);
Expand Down

0 comments on commit 8f5451e

Please sign in to comment.