feat(ah): treasury integration and production staking parameters
- Route RewardRemainder and Slash to Treasury via ResolveTo (previously burned) - Route DelegatedStaking OnSlash to Treasury - MaxExposurePageSize: 64 → 512 (Polkadot production value) - Use prod_or_fast for session Period and SessionLength - Bump spec_version to 1_020_006
This commit is contained in:
@@ -106,7 +106,7 @@ mod tests;
|
||||
pub use pezsp_runtime::BuildStorage;
|
||||
|
||||
// Pezkuwi imports
|
||||
use pezkuwi_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use xcm::latest::prelude::{
|
||||
@@ -138,7 +138,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: alloc::borrow::Cow::Borrowed("asset-hub-pezkuwichain"),
|
||||
impl_name: alloc::borrow::Cow::Borrowed("asset-hub-pezkuwichain"),
|
||||
authoring_version: 1,
|
||||
spec_version: 1_020_004,
|
||||
spec_version: 1_020_006,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 16,
|
||||
@@ -833,7 +833,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const Period: u32 = 6 * HOURS;
|
||||
pub const Period: u32 = prod_or_fast!(6 * HOURS, 20);
|
||||
pub const Offset: u32 = 0;
|
||||
}
|
||||
|
||||
@@ -864,7 +864,7 @@ impl pezpallet_aura::Config for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const PotId: PalletId = PalletId(*b"PotStake");
|
||||
pub const SessionLength: BlockNumber = 6 * HOURS;
|
||||
pub const SessionLength: BlockNumber = prod_or_fast!(6 * HOURS, 20);
|
||||
// StakingAdmin pluralistic body.
|
||||
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
use super::*;
|
||||
use pezcumulus_primitives_core::relay_chain::SessionIndex;
|
||||
use pezframe_election_provider_support::{ElectionDataProvider, SequentialPhragmen};
|
||||
use pezframe_support::traits::tokens::imbalance::ResolveTo;
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
|
||||
use pezpallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf};
|
||||
use pezpallet_staking_async::UseValidatorsMap;
|
||||
@@ -65,7 +66,7 @@ parameter_types! {
|
||||
pub MaxBackersPerWinnerFinal: u32 = MaxElectingVoters::get();
|
||||
|
||||
/// Size of the exposures. This should be small enough to make the reward payouts feasible.
|
||||
pub MaxExposurePageSize: u32 = 64;
|
||||
pub MaxExposurePageSize: u32 = 512;
|
||||
}
|
||||
|
||||
pezframe_election_provider_support::generate_solution_type!(
|
||||
@@ -278,8 +279,8 @@ impl pezpallet_staking_async::Config for Runtime {
|
||||
type CurrencyBalance = Balance;
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
type CurrencyToVote = pezsp_staking::currency_to_vote::SaturatingCurrencyToVote;
|
||||
type RewardRemainder = ();
|
||||
type Slash = ();
|
||||
type RewardRemainder = ResolveTo<xcm_config::TreasuryAccount, Balances>;
|
||||
type Slash = ResolveTo<xcm_config::TreasuryAccount, Balances>;
|
||||
type Reward = ();
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
type BondingDuration = BondingDuration;
|
||||
@@ -455,7 +456,7 @@ impl pezpallet_delegated_staking::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type PalletId = DelegatedStakingPalletId;
|
||||
type Currency = Balances;
|
||||
type OnSlash = ();
|
||||
type OnSlash = ResolveTo<xcm_config::TreasuryAccount, Balances>;
|
||||
type SlashRewardFraction = SlashRewardFraction;
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
type CoreStaking = Staking;
|
||||
|
||||
Reference in New Issue
Block a user