From 8349c8d18af15c091b2f2a9f23f07a22ff2309cc Mon Sep 17 00:00:00 2001 From: Juan Date: Wed, 23 Aug 2023 13:35:12 +0200 Subject: [PATCH] Companion: restructure macro related exports (#3015) * restructure macro related exports * restructure macro related exports * wip * wip * update cargo lock * refactor RuntimeDebug on unincluded segment * fmt * Companion: restructure `benchmarking` macro related exports (#3039) * wip * wip * restructure benchmarking macro related exports * add cargo lock --------- Co-authored-by: parity-processbot <> --- cumulus/Cargo.lock | 17 +++++++++++++++++ cumulus/bridges/bin/runtime-common/src/lib.rs | 2 +- .../bridges/bin/runtime-common/src/messages.rs | 3 ++- .../bin/runtime-common/src/messages_call_ext.rs | 3 +-- .../src/refund_relayer_extension.rs | 4 ++-- cumulus/bridges/modules/grandpa/src/call_ext.rs | 4 ++-- .../modules/messages/src/inbound_lane.rs | 3 ++- .../modules/messages/src/outbound_lane.rs | 3 ++- .../bridges/modules/parachains/src/call_ext.rs | 7 +++++-- .../chain-bridge-hub-kusama/src/lib.rs | 2 +- .../chain-bridge-hub-polkadot/src/lib.rs | 3 ++- .../chain-bridge-hub-rococo/Cargo.toml | 2 ++ .../chain-bridge-hub-rococo/src/lib.rs | 8 ++------ .../chain-bridge-hub-wococo/Cargo.toml | 2 ++ .../chain-bridge-hub-wococo/src/lib.rs | 3 ++- .../header-chain/src/justification/mod.rs | 4 ++-- .../src/justification/verification/mod.rs | 3 +-- cumulus/bridges/primitives/messages/src/lib.rs | 4 ++-- .../primitives/messages/src/source_chain.rs | 3 ++- .../primitives/messages/src/target_chain.rs | 3 ++- .../bridges/primitives/parachains/src/lib.rs | 4 ++-- .../bridges/primitives/polkadot-core/src/lib.rs | 4 ++-- .../primitives/polkadot-core/src/parachains.rs | 2 +- cumulus/bridges/primitives/runtime/Cargo.toml | 2 ++ cumulus/bridges/primitives/runtime/src/lib.rs | 9 ++++++--- .../bridges/primitives/runtime/src/messages.rs | 3 ++- .../primitives/runtime/src/storage_types.rs | 3 ++- .../collator-selection/src/benchmarking.rs | 2 +- cumulus/pallets/collator-selection/src/lib.rs | 9 ++++----- .../pallets/collator-selection/src/migration.rs | 3 ++- cumulus/pallets/parachain-system/src/lib.rs | 2 +- .../parachain-system/src/unincluded_segment.rs | 2 +- cumulus/parachains/common/Cargo.toml | 2 ++ cumulus/parachains/common/src/xcm_config.rs | 2 +- .../emulated/common/Cargo.toml | 1 + .../emulated/common/src/lib.rs | 3 ++- .../runtimes/assets/asset-hub-kusama/Cargo.toml | 1 + .../runtimes/assets/asset-hub-kusama/src/lib.rs | 6 ++++-- .../assets/asset-hub-polkadot/Cargo.toml | 1 + .../assets/asset-hub-polkadot/src/lib.rs | 6 ++++-- .../assets/asset-hub-westend/Cargo.toml | 2 ++ .../assets/asset-hub-westend/src/lib.rs | 7 ++++--- .../assets/asset-hub-westend/tests/tests.rs | 3 ++- .../runtimes/assets/common/src/runtime_api.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 1 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 3 ++- .../bridge-hubs/bridge-hub-polkadot/Cargo.toml | 1 + .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 3 ++- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 1 + .../src/bridge_hub_rococo_config.rs | 3 ++- .../src/bridge_hub_wococo_config.rs | 3 ++- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 3 ++- .../collectives/collectives-polkadot/Cargo.toml | 1 + .../collectives-polkadot/src/impls.rs | 2 +- .../collectives/collectives-polkadot/src/lib.rs | 6 ++++-- .../contracts/contracts-rococo/Cargo.toml | 1 + .../contracts/contracts-rococo/src/lib.rs | 3 ++- .../runtimes/glutton/glutton-kusama/Cargo.toml | 1 + .../runtimes/glutton/glutton-kusama/src/lib.rs | 4 +++- .../parachains/runtimes/test-utils/Cargo.toml | 1 + .../parachains/runtimes/test-utils/src/lib.rs | 2 +- .../runtimes/testing/penpal/Cargo.toml | 1 + .../runtimes/testing/penpal/src/lib.rs | 3 ++- 63 files changed, 136 insertions(+), 71 deletions(-) diff --git a/cumulus/Cargo.lock b/cumulus/Cargo.lock index 22034d8f445..d0d48c6b5c8 100644 --- a/cumulus/Cargo.lock +++ b/cumulus/Cargo.lock @@ -659,6 +659,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "sp-weights", @@ -754,6 +755,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "sp-weights", @@ -850,10 +852,12 @@ dependencies = [ "sp-consensus-aura", "sp-core", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -1414,6 +1418,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-runtime", "sp-std", ] @@ -1426,6 +1431,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-runtime", "sp-std", ] @@ -1534,6 +1540,7 @@ dependencies = [ "hash-db", "hex-literal", "impl-trait-for-tuples", + "log", "num-traits", "parity-scale-codec", "scale-info", @@ -1643,6 +1650,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -1705,6 +1713,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -1811,6 +1820,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -2374,6 +2384,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -2556,6 +2567,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -5297,6 +5309,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -5868,6 +5881,7 @@ dependencies = [ "sp-consensus-beefy", "sp-core", "sp-runtime", + "sp-tracing", "sp-weights", "westend-runtime", "westend-runtime-constants", @@ -9265,6 +9279,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-support", "frame-system", + "log", "num-traits", "pallet-asset-tx-payment", "pallet-assets", @@ -9313,6 +9328,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-tracing", "substrate-wasm-builder", "xcm", "xcm-executor", @@ -9573,6 +9589,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", diff --git a/cumulus/bridges/bin/runtime-common/src/lib.rs b/cumulus/bridges/bin/runtime-common/src/lib.rs index 546d4388471..817922bc907 100644 --- a/cumulus/bridges/bin/runtime-common/src/lib.rs +++ b/cumulus/bridges/bin/runtime-common/src/lib.rs @@ -103,7 +103,7 @@ where #[macro_export] macro_rules! generate_bridge_reject_obsolete_headers_and_messages { ($call:ty, $account_id:ty, $($filter_call:ty),*) => { - #[derive(Clone, codec::Decode, Default, codec::Encode, Eq, PartialEq, frame_support::RuntimeDebug, scale_info::TypeInfo)] + #[derive(Clone, codec::Decode, Default, codec::Encode, Eq, PartialEq, sp_runtime::RuntimeDebug, scale_info::TypeInfo)] pub struct BridgeRejectObsoleteHeadersAndMessages; impl sp_runtime::traits::SignedExtension for BridgeRejectObsoleteHeadersAndMessages { const IDENTIFIER: &'static str = "BridgeRejectObsoleteHeadersAndMessages"; diff --git a/cumulus/bridges/bin/runtime-common/src/messages.rs b/cumulus/bridges/bin/runtime-common/src/messages.rs index 316c4d3cad9..a650f082774 100644 --- a/cumulus/bridges/bin/runtime-common/src/messages.rs +++ b/cumulus/bridges/bin/runtime-common/src/messages.rs @@ -31,9 +31,10 @@ use bp_messages::{ }; use bp_runtime::{Chain, RawStorageProof, Size, StorageProofChecker}; use codec::{Decode, Encode}; -use frame_support::{traits::Get, weights::Weight, RuntimeDebug}; +use frame_support::{traits::Get, weights::Weight}; use hash_db::Hasher; use scale_info::TypeInfo; +use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, marker::PhantomData, vec::Vec}; /// Bidirectional message bridge. diff --git a/cumulus/bridges/bin/runtime-common/src/messages_call_ext.rs b/cumulus/bridges/bin/runtime-common/src/messages_call_ext.rs index 0a1d7243620..badb17efa08 100644 --- a/cumulus/bridges/bin/runtime-common/src/messages_call_ext.rs +++ b/cumulus/bridges/bin/runtime-common/src/messages_call_ext.rs @@ -21,10 +21,9 @@ use bp_messages::{target_chain::MessageDispatch, InboundLaneData, LaneId, Messag use frame_support::{ dispatch::CallableCallFor, traits::{Get, IsSubType}, - RuntimeDebug, }; use pallet_bridge_messages::{Config, Pallet}; -use sp_runtime::transaction_validity::TransactionValidity; +use sp_runtime::{transaction_validity::TransactionValidity, RuntimeDebug}; use sp_std::ops::RangeInclusive; /// Generic info about a messages delivery/confirmation proof. diff --git a/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs b/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs index f611686420c..4e577e88a41 100644 --- a/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs +++ b/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs @@ -30,7 +30,7 @@ use frame_support::{ dispatch::{CallableCallFor, DispatchInfo, Dispatchable, PostDispatchInfo}, traits::IsSubType, weights::Weight, - CloneNoBound, DefaultNoBound, EqNoBound, PartialEqNoBound, RuntimeDebug, RuntimeDebugNoBound, + CloneNoBound, DefaultNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound, }; use pallet_bridge_grandpa::{ CallSubType as GrandpaCallSubType, SubmitFinalityProofHelper, SubmitFinalityProofInfo, @@ -51,7 +51,7 @@ use sp_runtime::{ transaction_validity::{ TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransactionBuilder, }, - DispatchResult, FixedPointOperand, + DispatchResult, FixedPointOperand, RuntimeDebug, }; use sp_std::{marker::PhantomData, vec, vec::Vec}; diff --git a/cumulus/bridges/modules/grandpa/src/call_ext.rs b/cumulus/bridges/modules/grandpa/src/call_ext.rs index c83e88b7b56..7a6c61007de 100644 --- a/cumulus/bridges/modules/grandpa/src/call_ext.rs +++ b/cumulus/bridges/modules/grandpa/src/call_ext.rs @@ -18,11 +18,11 @@ use crate::{weights::WeightInfo, BridgedBlockNumber, BridgedHeader, Config, Erro use bp_header_chain::{justification::GrandpaJustification, ChainWithGrandpa}; use bp_runtime::BlockNumberOf; use codec::Encode; -use frame_support::{dispatch::CallableCallFor, traits::IsSubType, weights::Weight, RuntimeDebug}; +use frame_support::{dispatch::CallableCallFor, traits::IsSubType, weights::Weight}; use sp_runtime::{ traits::{Header, Zero}, transaction_validity::{InvalidTransaction, TransactionValidity, ValidTransaction}, - SaturatedConversion, + RuntimeDebug, SaturatedConversion, }; /// Info about a `SubmitParachainHeads` call which tries to update a single parachain. diff --git a/cumulus/bridges/modules/messages/src/inbound_lane.rs b/cumulus/bridges/modules/messages/src/inbound_lane.rs index b665b5516fc..359e9022b0b 100644 --- a/cumulus/bridges/modules/messages/src/inbound_lane.rs +++ b/cumulus/bridges/modules/messages/src/inbound_lane.rs @@ -24,8 +24,9 @@ use bp_messages::{ ReceivalResult, UnrewardedRelayer, }; use codec::{Decode, Encode, EncodeLike, MaxEncodedLen}; -use frame_support::{traits::Get, RuntimeDebug}; +use frame_support::traits::Get; use scale_info::{Type, TypeInfo}; +use sp_runtime::RuntimeDebug; use sp_std::prelude::PartialEq; /// Inbound lane storage. diff --git a/cumulus/bridges/modules/messages/src/outbound_lane.rs b/cumulus/bridges/modules/messages/src/outbound_lane.rs index 0cf0c4ccb42..45b0f4e6809 100644 --- a/cumulus/bridges/modules/messages/src/outbound_lane.rs +++ b/cumulus/bridges/modules/messages/src/outbound_lane.rs @@ -25,10 +25,11 @@ use bp_messages::{ use codec::{Decode, Encode}; use frame_support::{ weights::{RuntimeDbWeight, Weight}, - BoundedVec, PalletError, RuntimeDebug, + BoundedVec, PalletError, }; use num_traits::Zero; use scale_info::TypeInfo; +use sp_runtime::RuntimeDebug; use sp_std::collections::vec_deque::VecDeque; /// Outbound lane storage. diff --git a/cumulus/bridges/modules/parachains/src/call_ext.rs b/cumulus/bridges/modules/parachains/src/call_ext.rs index ee3770146c2..ea842a61b3e 100644 --- a/cumulus/bridges/modules/parachains/src/call_ext.rs +++ b/cumulus/bridges/modules/parachains/src/call_ext.rs @@ -17,8 +17,11 @@ use crate::{Config, Pallet, RelayBlockNumber}; use bp_parachains::BestParaHeadHash; use bp_polkadot_core::parachains::{ParaHash, ParaId}; -use frame_support::{dispatch::CallableCallFor, traits::IsSubType, RuntimeDebug}; -use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidity, ValidTransaction}; +use frame_support::{dispatch::CallableCallFor, traits::IsSubType}; +use sp_runtime::{ + transaction_validity::{InvalidTransaction, TransactionValidity, ValidTransaction}, + RuntimeDebug, +}; /// Info about a `SubmitParachainHeads` call which tries to update a single parachain. #[derive(PartialEq, RuntimeDebug)] diff --git a/cumulus/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs b/cumulus/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs index 03f295e07f1..af50a97b28b 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs +++ b/cumulus/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs @@ -27,8 +27,8 @@ use bp_runtime::{ use frame_support::{ dispatch::DispatchClass, sp_runtime::{MultiAddress, MultiSigner}, - RuntimeDebug, }; +use sp_runtime::RuntimeDebug; use sp_std::prelude::Vec; /// BridgeHubKusama parachain. diff --git a/cumulus/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs b/cumulus/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs index ceacfe67ff2..a1f6ae1a1a9 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs +++ b/cumulus/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs @@ -24,7 +24,8 @@ use bp_messages::*; use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, }; -use frame_support::{dispatch::DispatchClass, RuntimeDebug}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::RuntimeDebug; use sp_std::prelude::Vec; /// BridgeHubPolkadot parachain. diff --git a/cumulus/bridges/primitives/chain-bridge-hub-rococo/Cargo.toml b/cumulus/bridges/primitives/chain-bridge-hub-rococo/Cargo.toml index 85c4225ab55..62e268b23bd 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-rococo/Cargo.toml +++ b/cumulus/bridges/primitives/chain-bridge-hub-rococo/Cargo.toml @@ -17,6 +17,7 @@ bp-messages = { path = "../../primitives/messages", default-features = false } frame-support = { 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-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] @@ -27,5 +28,6 @@ std = [ "bp-runtime/std", "frame-support/std", "sp-api/std", + "sp-runtime/std", "sp-std/std", ] diff --git a/cumulus/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs b/cumulus/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs index f8d46ff32bd..37b1a9ebb92 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/cumulus/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -24,13 +24,9 @@ use bp_messages::*; use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, }; -use frame_support::{ - dispatch::DispatchClass, - sp_runtime::{MultiAddress, MultiSigner}, - RuntimeDebug, -}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug}; use sp_std::prelude::Vec; - /// BridgeHubRococo parachain. #[derive(RuntimeDebug)] pub struct BridgeHubRococo; diff --git a/cumulus/bridges/primitives/chain-bridge-hub-wococo/Cargo.toml b/cumulus/bridges/primitives/chain-bridge-hub-wococo/Cargo.toml index 24ecdb7adbc..59372ed61a0 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-wococo/Cargo.toml +++ b/cumulus/bridges/primitives/chain-bridge-hub-wococo/Cargo.toml @@ -18,6 +18,7 @@ bp-messages = { path = "../../primitives/messages", default-features = false } frame-support = { 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-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] @@ -28,5 +29,6 @@ std = [ "bp-messages/std", "frame-support/std", "sp-api/std", + "sp-runtime/std", "sp-std/std", ] diff --git a/cumulus/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs b/cumulus/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs index abbb0cc20ea..635a4c96054 100644 --- a/cumulus/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs +++ b/cumulus/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs @@ -24,7 +24,8 @@ use bp_messages::*; use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, }; -use frame_support::{dispatch::DispatchClass, RuntimeDebug}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::RuntimeDebug; use sp_std::prelude::Vec; /// BridgeHubWococo parachain. diff --git a/cumulus/bridges/primitives/header-chain/src/justification/mod.rs b/cumulus/bridges/primitives/header-chain/src/justification/mod.rs index 5fa5d7d607c..44548b8d3ff 100644 --- a/cumulus/bridges/primitives/header-chain/src/justification/mod.rs +++ b/cumulus/bridges/primitives/header-chain/src/justification/mod.rs @@ -32,10 +32,10 @@ pub use verification::{ use bp_runtime::{BlockNumberOf, Chain, HashOf, HeaderId}; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{RuntimeDebug, RuntimeDebugNoBound}; +use frame_support::RuntimeDebugNoBound; use scale_info::TypeInfo; use sp_consensus_grandpa::{AuthorityId, AuthoritySignature}; -use sp_runtime::{traits::Header as HeaderT, SaturatedConversion}; +use sp_runtime::{traits::Header as HeaderT, RuntimeDebug, SaturatedConversion}; use sp_std::prelude::*; /// A GRANDPA Justification is a proof that a given header was finalized diff --git a/cumulus/bridges/primitives/header-chain/src/justification/verification/mod.rs b/cumulus/bridges/primitives/header-chain/src/justification/verification/mod.rs index 7af5292256c..353960734cc 100644 --- a/cumulus/bridges/primitives/header-chain/src/justification/verification/mod.rs +++ b/cumulus/bridges/primitives/header-chain/src/justification/verification/mod.rs @@ -24,9 +24,8 @@ use crate::{justification::GrandpaJustification, AuthoritySet}; use bp_runtime::HeaderId; use finality_grandpa::voter_set::VoterSet; -use frame_support::RuntimeDebug; use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId}; -use sp_runtime::traits::Header as HeaderT; +use sp_runtime::{traits::Header as HeaderT, RuntimeDebug}; use sp_std::{ collections::{btree_map::BTreeMap, btree_set::BTreeSet}, prelude::*, diff --git a/cumulus/bridges/primitives/messages/src/lib.rs b/cumulus/bridges/primitives/messages/src/lib.rs index 84c41de3b36..8cafd58650f 100644 --- a/cumulus/bridges/primitives/messages/src/lib.rs +++ b/cumulus/bridges/primitives/messages/src/lib.rs @@ -26,13 +26,13 @@ use bp_runtime::{ StorageProofError, }; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{PalletError, RuntimeDebug}; +use frame_support::PalletError; // Weight is reexported to avoid additional frame-support dependencies in related crates. pub use frame_support::weights::Weight; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use source_chain::RelayersRewards; -use sp_core::TypeId; +use sp_core::{RuntimeDebug, TypeId}; use sp_std::{collections::vec_deque::VecDeque, ops::RangeInclusive, prelude::*}; pub mod source_chain; diff --git a/cumulus/bridges/primitives/messages/src/source_chain.rs b/cumulus/bridges/primitives/messages/src/source_chain.rs index 3cc78522baf..5e4be53c53a 100644 --- a/cumulus/bridges/primitives/messages/src/source_chain.rs +++ b/cumulus/bridges/primitives/messages/src/source_chain.rs @@ -20,7 +20,8 @@ use crate::{InboundLaneData, LaneId, MessageNonce, OutboundLaneData, Verificatio use crate::UnrewardedRelayer; use bp_runtime::Size; -use frame_support::{Parameter, RuntimeDebug}; +use frame_support::Parameter; +use sp_core::RuntimeDebug; use sp_std::{ collections::{btree_map::BTreeMap, vec_deque::VecDeque}, fmt::Debug, diff --git a/cumulus/bridges/primitives/messages/src/target_chain.rs b/cumulus/bridges/primitives/messages/src/target_chain.rs index 60f5c1b3c1c..3d73ca50013 100644 --- a/cumulus/bridges/primitives/messages/src/target_chain.rs +++ b/cumulus/bridges/primitives/messages/src/target_chain.rs @@ -22,8 +22,9 @@ use crate::{ use bp_runtime::{messages::MessageDispatchResult, Size}; use codec::{Decode, Encode, Error as CodecError}; -use frame_support::{weights::Weight, Parameter, RuntimeDebug}; +use frame_support::{weights::Weight, Parameter}; use scale_info::TypeInfo; +use sp_core::RuntimeDebug; use sp_std::{collections::btree_map::BTreeMap, fmt::Debug, marker::PhantomData, prelude::*}; /// Proved messages from the source chain. diff --git a/cumulus/bridges/primitives/parachains/src/lib.rs b/cumulus/bridges/primitives/parachains/src/lib.rs index e619fc7b641..21e78e0009f 100644 --- a/cumulus/bridges/primitives/parachains/src/lib.rs +++ b/cumulus/bridges/primitives/parachains/src/lib.rs @@ -29,10 +29,10 @@ use bp_runtime::{ StorageMapKeyProvider, }; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{Blake2_128Concat, RuntimeDebug, Twox64Concat}; +use frame_support::{Blake2_128Concat, Twox64Concat}; use scale_info::TypeInfo; use sp_core::storage::StorageKey; -use sp_runtime::traits::Header as HeaderT; +use sp_runtime::{traits::Header as HeaderT, RuntimeDebug}; use sp_std::{marker::PhantomData, prelude::*}; /// Best known parachain head hash. diff --git a/cumulus/bridges/primitives/polkadot-core/src/lib.rs b/cumulus/bridges/primitives/polkadot-core/src/lib.rs index ffd48d8a389..36ef58eed4d 100644 --- a/cumulus/bridges/primitives/polkadot-core/src/lib.rs +++ b/cumulus/bridges/primitives/polkadot-core/src/lib.rs @@ -25,14 +25,14 @@ use frame_support::{ constants::{BlockExecutionWeight, WEIGHT_REF_TIME_PER_SECOND}, Weight, }, - Blake2_128Concat, RuntimeDebug, + Blake2_128Concat, }; use frame_system::limits; use sp_core::{storage::StorageKey, Hasher as HasherT}; use sp_runtime::{ generic, traits::{BlakeTwo256, IdentifyAccount, Verify}, - MultiAddress, MultiSignature, OpaqueExtrinsic, + MultiAddress, MultiSignature, OpaqueExtrinsic, RuntimeDebug, }; use sp_std::prelude::Vec; diff --git a/cumulus/bridges/primitives/polkadot-core/src/parachains.rs b/cumulus/bridges/primitives/polkadot-core/src/parachains.rs index 9cac3279c72..7268d9c70af 100644 --- a/cumulus/bridges/primitives/polkadot-core/src/parachains.rs +++ b/cumulus/bridges/primitives/polkadot-core/src/parachains.rs @@ -24,9 +24,9 @@ use bp_runtime::{RawStorageProof, Size}; use codec::{CompactAs, Decode, Encode, MaxEncodedLen}; -use frame_support::RuntimeDebug; use scale_info::TypeInfo; use sp_core::Hasher; +use sp_runtime::RuntimeDebug; use sp_std::vec::Vec; #[cfg(feature = "std")] diff --git a/cumulus/bridges/primitives/runtime/Cargo.toml b/cumulus/bridges/primitives/runtime/Cargo.toml index dea3c979b86..3f396e9b803 100644 --- a/cumulus/bridges/primitives/runtime/Cargo.toml +++ b/cumulus/bridges/primitives/runtime/Cargo.toml @@ -10,6 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } hash-db = { version = "0.16.0", default-features = false } impl-trait-for-tuples = "0.2.2" +log = { version = "0.4.19", default-features = false } num-traits = { version = "0.2", default-features = false } scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } @@ -36,6 +37,7 @@ std = [ "frame-support/std", "frame-system/std", "hash-db/std", + "log/std", "num-traits/std", "scale-info/std", "serde/std", diff --git a/cumulus/bridges/primitives/runtime/src/lib.rs b/cumulus/bridges/primitives/runtime/src/lib.rs index 150e015cb4f..f4f52866de9 100644 --- a/cumulus/bridges/primitives/runtime/src/lib.rs +++ b/cumulus/bridges/primitives/runtime/src/lib.rs @@ -20,14 +20,17 @@ use codec::{Decode, Encode, FullCodec, MaxEncodedLen}; use frame_support::{ - log, pallet_prelude::DispatchResult, weights::Weight, PalletError, RuntimeDebug, StorageHasher, - StorageValue, + pallet_prelude::DispatchResult, weights::Weight, PalletError, StorageHasher, StorageValue, }; use frame_system::RawOrigin; +use log; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_core::storage::StorageKey; -use sp_runtime::traits::{BadOrigin, Header as HeaderT, UniqueSaturatedInto}; +use sp_runtime::{ + traits::{BadOrigin, Header as HeaderT, UniqueSaturatedInto}, + RuntimeDebug, +}; use sp_std::{convert::TryFrom, fmt::Debug, ops::RangeInclusive, vec, vec::Vec}; pub use chain::{ diff --git a/cumulus/bridges/primitives/runtime/src/messages.rs b/cumulus/bridges/primitives/runtime/src/messages.rs index d3085829578..e3ce37ed592 100644 --- a/cumulus/bridges/primitives/runtime/src/messages.rs +++ b/cumulus/bridges/primitives/runtime/src/messages.rs @@ -17,8 +17,9 @@ //! Primitives that may be used by different message delivery and dispatch mechanisms. use codec::{Decode, Encode}; -use frame_support::{weights::Weight, RuntimeDebug}; +use frame_support::weights::Weight; use scale_info::TypeInfo; +use sp_runtime::RuntimeDebug; /// Message dispatch result. #[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)] diff --git a/cumulus/bridges/primitives/runtime/src/storage_types.rs b/cumulus/bridges/primitives/runtime/src/storage_types.rs index b37f779d00b..e555f60e87f 100644 --- a/cumulus/bridges/primitives/runtime/src/storage_types.rs +++ b/cumulus/bridges/primitives/runtime/src/storage_types.rs @@ -18,8 +18,9 @@ //! during conversion. use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{traits::Get, RuntimeDebug}; +use frame_support::traits::Get; use scale_info::{Type, TypeInfo}; +use sp_runtime::RuntimeDebug; use sp_std::{marker::PhantomData, ops::Deref}; /// Error that is returned when the value size exceeds maximal configured size. diff --git a/cumulus/pallets/collator-selection/src/benchmarking.rs b/cumulus/pallets/collator-selection/src/benchmarking.rs index 5fc92f8a783..5eb8a5ce65b 100644 --- a/cumulus/pallets/collator-selection/src/benchmarking.rs +++ b/cumulus/pallets/collator-selection/src/benchmarking.rs @@ -21,11 +21,11 @@ use super::*; #[allow(unused)] use crate::Pallet as CollatorSelection; +use codec::Decode; use frame_benchmarking::{ account, impl_benchmark_test_suite, v2::*, whitelisted_caller, BenchmarkError, }; use frame_support::{ - codec::Decode, dispatch::DispatchResult, traits::{Currency, EnsureOrigin, Get, ReservableCurrency}, }; diff --git a/cumulus/pallets/collator-selection/src/lib.rs b/cumulus/pallets/collator-selection/src/lib.rs index 539a4d8bd95..924b24d7104 100644 --- a/cumulus/pallets/collator-selection/src/lib.rs +++ b/cumulus/pallets/collator-selection/src/lib.rs @@ -83,10 +83,6 @@ pub mod pallet { use frame_support::{ dispatch::{DispatchClass, DispatchResultWithPostInfo}, pallet_prelude::*, - sp_runtime::{ - traits::{AccountIdConversion, CheckedSub, Saturating, Zero}, - RuntimeDebug, - }, traits::{ Currency, EnsureOrigin, ExistenceRequirement::KeepAlive, ReservableCurrency, ValidatorRegistration, @@ -95,7 +91,10 @@ pub mod pallet { }; use frame_system::{pallet_prelude::*, Config as SystemConfig}; use pallet_session::SessionManager; - use sp_runtime::traits::Convert; + use sp_runtime::{ + traits::{AccountIdConversion, CheckedSub, Convert, Saturating, Zero}, + RuntimeDebug, + }; use sp_staking::SessionIndex; use sp_std::vec::Vec; diff --git a/cumulus/pallets/collator-selection/src/migration.rs b/cumulus/pallets/collator-selection/src/migration.rs index e26d9f08b5b..3b298353386 100644 --- a/cumulus/pallets/collator-selection/src/migration.rs +++ b/cumulus/pallets/collator-selection/src/migration.rs @@ -17,7 +17,8 @@ //! A module that is responsible for migration of storage for Collator Selection. use super::*; -use frame_support::{log, traits::OnRuntimeUpgrade}; +use frame_support::traits::OnRuntimeUpgrade; +use log; /// Version 1 Migration /// This migration ensures that any existing `Invulnerables` storage lists are sorted. diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 17933df4036..ff0d4e4fe27 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -42,7 +42,6 @@ use frame_support::{ storage, traits::Get, weights::Weight, - RuntimeDebug, }; use frame_system::{ensure_none, ensure_root, pallet_prelude::HeaderFor}; use polkadot_parachain::primitives::RelayChainBlockNumber; @@ -53,6 +52,7 @@ use sp_runtime::{ InvalidTransaction, TransactionLongevity, TransactionSource, TransactionValidity, ValidTransaction, }, + RuntimeDebug, }; use sp_std::{cmp, collections::btree_map::BTreeMap, prelude::*}; use xcm::latest::XcmHash; diff --git a/cumulus/pallets/parachain-system/src/unincluded_segment.rs b/cumulus/pallets/parachain-system/src/unincluded_segment.rs index 1a3628a9f96..2598228dd60 100644 --- a/cumulus/pallets/parachain-system/src/unincluded_segment.rs +++ b/cumulus/pallets/parachain-system/src/unincluded_segment.rs @@ -23,8 +23,8 @@ use super::relay_state_snapshot::{MessagingStateSnapshot, RelayDispatchQueueRemainingCapacity}; use codec::{Decode, Encode}; use cumulus_primitives_core::{relay_chain, ParaId}; -use frame_support::RuntimeDebug; use scale_info::TypeInfo; +use sp_runtime::RuntimeDebug; use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData}; /// Constraints on outbound HRMP channel. diff --git a/cumulus/parachains/common/Cargo.toml b/cumulus/parachains/common/Cargo.toml index 3fb3a2c8622..16c57f11fe3 100644 --- a/cumulus/parachains/common/Cargo.toml +++ b/cumulus/parachains/common/Cargo.toml @@ -10,6 +10,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } +log = { version = "0.4.19", default-features = false } scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } num-traits = { version = "0.2", default-features = false} @@ -49,6 +50,7 @@ default = ["std"] std = [ "frame-support/std", "frame-system/std", + "log/std", "pallet-assets/std", "pallet-authorship/std", "pallet-balances/std", diff --git a/cumulus/parachains/common/src/xcm_config.rs b/cumulus/parachains/common/src/xcm_config.rs index 529822cff16..99dd0ace0fc 100644 --- a/cumulus/parachains/common/src/xcm_config.rs +++ b/cumulus/parachains/common/src/xcm_config.rs @@ -1,10 +1,10 @@ use crate::impls::AccountIdOf; use core::marker::PhantomData; use frame_support::{ - log, traits::{fungibles::Inspect, tokens::ConversionToAssetBalance, ContainsPair}, weights::Weight, }; +use log; use sp_runtime::traits::Get; use xcm::latest::prelude::*; diff --git a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml index ce38c62c565..b7d503ddfc7 100644 --- a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml @@ -19,6 +19,7 @@ frame-system = { default-features = false, git = "https://github.com/paritytech/ sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } pallet-assets = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs index 0eeb5d5da28..f6d58970036 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs @@ -12,7 +12,7 @@ pub use constants::{ use frame_support::{ assert_ok, instances::Instance1, - parameter_types, sp_tracing, + parameter_types, traits::{fungibles::Inspect, Hooks}, }; pub use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler}; @@ -21,6 +21,7 @@ pub use paste; use polkadot_parachain::primitives::HrmpChannelId; pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId}; pub use sp_core::{sr25519, storage::Storage, Get}; +use sp_tracing; use xcm_emulator::{ assert_expected_events, bx, decl_test_bridges, decl_test_networks, decl_test_parachains, decl_test_relay_chains, decl_test_sender_receiver_accounts_parameter_types, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml index 8eaf2536b6b..b622ff7efdb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml @@ -47,6 +47,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs index acca5fb952a..27014417d3c 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs @@ -60,7 +60,7 @@ use frame_support::{ InstanceFilter, }, weights::{ConstantMultiplier, Weight}, - BoundedVec, PalletId, RuntimeDebug, + BoundedVec, PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -74,6 +74,7 @@ use parachains_common::{ Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; +use sp_runtime::RuntimeDebug; use xcm::opaque::v3::MultiLocation; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, KsmLocation, @@ -1185,7 +1186,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml index b3e489f209d..afc652f4644 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml @@ -44,6 +44,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs index 7bee6ef4f5b..7f1568d8682 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs @@ -92,7 +92,7 @@ use frame_support::{ InstanceFilter, }, weights::{ConstantMultiplier, Weight}, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -106,6 +106,7 @@ use parachains_common::{ Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; +use sp_runtime::RuntimeDebug; use xcm_config::{ DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, @@ -1065,7 +1066,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 218e9130ba0..a8728f805c0 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -46,6 +46,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } # num-traits feature needed for dex integer sq root: @@ -79,6 +80,7 @@ assets-common = { path = "../common", default-features = false } [dev-dependencies] hex-literal = "0.4.1" asset-test-utils = { path = "../test-utils"} +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 611defcb837..76350dba199 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -47,7 +47,7 @@ use frame_support::{ ConstU64, ConstU8, InstanceFilter, }, weights::{ConstantMultiplier, Weight}, - BoundedVec, PalletId, RuntimeDebug, + BoundedVec, PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -67,7 +67,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Permill, + ApplyExtrinsicResult, Permill, RuntimeDebug, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -1199,7 +1199,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs index 18ab94f4528..b2bb511182e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs @@ -36,11 +36,12 @@ use asset_test_utils::{CollatorSessionKeys, ExtBuilder, XcmReceivedFrom}; use codec::{Decode, DecodeLimit, Encode}; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ - assert_noop, assert_ok, sp_io, + assert_noop, assert_ok, traits::fungibles::InspectEnumerable, weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance}; +use sp_io; use sp_runtime::traits::MaybeEquivalence; use std::convert::Into; use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; diff --git a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs index 96e3605fb89..7eee95bb3b6 100644 --- a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs +++ b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs @@ -16,7 +16,7 @@ //! Runtime API definition for fungibles. use codec::{Codec, Decode, Encode}; -use frame_support::RuntimeDebug; +use sp_runtime::RuntimeDebug; #[cfg(feature = "std")] use {sp_std::vec::Vec, xcm::latest::MultiAsset}; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml index b0555db136b..18b41df7428 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -43,6 +43,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index 186e0bef616..7892e7400d0 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -647,7 +647,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 316883afc90..a4e175b445f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -43,6 +43,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs index c44c509fcad..eec6c859be5 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -647,7 +647,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index dab5c2a38b2..c9f15c2eec4 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -43,6 +43,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_rococo_config.rs index 274951b3bd2..d45238b0f42 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_rococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_rococo_config.rs @@ -33,7 +33,8 @@ use bridge_runtime_common::{ RefundableParachain, }, }; -use frame_support::{parameter_types, traits::PalletInfoAccess, RuntimeDebug}; +use frame_support::{parameter_types, traits::PalletInfoAccess}; +use sp_runtime::RuntimeDebug; use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_wococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_wococo_config.rs index e6342af128e..b676e2c5994 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_wococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_hub_wococo_config.rs @@ -33,7 +33,8 @@ use bridge_runtime_common::{ RefundableParachain, }, }; -use frame_support::{parameter_types, traits::PalletInfoAccess, RuntimeDebug}; +use frame_support::{parameter_types, traits::PalletInfoAccess}; +use sp_runtime::RuntimeDebug; use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 37fa1156256..58e073b79c7 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -928,7 +928,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml index 25532246416..a23db7d4955 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml @@ -48,6 +48,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs index df2bf8c168b..c28b4e2dc1e 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs @@ -16,10 +16,10 @@ use crate::OriginCaller; use frame_support::{ dispatch::{DispatchError, DispatchResultWithPostInfo}, - log, traits::{Currency, Get, Imbalance, OnUnbalanced, OriginTrait, PrivilegeCmp}, weights::Weight, }; +use log; use pallet_alliance::{ProposalIndex, ProposalProvider}; use parachains_common::impls::NegativeImbalance; use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*}; diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index b50f593a145..74c19cd9db3 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -71,7 +71,7 @@ use frame_support::{ parameter_types, traits::{ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter}, weights::{ConstantMultiplier, Weight}, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -83,6 +83,7 @@ use parachains_common::{ AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; +use sp_runtime::RuntimeDebug; use xcm_config::{GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] @@ -860,7 +861,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index 3e81fe7d318..dc160d3b99f 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -27,6 +27,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" } diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index adefb8a9016..e25fec418f4 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -654,7 +654,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { diff --git a/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml index 9b79d4c6007..08d9e1667dd 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml @@ -26,6 +26,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs index d9f868175ae..cd9d31a4d98 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs @@ -374,7 +374,9 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; + use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/test-utils/Cargo.toml b/cumulus/parachains/runtimes/test-utils/Cargo.toml index 9294e93faba..90ff85bde1b 100644 --- a/cumulus/parachains/runtimes/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/test-utils/Cargo.toml @@ -18,6 +18,7 @@ sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-f sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } # Cumulus diff --git a/cumulus/parachains/runtimes/test-utils/src/lib.rs b/cumulus/parachains/runtimes/test-utils/src/lib.rs index ec7cd6bd299..93183a73c22 100644 --- a/cumulus/parachains/runtimes/test-utils/src/lib.rs +++ b/cumulus/parachains/runtimes/test-utils/src/lib.rs @@ -148,7 +148,7 @@ impl< } pub fn with_tracing(self) -> Self { - frame_support::sp_tracing::try_init_simple(); + sp_tracing::try_init_simple(); self } diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index ea0f68d3b75..2abe15d8053 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -48,6 +48,7 @@ sp-offchain = { git = "https://github.com/paritytech/substrate", default-feature sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index da4b17470ea..dbae5fa8018 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -800,7 +800,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime {}