From f0b12c5fe16d56947fc25d9b95ea4bf351f0be1b Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Tue, 15 Aug 2023 17:05:43 +0200 Subject: [PATCH 1/9] move RuntimeDebug out of frame_support --- runtime/kusama/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 0248b02e12f6..8fadc24161a6 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -63,7 +63,7 @@ use frame_support::{ PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; @@ -79,7 +79,7 @@ use sp_runtime::{ OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; #[cfg(any(feature = "std", test))] From a9b9149003912b9168279cdf400ee29bc44ce3e4 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Tue, 15 Aug 2023 17:15:42 +0200 Subject: [PATCH 2/9] move RuntimeDebug out of frame_support --- runtime/polkadot/src/lib.rs | 4 ++-- runtime/rococo/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index fbf896cdedc5..7241dd72fc12 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -50,7 +50,7 @@ use frame_support::{ PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; @@ -77,7 +77,7 @@ use sp_runtime::{ OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index d923437a67e5..9e71d122ae31 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -62,7 +62,7 @@ use frame_support::{ PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; @@ -77,7 +77,7 @@ use sp_runtime::{ Extrinsic as ExtrinsicT, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill, + ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; #[cfg(any(feature = "std", test))] From 7534e276650e3928ccceb68086fdc4b4a3241617 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Wed, 16 Aug 2023 17:51:06 +0200 Subject: [PATCH 3/9] fix xcm export --- xcm/xcm-simulator/example/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index 1f6956485a84..78db07750ebe 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -17,7 +17,7 @@ mod parachain; mod relay_chain; -use frame_support::sp_tracing; +use sp_tracing; use sp_runtime::BuildStorage; use xcm::prelude::*; use xcm_executor::traits::ConvertLocation; From df115a8b8eb4477123515d0d18b993ae41e64c15 Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Wed, 16 Aug 2023 16:08:32 +0000 Subject: [PATCH 4/9] ".git/.scripts/commands/fmt/fmt.sh" --- xcm/xcm-simulator/example/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index 78db07750ebe..85b8ad1c5cb7 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -17,8 +17,8 @@ mod parachain; mod relay_chain; -use sp_tracing; use sp_runtime::BuildStorage; +use sp_tracing; use xcm::prelude::*; use xcm_executor::traits::ConvertLocation; use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt}; From cff944e4526dad156b3686bd00d080626194be50 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Thu, 17 Aug 2023 14:32:53 +0200 Subject: [PATCH 5/9] fix xcm intefration tests --- xcm/xcm-executor/integration-tests/Cargo.toml | 1 + xcm/xcm-executor/integration-tests/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xcm/xcm-executor/integration-tests/Cargo.toml b/xcm/xcm-executor/integration-tests/Cargo.toml index 18a729e082d2..cec9754baa31 100644 --- a/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/xcm/xcm-executor/integration-tests/Cargo.toml @@ -8,6 +8,7 @@ version.workspace = true publish = false [dependencies] +codec = { package = "parity-scale-codec", version = "3.6.1" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" diff --git a/xcm/xcm-executor/integration-tests/src/lib.rs b/xcm/xcm-executor/integration-tests/src/lib.rs index 111833e67cfb..d8c77f8317e1 100644 --- a/xcm/xcm-executor/integration-tests/src/lib.rs +++ b/xcm/xcm-executor/integration-tests/src/lib.rs @@ -17,7 +17,8 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg(test)] -use frame_support::{codec::Encode, dispatch::GetDispatchInfo, weights::Weight}; +use codec::Encode; +use frame_support::{dispatch::GetDispatchInfo, weights::Weight}; use polkadot_test_client::{ BlockBuilderExt, ClientBlockImportExt, DefaultTestClientBuilderExt, InitPolkadotBlockBuilder, TestClientBuilder, TestClientBuilderExt, From 4287a28d45183113323bf37e268683a424b2a4bb Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Thu, 17 Aug 2023 15:42:42 +0200 Subject: [PATCH 6/9] fix cargo lock for xcm intefration tests --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index 4d37230ea10f..e186d0a5ce2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14126,6 +14126,7 @@ dependencies = [ "frame-system", "futures", "pallet-xcm", + "parity-scale-codec", "polkadot-test-client", "polkadot-test-runtime", "polkadot-test-service", From b5fbecbcbe951dffb08c2ba665ba6cb245023936 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Mon, 21 Aug 2023 13:18:01 +0200 Subject: [PATCH 7/9] wip --- runtime/rococo/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index cf14794362a6..d2cbbe261e3a 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -2115,9 +2115,10 @@ sp_api::impl_runtime_apis! { sp_runtime::RuntimeString, > { use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; + use sp_storage::TrackedStorageKey; use xcm::latest::prelude::*; use xcm_config::{ LocalCheckAccount, LocationConverter, Rockmine, TokenLocation, XcmConfig, From d4dafd93c2f32b555fb51980073842ebc5426791 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Mon, 21 Aug 2023 18:02:45 +0200 Subject: [PATCH 8/9] restructure benchmarking macro related exports --- runtime/kusama/Cargo.toml | 1 + runtime/kusama/src/lib.rs | 3 ++- runtime/polkadot/Cargo.toml | 1 + runtime/polkadot/src/lib.rs | 3 ++- runtime/rococo/Cargo.toml | 1 + runtime/westend/Cargo.toml | 1 + runtime/westend/src/lib.rs | 3 ++- 7 files changed, 10 insertions(+), 3 deletions(-) diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 28598bde9443..04297101ff83 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -32,6 +32,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index da4f9f243982..ff1c1cf412fe 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -2163,7 +2163,8 @@ sp_api::impl_runtime_apis! { sp_runtime::RuntimeString, > { use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. // To get around that, we separated the benchmarks into its own crate. use pallet_session_benchmarking::Pallet as SessionBench; diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 5d343811fb14..76a01051a122 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -33,6 +33,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a06acbdb9e9b..76f64dac112f 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -2077,7 +2077,8 @@ sp_api::impl_runtime_apis! { sp_runtime::RuntimeString, > { use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. // To get around that, we separated the benchmarks into its own crate. use pallet_session_benchmarking::Pallet as SessionBench; diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index 95791edda710..527bc1af9ccc 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -30,6 +30,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index 79583fc2fb1e..1974ded1e621 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -29,6 +29,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 3ade28c51fba..2a41a27d7527 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1842,7 +1842,8 @@ sp_api::impl_runtime_apis! { sp_runtime::RuntimeString, > { use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. // To get around that, we separated the benchmarks into its own crate. use pallet_session_benchmarking::Pallet as SessionBench; From d3c9d88bea819bcc3fd7b270382b1944c466beff Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Mon, 21 Aug 2023 18:11:59 +0200 Subject: [PATCH 9/9] update cargo lock --- Cargo.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 51d0ecbbebd4..c06dd152197c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4345,6 +4345,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-trie", @@ -8379,6 +8380,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-trie", @@ -9808,6 +9810,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-trie", @@ -14715,6 +14718,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-version",