diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 659a7052d2..b336191db4 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -310,8 +310,8 @@ impl pallet_balances::Config for Runtime { type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; - type FreezeIdentifier = (); - type MaxFreezes = (); + type FreezeIdentifier = RuntimeFreezeReason; + type MaxFreezes = ConstU32<1>; type RuntimeHoldReason = RuntimeHoldReason; type MaxHolds = ConstU32<1>; } @@ -1451,6 +1451,7 @@ impl pallet_nomination_pools::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; type RewardCounter = FixedU128; type BalanceToU256 = BalanceToU256; type U256ToBalance = U256ToBalance; @@ -1578,7 +1579,7 @@ construct_runtime! { VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 39, // nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 41, + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 41, // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 42, @@ -1757,6 +1758,10 @@ pub mod migrations { parachains_configuration::migration::v9::MigrateToV9, // Migrate parachain info format paras_registrar::migration::VersionCheckedMigrateToV1, + // Freeze ED deposit for all pools + pallet_nomination_pools::migration::versioned_migrations::V5toV6, + // Init TVL + pallet_nomination_pools::migration::versioned_migrations::V6ToV7, ); } diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index 3320520cd7..37a18ff8a3 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -597,4 +597,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn adjust_pool_deposit() -> Weight { + todo!("run benchmarks") + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 45ea561b33..a1c98182b9 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -296,9 +296,9 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type FreezeIdentifier = RuntimeFreezeReason; + type MaxFreezes = ConstU32<1>; } parameter_types! { @@ -1283,6 +1283,7 @@ parameter_types! { impl pallet_nomination_pools::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; type RewardCounter = FixedU128; type BalanceToU256 = runtime_common::BalanceToU256; type U256ToBalance = runtime_common::U256ToBalance; @@ -1382,7 +1383,7 @@ construct_runtime! { VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, // Nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 39, + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 40, @@ -1541,6 +1542,10 @@ pub mod migrations { parachains_configuration::migration::v9::MigrateToV9, // Migrate parachain info format paras_registrar::migration::VersionCheckedMigrateToV1, + // Freeze ED deposit for all pools + pallet_nomination_pools::migration::versioned_migrations::V5toV6, + // Init TVL + pallet_nomination_pools::migration::versioned_migrations::V6ToV7, ); } diff --git a/relay/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 095fa7fcc4..2b285151fe 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -597,4 +597,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn adjust_pool_deposit() -> Weight { + todo!("run benchmarks") + } }