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
@@ -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};