Unverified Commit a8ae70a9 authored by Kian Paimani's avatar Kian Paimani Committed by GitHub
Browse files

Companion for substrate/pull/9442 (#3594)

* Fix compact build

* Fix again

* fix staking miner

* fmt

* update Substrate

Co-authored-by: parity-processbot <>
parent 05de9ef1
Pipeline #152333 passed with stages
in 48 minutes and 39 seconds
This diff is collapsed.
......@@ -392,7 +392,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type OffchainRepeat = OffchainRepeat;
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type CompactSolution = NposCompactSolution24;
type Solution = NposCompactSolution24;
type OnChainAccuracy = Perbill;
type Fallback = Fallback;
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
......@@ -484,7 +484,7 @@ type SlashCancelOrigin = EnsureOneOf<
impl pallet_staking::Config for Runtime {
const MAX_NOMINATIONS: u32 =
<NposCompactSolution24 as sp_npos_elections::CompactSolution>::LIMIT as u32;
<NposCompactSolution24 as sp_npos_elections::NposSolution>::LIMIT as u32;
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = CurrencyToVote;
......@@ -1044,14 +1044,16 @@ impl InstanceFilter<Call> for ProxyType {
Call::Treasury(..) | Call::Bounties(..) |
Call::Tips(..) | Call::Utility(..)
),
ProxyType::Staking =>
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)),
ProxyType::Staking => {
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
},
ProxyType::IdentityJudgement => matches!(
c,
Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..)
),
ProxyType::CancelProxy =>
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))),
ProxyType::CancelProxy => {
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..)))
},
}
}
fn is_superset(&self, o: &Self) -> bool {
......
......@@ -398,7 +398,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type OnChainAccuracy = Perbill;
type CompactSolution = NposCompactSolution16;
type Solution = NposCompactSolution16;
type Fallback = Fallback;
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
type ForceOrigin = EnsureOneOf<
......@@ -443,7 +443,7 @@ type SlashCancelOrigin = EnsureOneOf<
impl pallet_staking::Config for Runtime {
const MAX_NOMINATIONS: u32 =
<NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = CurrencyToVote;
......@@ -994,14 +994,16 @@ impl InstanceFilter<Call> for ProxyType {
Call::Treasury(..) | Call::Bounties(..) |
Call::Tips(..) | Call::Utility(..)
),
ProxyType::Staking =>
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)),
ProxyType::Staking => {
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
},
ProxyType::IdentityJudgement => matches!(
c,
Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..)
),
ProxyType::CancelProxy =>
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))),
ProxyType::CancelProxy => {
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..)))
},
}
}
fn is_superset(&self, o: &Self) -> bool {
......
......@@ -380,7 +380,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type OnChainAccuracy = Perbill;
type CompactSolution = NposCompactSolution16;
type Solution = NposCompactSolution16;
type Fallback = Fallback;
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
type ForceOrigin = EnsureRoot<AccountId>;
......@@ -411,7 +411,7 @@ parameter_types! {
impl pallet_staking::Config for Runtime {
const MAX_NOMINATIONS: u32 =
<NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
<NposCompactSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = CurrencyToVote;
......@@ -708,11 +708,13 @@ impl InstanceFilter<Call> for ProxyType {
Call::Slots(..) |
Call::Auctions(..) // Specifically omitting the entire XCM Pallet
),
ProxyType::Staking =>
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)),
ProxyType::Staking => {
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
},
ProxyType::SudoBalances => match c {
Call::Sudo(pallet_sudo::Call::sudo(ref x)) =>
matches!(x.as_ref(), &Call::Balances(..)),
Call::Sudo(pallet_sudo::Call::sudo(ref x)) => {
matches!(x.as_ref(), &Call::Balances(..))
},
Call::Utility(..) => true,
_ => false,
},
......@@ -720,8 +722,9 @@ impl InstanceFilter<Call> for ProxyType {
c,
Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..)
),
ProxyType::CancelProxy =>
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))),
ProxyType::CancelProxy => {
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..)))
},
}
}
fn is_superset(&self, o: &Self) -> bool {
......
......@@ -65,7 +65,7 @@ macro_rules! construct_runtime_prelude {
mod private {
use super::*;
pub(crate) fn [<create_uxt_ $runtime>](
raw_solution: EPM::RawSolution<EPM::CompactOf<Runtime>>,
raw_solution: EPM::RawSolution<EPM::SolutionOf<Runtime>>,
witness: u32,
signer: crate::signer::Signer,
nonce: crate::prelude::Index,
......@@ -334,7 +334,7 @@ fn mine_unchecked<T: EPM::Config>(
ext: &mut Ext,
iterations: usize,
do_feasibility: bool,
) -> Result<(EPM::RawSolution<EPM::CompactOf<T>>, u32), Error> {
) -> Result<(EPM::RawSolution<EPM::SolutionOf<T>>, u32), Error> {
ext.execute_with(|| {
let (solution, _) = <EPM::Pallet<T>>::mine_solution(iterations)?;
if do_feasibility {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment