mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
* make the companion * update Substrate Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+154
-153
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate",
|
|||||||
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-beefy-mmr = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false }
|
pallet-beefy-mmr = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false }
|
||||||
|
frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|
||||||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
|
|||||||
@@ -56,6 +56,12 @@ impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfi
|
|||||||
const MAXIMUM_TARGETS: u32 = 2000;
|
const MAXIMUM_TARGETS: u32 = 2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The accuracy type used for genesis election provider;
|
||||||
|
pub type OnOnChainAccuracy = sp_runtime::Perbill;
|
||||||
|
|
||||||
|
/// The election provider of the genesis
|
||||||
|
pub type GenesisElectionOf<T> = frame_election_provider_support::onchain::OnChainSequentialPhragmen<T>;
|
||||||
|
|
||||||
/// Maximum number of iterations for balancing that will be executed in the embedded miner of
|
/// Maximum number of iterations for balancing that will be executed in the embedded miner of
|
||||||
/// pallet-election-provider-multi-phase.
|
/// pallet-election-provider-multi-phase.
|
||||||
pub const MINER_MAX_ITERATIONS: u32 = 10;
|
pub const MINER_MAX_ITERATIONS: u32 = 10;
|
||||||
|
|||||||
@@ -350,9 +350,6 @@ parameter_types! {
|
|||||||
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
||||||
// Each good submission will get 1/10 KSM as reward
|
// Each good submission will get 1/10 KSM as reward
|
||||||
pub SignedRewardBase: Balance = UNITS / 10;
|
pub SignedRewardBase: Balance = UNITS / 10;
|
||||||
// fallback: emergency phase.
|
|
||||||
pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =
|
|
||||||
pallet_election_provider_multi_phase::FallbackStrategy::Nothing;
|
|
||||||
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
||||||
|
|
||||||
// miner configs
|
// miner configs
|
||||||
@@ -389,11 +386,10 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type Solution = NposCompactSolution24;
|
type Solution = NposCompactSolution24;
|
||||||
type OnChainAccuracy = Perbill;
|
type Fallback = pallet_election_provider_multi_phase::NoFallback<Self>;
|
||||||
type Fallback = Fallback;
|
|
||||||
type Solver = frame_election_provider_support::SequentialPhragmen<
|
type Solver = frame_election_provider_support::SequentialPhragmen<
|
||||||
AccountId,
|
AccountId,
|
||||||
pallet_election_provider_multi_phase::SolutionAccuracyOf<Runtime>,
|
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
|
||||||
runtime_common::elections::OffchainRandomBalancing,
|
runtime_common::elections::OffchainRandomBalancing,
|
||||||
>;
|
>;
|
||||||
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
||||||
@@ -402,7 +398,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
EnsureRoot<AccountId>,
|
EnsureRoot<AccountId>,
|
||||||
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
||||||
>;
|
>;
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn era_payout(
|
fn era_payout(
|
||||||
@@ -483,6 +479,11 @@ type SlashCancelOrigin = EnsureOneOf<
|
|||||||
pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>,
|
pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
impl frame_election_provider_support::onchain::Config for Runtime {
|
||||||
|
type Accuracy = runtime_common::elections::OnOnChainAccuracy;
|
||||||
|
type DataProvider = Staking;
|
||||||
|
}
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
const MAX_NOMINATIONS: u32 =
|
const MAX_NOMINATIONS: u32 =
|
||||||
<NposCompactSolution24 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
<NposCompactSolution24 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
||||||
@@ -490,10 +491,7 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type UnixTime = Timestamp;
|
type UnixTime = Timestamp;
|
||||||
type CurrencyToVote = CurrencyToVote;
|
type CurrencyToVote = CurrencyToVote;
|
||||||
type ElectionProvider = ElectionProviderMultiPhase;
|
type ElectionProvider = ElectionProviderMultiPhase;
|
||||||
type GenesisElectionProvider =
|
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||||
frame_election_provider_support::onchain::OnChainSequentialPhragmen<
|
|
||||||
pallet_election_provider_multi_phase::OnChainConfig<Self>,
|
|
||||||
>;
|
|
||||||
type RewardRemainder = Treasury;
|
type RewardRemainder = Treasury;
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type Slash = Treasury;
|
type Slash = Treasury;
|
||||||
|
|||||||
@@ -356,9 +356,6 @@ parameter_types! {
|
|||||||
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
||||||
// Each good submission will get 1 DOT as reward
|
// Each good submission will get 1 DOT as reward
|
||||||
pub SignedRewardBase: Balance = 1 * UNITS;
|
pub SignedRewardBase: Balance = 1 * UNITS;
|
||||||
// fallback: emergency phase.
|
|
||||||
pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =
|
|
||||||
pallet_election_provider_multi_phase::FallbackStrategy::Nothing;
|
|
||||||
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
||||||
|
|
||||||
// miner configs
|
// miner configs
|
||||||
@@ -394,12 +391,11 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type OffchainRepeat = OffchainRepeat;
|
type OffchainRepeat = OffchainRepeat;
|
||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type OnChainAccuracy = Perbill;
|
|
||||||
type Solution = NposCompactSolution16;
|
type Solution = NposCompactSolution16;
|
||||||
type Fallback = Fallback;
|
type Fallback = pallet_election_provider_multi_phase::NoFallback<Self>;
|
||||||
type Solver = frame_election_provider_support::SequentialPhragmen<
|
type Solver = frame_election_provider_support::SequentialPhragmen<
|
||||||
AccountId,
|
AccountId,
|
||||||
pallet_election_provider_multi_phase::SolutionAccuracyOf<Runtime>,
|
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
|
||||||
runtime_common::elections::OffchainRandomBalancing,
|
runtime_common::elections::OffchainRandomBalancing,
|
||||||
>;
|
>;
|
||||||
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
||||||
@@ -408,7 +404,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
EnsureRoot<AccountId>,
|
EnsureRoot<AccountId>,
|
||||||
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
||||||
>;
|
>;
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and
|
// TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and
|
||||||
@@ -443,6 +439,11 @@ type SlashCancelOrigin = EnsureOneOf<
|
|||||||
pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>,
|
pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
impl frame_election_provider_support::onchain::Config for Runtime {
|
||||||
|
type Accuracy = runtime_common::elections::OnOnChainAccuracy;
|
||||||
|
type DataProvider = Staking;
|
||||||
|
}
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
const MAX_NOMINATIONS: u32 =
|
const MAX_NOMINATIONS: u32 =
|
||||||
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
||||||
@@ -463,10 +464,7 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||||
type NextNewSession = Session;
|
type NextNewSession = Session;
|
||||||
type ElectionProvider = ElectionProviderMultiPhase;
|
type ElectionProvider = ElectionProviderMultiPhase;
|
||||||
type GenesisElectionProvider =
|
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||||
frame_election_provider_support::onchain::OnChainSequentialPhragmen<
|
|
||||||
pallet_election_provider_multi_phase::OnChainConfig<Self>,
|
|
||||||
>;
|
|
||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -314,9 +314,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl frame_election_provider_support::onchain::Config for Runtime {
|
impl frame_election_provider_support::onchain::Config for Runtime {
|
||||||
type AccountId = <Self as frame_system::Config>::AccountId;
|
type Accuracy = runtime_common::elections::OnOnChainAccuracy;
|
||||||
type BlockNumber = <Self as frame_system::Config>::BlockNumber;
|
|
||||||
type Accuracy = sp_runtime::Perbill;
|
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -335,10 +335,6 @@ parameter_types! {
|
|||||||
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
pub const SignedDepositByte: Balance = deposit(0, 10) / 1024;
|
||||||
// Each good submission will get 1 WND as reward
|
// Each good submission will get 1 WND as reward
|
||||||
pub SignedRewardBase: Balance = 1 * UNITS;
|
pub SignedRewardBase: Balance = 1 * UNITS;
|
||||||
// fallback: emergency phase.
|
|
||||||
pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =
|
|
||||||
pallet_election_provider_multi_phase::FallbackStrategy::Nothing;
|
|
||||||
|
|
||||||
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000);
|
||||||
|
|
||||||
// miner configs
|
// miner configs
|
||||||
@@ -374,17 +370,16 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type OffchainRepeat = OffchainRepeat;
|
type OffchainRepeat = OffchainRepeat;
|
||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type OnChainAccuracy = Perbill;
|
|
||||||
type Solution = NposCompactSolution16;
|
type Solution = NposCompactSolution16;
|
||||||
type Fallback = Fallback;
|
type Fallback = pallet_election_provider_multi_phase::NoFallback<Self>;
|
||||||
type Solver = frame_election_provider_support::SequentialPhragmen<
|
type Solver = frame_election_provider_support::SequentialPhragmen<
|
||||||
AccountId,
|
AccountId,
|
||||||
pallet_election_provider_multi_phase::SolutionAccuracyOf<Runtime>,
|
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
|
||||||
runtime_common::elections::OffchainRandomBalancing,
|
runtime_common::elections::OffchainRandomBalancing,
|
||||||
>;
|
>;
|
||||||
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
||||||
type ForceOrigin = EnsureRoot<AccountId>;
|
type ForceOrigin = EnsureRoot<AccountId>;
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pallet_staking_reward_curve::build! {
|
pallet_staking_reward_curve::build! {
|
||||||
@@ -409,6 +404,11 @@ parameter_types! {
|
|||||||
pub const MaxNominatorRewardedPerValidator: u32 = 64;
|
pub const MaxNominatorRewardedPerValidator: u32 = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl frame_election_provider_support::onchain::Config for Runtime {
|
||||||
|
type Accuracy = runtime_common::elections::OnOnChainAccuracy;
|
||||||
|
type DataProvider = Staking;
|
||||||
|
}
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
const MAX_NOMINATIONS: u32 =
|
const MAX_NOMINATIONS: u32 =
|
||||||
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
||||||
@@ -429,10 +429,7 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||||
type NextNewSession = Session;
|
type NextNewSession = Session;
|
||||||
type ElectionProvider = ElectionProviderMultiPhase;
|
type ElectionProvider = ElectionProviderMultiPhase;
|
||||||
type GenesisElectionProvider =
|
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||||
frame_election_provider_support::onchain::OnChainSequentialPhragmen<
|
|
||||||
pallet_election_provider_multi_phase::OnChainConfig<Self>,
|
|
||||||
>;
|
|
||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user