add fast-unstsake pallet to all runtimes (#6050)

* add fast-unstsake pallet to all runtimes

* ".git/.scripts/fmt.sh" 1

* ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake

* ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake

* fix up all the weight stuff

* update substrate

* update mistake in kusama

* add stub file

* Update runtime/polkadot/src/lib.rs

Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com>

* Update runtime/westend/src/lib.rs

Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com>

* cargo update -p sp-io

* add signed extension as well

* Revert "add signed extension as well"

This reverts commit deb936fe5a9a13a62d02757045b1dfa40dccb190.

* cargo update -p sp-io

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_fast_unstake

* ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake

* update sub

* integrate latest substrate changes

* ".git/.scripts/fmt.sh" 1

* ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake

Co-authored-by: command-bot <>
Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com>
This commit is contained in:
Kian Paimani
2022-09-28 10:39:38 +01:00
committed by GitHub
parent efd2bfb085
commit 9196f32bc0
13 changed files with 614 additions and 180 deletions
+20 -2
View File
@@ -621,6 +621,17 @@ impl pallet_staking::Config for Runtime {
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
}
impl pallet_fast_unstake::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type DepositCurrency = Balances;
type Deposit = frame_support::traits::ConstU128<{ CENTS * 100 }>;
type ControlOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>,
>;
type WeightInfo = weights::pallet_fast_unstake::WeightInfo<Runtime>;
}
parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const ProposalBondMinimum: Balance = 2000 * CENTS;
@@ -1045,7 +1056,8 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Slots(..) |
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
RuntimeCall::VoterList(..) |
RuntimeCall::NominationPools(..)
RuntimeCall::NominationPools(..) |
RuntimeCall::FastUnstake(..)
),
ProxyType::Governance =>
matches!(
@@ -1061,7 +1073,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Staking => {
matches!(
c,
RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..)
RuntimeCall::Staking(..) |
RuntimeCall::Session(..) | RuntimeCall::Utility(..) |
RuntimeCall::FastUnstake(..)
)
},
ProxyType::IdentityJudgement => matches!(
@@ -1389,6 +1403,9 @@ construct_runtime! {
// nomination pools: extension to staking.
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
// Fast unstake pallet: extension to staking.
FastUnstake: pallet_fast_unstake = 42,
// Parachains pallets. Start indices at 50 to leave room.
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
@@ -1500,6 +1517,7 @@ mod benches {
[pallet_elections_phragmen, PhragmenElection]
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
[pallet_fast_unstake, FastUnstake]
[pallet_gilt, Gilt]
[pallet_identity, Identity]
[pallet_im_online, ImOnline]