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 <>
This commit is contained in:
Juan
2023-08-23 13:35:12 +02:00
committed by GitHub
parent f525c8cf52
commit 8349c8d18a
63 changed files with 136 additions and 71 deletions
+17
View File
@@ -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",
@@ -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";
@@ -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.
@@ -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.
@@ -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};
@@ -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.
@@ -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.
@@ -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.
@@ -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)]
@@ -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.
@@ -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.
@@ -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",
]
@@ -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;
@@ -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",
]
@@ -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.
@@ -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
@@ -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::*,
@@ -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;
@@ -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,
@@ -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.
@@ -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.
@@ -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;
@@ -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")]
@@ -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",
@@ -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::{
@@ -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)]
@@ -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.
@@ -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},
};
@@ -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;
@@ -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.
+1 -1
View File
@@ -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;
@@ -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.
+2
View File
@@ -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",
+1 -1
View File
@@ -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::*;
@@ -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" }
@@ -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,
@@ -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" }
@@ -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<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -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<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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 }
@@ -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<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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};
@@ -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};
@@ -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" }
@@ -647,7 +647,8 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -647,7 +647,8 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -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},
@@ -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},
@@ -928,7 +928,8 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -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::*};
@@ -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<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -654,7 +654,8 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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 {
@@ -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" }
@@ -374,7 +374,9 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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<u8>) -> Result<(), BenchmarkError> {
@@ -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
@@ -148,7 +148,7 @@ impl<
}
pub fn with_tracing(self) -> Self {
frame_support::sp_tracing::try_init_simple();
sp_tracing::try_init_simple();
self
}
@@ -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" }
@@ -800,7 +800,8 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, 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 {}