mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 10:21:05 +00:00
Companion for substrate/pull/8368 (#2683)
* Companion for https://github.com/paritytech/substrate/pull/8368 * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+148
-146
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,7 @@ sp-session = { git = "https://github.com/paritytech/substrate", branch = "master
|
|||||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|
||||||
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -152,6 +153,7 @@ std = [
|
|||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
"runtime-common/std",
|
"runtime-common/std",
|
||||||
"frame-try-runtime/std",
|
"frame-try-runtime/std",
|
||||||
|
"sp-npos-elections/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"runtime-common/runtime-benchmarks",
|
"runtime-common/runtime-benchmarks",
|
||||||
|
|||||||
@@ -319,6 +319,12 @@ parameter_types! {
|
|||||||
pub const MinerMaxIterations: u32 = 10;
|
pub const MinerMaxIterations: u32 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp_npos_elections::generate_solution_type!(
|
||||||
|
#[compact]
|
||||||
|
pub struct NposCompactSolution16::<u32, u16, sp_runtime::PerU16>(16)
|
||||||
|
// -------------------- ^^ <NominatorIndex, ValidatorIndex, Accuracy>
|
||||||
|
);
|
||||||
|
|
||||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -330,7 +336,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type OnChainAccuracy = Perbill;
|
type OnChainAccuracy = Perbill;
|
||||||
type CompactSolution = pallet_staking::CompactAssignments;
|
type CompactSolution = NposCompactSolution16;
|
||||||
type Fallback = Fallback;
|
type Fallback = Fallback;
|
||||||
type BenchmarkingConfig = ();
|
type BenchmarkingConfig = ();
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
||||||
@@ -370,6 +376,7 @@ type SlashCancelOrigin = EnsureOneOf<
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
|
const MAX_NOMINATIONS: u32 = <NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UnixTime = Timestamp;
|
type UnixTime = Timestamp;
|
||||||
type CurrencyToVote = CurrencyToVote;
|
type CurrencyToVote = CurrencyToVote;
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ smallvec = "1.6.1"
|
|||||||
|
|
||||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -27,8 +29,7 @@ sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master
|
|||||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
|
||||||
|
|
||||||
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -148,6 +149,7 @@ std = [
|
|||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
"runtime-common/std",
|
"runtime-common/std",
|
||||||
"frame-try-runtime/std",
|
"frame-try-runtime/std",
|
||||||
|
"sp-npos-elections/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"runtime-common/runtime-benchmarks",
|
"runtime-common/runtime-benchmarks",
|
||||||
|
|||||||
@@ -329,6 +329,12 @@ parameter_types! {
|
|||||||
pub const MinerMaxIterations: u32 = 10;
|
pub const MinerMaxIterations: u32 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp_npos_elections::generate_solution_type!(
|
||||||
|
#[compact]
|
||||||
|
pub struct NposCompactSolution16::<u32, u16, sp_runtime::PerU16>(16)
|
||||||
|
// -------------------- ^^ <NominatorIndex, ValidatorIndex, Accuracy>
|
||||||
|
);
|
||||||
|
|
||||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -340,7 +346,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type OnChainAccuracy = Perbill;
|
type OnChainAccuracy = Perbill;
|
||||||
type CompactSolution = pallet_staking::CompactAssignments;
|
type CompactSolution = NposCompactSolution16;
|
||||||
type Fallback = Fallback;
|
type Fallback = Fallback;
|
||||||
type BenchmarkingConfig = ();
|
type BenchmarkingConfig = ();
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
||||||
@@ -379,6 +385,7 @@ type SlashCancelOrigin = EnsureOneOf<
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
|
const MAX_NOMINATIONS: u32 = <NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UnixTime = Timestamp;
|
type UnixTime = Timestamp;
|
||||||
type CurrencyToVote = CurrencyToVote;
|
type CurrencyToVote = CurrencyToVote;
|
||||||
|
|||||||
@@ -315,6 +315,7 @@ impl frame_election_provider_support::onchain::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
|
const MAX_NOMINATIONS: u32 = 16;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UnixTime = Timestamp;
|
type UnixTime = Timestamp;
|
||||||
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
|
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ sp-session = { git = "https://github.com/paritytech/substrate", branch = "master
|
|||||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|
||||||
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -152,6 +153,7 @@ std = [
|
|||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
"runtime-common/std",
|
"runtime-common/std",
|
||||||
"frame-try-runtime/std",
|
"frame-try-runtime/std",
|
||||||
|
"sp-npos-elections/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"runtime-common/runtime-benchmarks",
|
"runtime-common/runtime-benchmarks",
|
||||||
|
|||||||
@@ -311,6 +311,12 @@ parameter_types! {
|
|||||||
pub const MinerMaxIterations: u32 = 10;
|
pub const MinerMaxIterations: u32 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp_npos_elections::generate_solution_type!(
|
||||||
|
#[compact]
|
||||||
|
pub struct NposCompactSolution16::<u32, u16, sp_runtime::PerU16>(16)
|
||||||
|
// -------------------- ^^ <NominatorIndex, ValidatorIndex, Accuracy>
|
||||||
|
);
|
||||||
|
|
||||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
@@ -322,7 +328,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
|||||||
type MinerTxPriority = NposSolutionPriority;
|
type MinerTxPriority = NposSolutionPriority;
|
||||||
type DataProvider = Staking;
|
type DataProvider = Staking;
|
||||||
type OnChainAccuracy = Perbill;
|
type OnChainAccuracy = Perbill;
|
||||||
type CompactSolution = pallet_staking::CompactAssignments;
|
type CompactSolution = NposCompactSolution16;
|
||||||
type Fallback = Fallback;
|
type Fallback = Fallback;
|
||||||
type BenchmarkingConfig = ();
|
type BenchmarkingConfig = ();
|
||||||
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Runtime>;
|
||||||
@@ -351,6 +357,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_staking::Config for Runtime {
|
impl pallet_staking::Config for Runtime {
|
||||||
|
const MAX_NOMINATIONS: u32 = <NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type UnixTime = Timestamp;
|
type UnixTime = Timestamp;
|
||||||
type CurrencyToVote = CurrencyToVote;
|
type CurrencyToVote = CurrencyToVote;
|
||||||
|
|||||||
Reference in New Issue
Block a user