From 6ae48357adffb4cf82c1ec432c7e31f94416a569 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 13 Jul 2021 14:53:21 +0200 Subject: [PATCH 01/29] feat: add convert to liquid dispatchable call --- pallets/saft-registry/src/lib.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pallets/saft-registry/src/lib.rs b/pallets/saft-registry/src/lib.rs index 9ba4705bb4..4990c5621c 100644 --- a/pallets/saft-registry/src/lib.rs +++ b/pallets/saft-registry/src/lib.rs @@ -26,6 +26,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use pallet_asset_index::traits::AssetRecorder; + use xcm::v0::MultiLocation; #[pallet::config] pub trait Config: frame_system::Config { @@ -80,6 +81,9 @@ pub mod pallet { /// The NAV for a SAFT was updated /// \[AssetId, AssetIndex, OldNav, NewNav\] NavUpdated(T::AssetId, u32, T::Balance, T::Balance), + /// A SAFT was converted into a liquid asset + /// \[AssetId, MultiLocation\] + ConvertedToLiquid(T::AssetId, MultiLocation), } #[pallet::error] @@ -176,6 +180,20 @@ pub mod pallet { })?; Ok(().into()) } + + /// Converts the given SAFT asset into a liquid asset with the given location + #[pallet::weight(10_000)] // TODO: Set weights + pub fn convert_to_liquid( + origin: OriginFor, + asset_id: T::AssetId, + location: MultiLocation, + ) -> DispatchResult { + T::AdminOrigin::ensure_origin(origin)?; + + // TODO: how to handle individual indices? + + Ok(()) + } } /// Trait for the asset-index pallet extrinsic weights. From e0b7bf769bb2baa23e648d436310c2e979d97285 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:39:38 +0200 Subject: [PATCH 02/29] add convert to liquid extrinsic --- pallets/saft-registry/src/lib.rs | 51 ++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/pallets/saft-registry/src/lib.rs b/pallets/saft-registry/src/lib.rs index 4990c5621c..d21fcd8950 100644 --- a/pallets/saft-registry/src/lib.rs +++ b/pallets/saft-registry/src/lib.rs @@ -16,9 +16,9 @@ mod tests; #[frame_support::pallet] // this is requires as the #[pallet::event] proc macro generates code that violates this lint #[allow(clippy::unused_unit)] +#[allow(clippy::large_enum_variant)] pub mod pallet { use frame_support::{ - dispatch::DispatchResultWithPostInfo, pallet_prelude::*, sp_runtime::traits::{AtLeast32BitUnsigned, Zero}, sp_std::prelude::*, @@ -26,6 +26,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use pallet_asset_index::traits::AssetRecorder; + use pallet_asset_index::types::AssetAvailability; use xcm::v0::MultiLocation; #[pallet::config] @@ -88,8 +89,10 @@ pub mod pallet { #[pallet::error] pub enum Error { - // No SAFT with the given index exists for the given AssetId + /// No SAFT with the given index exists for the given AssetId AssetIndexOutOfBounds, + /// Thrown if the given asset was not a known SAFT. + ExpectedSAFT, } #[pallet::hooks] @@ -108,14 +111,14 @@ pub mod pallet { asset_id: T::AssetId, nav: T::Balance, units: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { T::AdminOrigin::ensure_origin(origin.clone())?; let caller = ensure_signed(origin)?; if units.is_zero() { - return Ok(().into()); + return Ok(()); } // mint SAFT units into the index and credit the caller's account with PINT - ::AssetRecorder::add_saft(&caller, asset_id, units, nav.clone())?; + ::AssetRecorder::add_saft(&caller, asset_id, units, nav)?; let index = ActiveSAFTs::::mutate(asset_id, |records| { let index = records.len() as u32; @@ -125,7 +128,7 @@ pub mod pallet { Self::deposit_event(Event::::SAFTAdded(asset_id, index)); - Ok(().into()) + Ok(()) } #[pallet::weight(10_000)] // TODO: Set weights @@ -133,13 +136,13 @@ pub mod pallet { origin: OriginFor, asset_id: T::AssetId, index: u32, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { T::AdminOrigin::ensure_origin(origin.clone())?; let who = ensure_signed(origin)?; let index_usize: usize = index as usize; - ActiveSAFTs::::try_mutate(asset_id.clone(), |safts| -> Result<(), DispatchError> { + ActiveSAFTs::::try_mutate(asset_id, |safts| -> Result<(), DispatchError> { if index_usize >= safts.len() { Err(Error::::AssetIndexOutOfBounds.into()) } else { @@ -151,7 +154,7 @@ pub mod pallet { } })?; - Ok(().into()) + Ok(()) } #[pallet::weight(T::WeightInfo::report_nav())] @@ -162,13 +165,13 @@ pub mod pallet { asset_id: T::AssetId, index: u32, latest_nav: T::Balance, - ) -> DispatchResultWithPostInfo { + ) -> DispatchResult { T::AdminOrigin::ensure_origin(origin)?; let index_usize: usize = index as usize; - ActiveSAFTs::::try_mutate(asset_id.clone(), |safts| -> Result<(), DispatchError> { + ActiveSAFTs::::try_mutate(asset_id, |safts| -> Result<(), DispatchError> { if let Some(mut nav_record) = safts.get_mut(index_usize) { - let old_nav = nav_record.nav.clone(); - nav_record.nav = latest_nav.clone(); + let old_nav = nav_record.nav; + nav_record.nav = latest_nav; Self::deposit_event(Event::::NavUpdated( asset_id, index, old_nav, latest_nav, )); @@ -178,11 +181,12 @@ pub mod pallet { Err(Error::::AssetIndexOutOfBounds.into()) } })?; - Ok(().into()) + Ok(()) } /// Converts the given SAFT asset into a liquid asset with the given location - #[pallet::weight(10_000)] // TODO: Set weights + #[pallet::weight(T::WeightInfo::convert_to_liquid())] + #[transactional] pub fn convert_to_liquid( origin: OriginFor, asset_id: T::AssetId, @@ -190,8 +194,18 @@ pub mod pallet { ) -> DispatchResult { T::AdminOrigin::ensure_origin(origin)?; - // TODO: how to handle individual indices? + // update the asset location and ensure it was a SAFT + let maybe_availability = + T::AssetRecorder::insert_asset_availability(asset_id, location.clone().into()); + ensure!( + maybe_availability == Some(AssetAvailability::Saft), + Error::::ExpectedSAFT + ); + + // remove all SAFT records, balances are already tracked for each deposit + ActiveSAFTs::::remove(&asset_id); + Self::deposit_event(Event::::ConvertedToLiquid(asset_id, location)); Ok(()) } } @@ -205,6 +219,7 @@ pub mod pallet { // // fn remove_saft() -> Weight; fn report_nav() -> Weight; + fn convert_to_liquid() -> Weight; } /// For backwards compatibility and tests @@ -216,5 +231,9 @@ pub mod pallet { fn report_nav() -> Weight { Default::default() } + + fn convert_to_liquid() -> Weight { + Default::default() + } } } From 56e4f36002e0f47d67fc2a194b77400df728db3f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:39:51 +0200 Subject: [PATCH 03/29] update tests --- pallets/saft-registry/Cargo.toml | 7 +++++-- pallets/saft-registry/src/tests.rs | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pallets/saft-registry/Cargo.toml b/pallets/saft-registry/Cargo.toml index b1d745abc1..d8aa5b5f4f 100644 --- a/pallets/saft-registry/Cargo.toml +++ b/pallets/saft-registry/Cargo.toml @@ -16,6 +16,9 @@ frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'pol frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false, optional = true } +# polkadot +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.8', default-features = false } + # PINT dependencies pallet-asset-index = {path = "../asset-index", default-features = false } @@ -29,8 +32,6 @@ sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkad pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8' } -# polkadot -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.8' } pallet-asset-index = { path = "../asset-index" } pallet-remote-asset-manager = { path = "../remote-asset-manager" } @@ -51,6 +52,8 @@ std = [ 'frame-support/std', 'frame-system/std', + 'xcm/std', + 'pallet-asset-index/std', ] runtime-benchmarks = [ diff --git a/pallets/saft-registry/src/tests.rs b/pallets/saft-registry/src/tests.rs index f38f11d532..4acb07b0ff 100644 --- a/pallets/saft-registry/src/tests.rs +++ b/pallets/saft-registry/src/tests.rs @@ -5,7 +5,9 @@ use crate as pallet; use crate::mock::*; use crate::SAFTRecord; use frame_support::{assert_noop, assert_ok}; +use primitives::traits::MultiAssetRegistry; use sp_runtime::traits::BadOrigin; +use xcm::v0::{Junction, MultiLocation}; const ASHLEY: AccountId = 0; const ASSET_A: u32 = 0; @@ -157,3 +159,25 @@ fn admin_cannot_update_or_remove_invalid_index() { assert_eq!(super::ActiveSAFTs::::get(ASSET_A), expected_registry); }); } + +#[test] +fn can_convert_to_liquid() { + new_test_ext().execute_with(|| { + // add + assert_ok!(SaftRegistry::add_saft( + Origin::signed(ADMIN_ACCOUNT_ID), + ASSET_A, + 100, + 20 + )); + assert!(!AssetIndex::is_liquid_asset(&ASSET_A)); + + let location: MultiLocation = (Junction::Parent, Junction::Parachain(100)).into(); + assert_ok!(SaftRegistry::convert_to_liquid( + Origin::signed(ADMIN_ACCOUNT_ID), + ASSET_A, + location.clone() + )); + assert_eq!(AssetIndex::native_asset_location(&ASSET_A), Some(location)); + }); +} From 7f6ed2e603b2b3bd2010c3e5ede668ef8d5eed21 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:40:03 +0200 Subject: [PATCH 04/29] cleanup --- pallets/asset-index/src/lib.rs | 6 ------ pallets/asset-index/src/types.rs | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/asset-index/src/lib.rs b/pallets/asset-index/src/lib.rs index 08b3c9d670..d4fd375a4b 100644 --- a/pallets/asset-index/src/lib.rs +++ b/pallets/asset-index/src/lib.rs @@ -326,9 +326,6 @@ pub mod pallet { if units.is_zero() { return Ok(().into()); } - - Self::ensure_not_native_asset(&asset_id)?; - Self::ensure_not_native_asset(&asset_id)?; // calculate current PINT equivalent value @@ -429,9 +426,6 @@ pub mod pallet { // native asset can't be deposited here Self::ensure_not_native_asset(&asset_id)?; - // native asset can't be deposited here - Self::ensure_not_native_asset(&asset_id)?; - // only liquid assets can be deposited Self::ensure_liquid_asset(&asset_id)?; diff --git a/pallets/asset-index/src/types.rs b/pallets/asset-index/src/types.rs index a16916e115..7bc4c95ced 100644 --- a/pallets/asset-index/src/types.rs +++ b/pallets/asset-index/src/types.rs @@ -55,6 +55,12 @@ impl AssetAvailability { } } +impl From for AssetAvailability { + fn from(location: MultiLocation) -> Self { + AssetAvailability::Liquid(location) + } +} + /// Metadata for an asset #[derive(PartialEq, Eq, Clone, Default, Encode, Decode, RuntimeDebug)] pub struct AssetMetadata { From c213d78791ef017c7c64ea1d4cf89644bad0b4b6 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:40:21 +0200 Subject: [PATCH 05/29] use std feature --- pallets/remote-asset-manager/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/remote-asset-manager/Cargo.toml b/pallets/remote-asset-manager/Cargo.toml index 7051351bdd..72ce3e87a4 100644 --- a/pallets/remote-asset-manager/Cargo.toml +++ b/pallets/remote-asset-manager/Cargo.toml @@ -82,7 +82,6 @@ orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-modul orml-tokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } orml-unknown-tokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } orml-xcm-support = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } -orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } [features] default = ['std'] @@ -102,7 +101,8 @@ std = [ 'cumulus-pallet-xcm/std', 'cumulus-primitives-core/std', - 'orml-traits/std' + 'orml-traits/std', + 'orml-xtokens/std', ] # this feature is only for compilation now runtime-benchmarks = [ From 712cf99f7aec38907a818b3f3f6a42e16f6167c5 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:40:30 +0200 Subject: [PATCH 06/29] bump orml --- Cargo.lock | 12 ++++++------ Cargo.toml | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9bd35b8fe..770599a52c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4793,7 +4793,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "frame-support", "frame-system", @@ -4809,7 +4809,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "frame-support", "frame-system", @@ -4824,7 +4824,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -4855,7 +4855,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "frame-support", "parity-scale-codec", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "frame-support", "orml-traits", @@ -4882,7 +4882,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca054d3#ca054d3078a8d157d0c176ed319d6ff49f38d349" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=1095b9c#1095b9c0004dd6cf10bf67908ed35ff12b78e51b" dependencies = [ "cumulus-primitives-core", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index 38a290edc0..979863901a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -194,8 +194,8 @@ beefy-gadget = { git = "https://github.com/paritytech//grandpa-bridge-gadget", r beefy-gadget-rpc = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "55ae3329847e0bbde51c9d45991d99f444777555" } [patch."https://github.com/open-web3-stack/open-runtime-module-library"] -orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca054d3" } -orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca054d3" } -orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca054d3" } -orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca054d3" } -orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca054d3" } +orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "1095b9c" } +orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "1095b9c" } +orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "1095b9c" } +orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "1095b9c" } +orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "1095b9c" } From 0317ba543bebf1ee4e3025f5284bd78327fa7a0f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 11:46:47 +0200 Subject: [PATCH 07/29] add weight --- runtime/src/weights/pallet_saft_registry.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/weights/pallet_saft_registry.rs b/runtime/src/weights/pallet_saft_registry.rs index 1ff8ebe864..2b2ab46db6 100644 --- a/runtime/src/weights/pallet_saft_registry.rs +++ b/runtime/src/weights/pallet_saft_registry.rs @@ -41,4 +41,9 @@ impl pallet_saft_registry::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + fn convert_to_liquid() -> Weight { + (18_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } From 2865c1970f05c92f0748f51b4ddf0a105f5f2627 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 20 Jul 2021 12:16:27 +0200 Subject: [PATCH 08/29] feat: add transaction payment pallet --- Cargo.lock | 43 +++++++++++---- pallets/asset-index/Cargo.toml | 2 +- pallets/local-treasury/Cargo.toml | 2 +- pallets/price-feed/Cargo.toml | 4 +- pallets/remote-asset-manager/Cargo.toml | 4 +- pallets/saft-registry/Cargo.toml | 2 +- pallets/transaction-payment/Cargo.toml | 63 ++++++++++++++++++++++ pallets/transaction-payment/README.md | 1 + pallets/transaction-payment/src/lib.rs | 71 +++++++++++++++++++++++++ primitives/primitives/Cargo.toml | 2 +- primitives/xcm-calls/Cargo.toml | 2 +- test-utils/xcm-test-support/Cargo.toml | 2 +- 12 files changed, 178 insertions(+), 20 deletions(-) create mode 100644 pallets/transaction-payment/Cargo.toml create mode 100644 pallets/transaction-payment/README.md create mode 100644 pallets/transaction-payment/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 770599a52c..fdc6b2e593 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3574,7 +3574,7 @@ dependencies = [ "pallet-staking-reward-fn", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -5708,6 +5708,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-transaction-payment" +version = "0.0.1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "orml-currencies", + "orml-tokens", + "orml-traits", + "pallet-balances", + "pallet-price-feed", + "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "primitives", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-transaction-payment" version = "3.0.0" @@ -5746,7 +5769,7 @@ name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" source = "git+https://github.com/paritytech//substrate?rev=1b758b2a8d151d97d2242260c465b6df9cb8a7a4#1b758b2a8d151d97d2242260c465b6df9cb8a7a4" dependencies = [ - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "parity-scale-codec", "sp-api", "sp-runtime", @@ -6323,7 +6346,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -7064,7 +7087,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -7118,7 +7141,7 @@ dependencies = [ "pallet-session", "pallet-staking", "pallet-timestamp", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-treasury", "pallet-vesting", "parity-scale-codec", @@ -7329,7 +7352,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-vesting", "parity-scale-codec", @@ -7370,7 +7393,7 @@ dependencies = [ "hex", "pallet-balances", "pallet-staking", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -8079,7 +8102,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", @@ -12055,7 +12078,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -12205,7 +12228,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "pallet-transaction-payment", + "pallet-transaction-payment 3.0.0", "parity-scale-codec", "polkadot-parachain", "sp-arithmetic", diff --git a/pallets/asset-index/Cargo.toml b/pallets/asset-index/Cargo.toml index b1e01ac35d..b33f9bc81c 100644 --- a/pallets/asset-index/Cargo.toml +++ b/pallets/asset-index/Cargo.toml @@ -29,7 +29,7 @@ primitives = { path = "../../primitives/primitives", default-features = false } orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } [dev-dependencies] -serde = { version = "1.0.101" } +serde = { version = "1.0.124" } sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/pallets/local-treasury/Cargo.toml b/pallets/local-treasury/Cargo.toml index bbecb2fb65..10ef16e117 100644 --- a/pallets/local-treasury/Cargo.toml +++ b/pallets/local-treasury/Cargo.toml @@ -17,7 +17,7 @@ frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polk frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false, optional = true } [dev-dependencies] -serde = { version = "1.0.101" } +serde = { version = "1.0.124" } sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/pallets/price-feed/Cargo.toml b/pallets/price-feed/Cargo.toml index f75b2a6008..8564f825e3 100644 --- a/pallets/price-feed/Cargo.toml +++ b/pallets/price-feed/Cargo.toml @@ -9,7 +9,7 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -serde = { version = "1.0.101", optional = true } +serde = { version = "1.0.124", optional = true } codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive']} # Substrate Dependencies @@ -21,7 +21,7 @@ frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = pallet-chainlink-feed = { git = 'https://github.com/ChainSafe/chainlink-polkadot', branch = 'upgrade-substrate-master', default-features = false } [dev-dependencies] -serde = { version = "1.0.101" } +serde = { version = "1.0.124" } sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/pallets/remote-asset-manager/Cargo.toml b/pallets/remote-asset-manager/Cargo.toml index 72ce3e87a4..aa7fab2feb 100644 --- a/pallets/remote-asset-manager/Cargo.toml +++ b/pallets/remote-asset-manager/Cargo.toml @@ -10,7 +10,7 @@ version = '0.0.1' [dependencies] log = { version = "0.4.14", default-features = false } -serde = { version = "1.0.101", features = ["derive"], optional = true } +serde = { version = "1.0.124", features = ["derive"], optional = true } codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive']} # Substrate Dependencies @@ -36,7 +36,7 @@ orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-li orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } [dev-dependencies] -serde = { version = "1.0.101", features = ["derive"] } +serde = { version = "1.0.124", features = ["derive"] } sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8' } diff --git a/pallets/saft-registry/Cargo.toml b/pallets/saft-registry/Cargo.toml index d8aa5b5f4f..ab4f4fbe5a 100644 --- a/pallets/saft-registry/Cargo.toml +++ b/pallets/saft-registry/Cargo.toml @@ -23,7 +23,7 @@ xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.8 pallet-asset-index = {path = "../asset-index", default-features = false } [dev-dependencies] -serde = { version = "1.0.101" } +serde = { version = "1.0.124" } # substrate sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/pallets/transaction-payment/Cargo.toml b/pallets/transaction-payment/Cargo.toml new file mode 100644 index 0000000000..cf1bdbb6ee --- /dev/null +++ b/pallets/transaction-payment/Cargo.toml @@ -0,0 +1,63 @@ +[package] +authors = ['ChainSafe Systems'] +description = 'FRAME pallet to charge fees in different currencies.' +edition = '2018' +license = 'LGPL-3.0-only' +name = 'pallet-transaction-payment' +readme = 'README.md' +repository = 'https://github.com/ChainSafe/PINT/' +version = '0.0.1' + +[dependencies] +serde = { version = "1.0.124", optional = true } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } + +sp-io= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } + +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false, optional = true } + +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } + +# ORML Dependencies +orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } + +# PINT dependencies +pallet-price-feed = {path = "../price-feed", default-features = false } +primitives = {path = "../../primitives/primitives", default-features = false } + +[dev-dependencies] +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" } +orml-tokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } +orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[features] +default = ['std'] +std = [ + "serde", + "codec/std", + "sp-runtime/std", + "frame-support/std", + "frame-system/std", + "sp-io/std", + "sp-std/std", + "pallet-transaction-payment/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "orml-traits/std", + + "primitives/std", + "pallet-price-feed/std" +] +runtime-benchmarks = [ + 'frame-benchmarking', + 'frame-support/runtime-benchmarks', + 'pallet-price-feed/runtime-benchmarks', +] diff --git a/pallets/transaction-payment/README.md b/pallets/transaction-payment/README.md new file mode 100644 index 0000000000..e850d9c23f --- /dev/null +++ b/pallets/transaction-payment/README.md @@ -0,0 +1 @@ +License: LGPL-3.0-only \ No newline at end of file diff --git a/pallets/transaction-payment/src/lib.rs b/pallets/transaction-payment/src/lib.rs new file mode 100644 index 0000000000..0454fed429 --- /dev/null +++ b/pallets/transaction-payment/src/lib.rs @@ -0,0 +1,71 @@ +// Copyright 2021 ChainSafe Systems +// SPDX-License-Identifier: LGPL-3.0-only + +//! # Transaction Payment Pallet +//! +//! ## Overview +//! +//! Transaction payment pallet that supports charging for weight and tip in +//! different assets + +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::{pallet_prelude::*, traits::Currency}; +use frame_system::pallet_prelude::*; +use orml_traits::MultiCurrency; + +use primitives::*; + +#[allow(clippy::unused_unit)] +#[allow(clippy::large_enum_variant)] +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::config] + pub trait Config: frame_system::Config { + // Origin that is allowed to manage the SAFTs + type AdminOrigin: EnsureOrigin; + + /// Native asset id + /// + /// the actual received asset type as fee for treasury. + /// Should be PINT + #[pallet::constant] + type NativeAssetId: Get; + + /// The currency type in which fees will be paid. + type Currency: Currency + Send + Sync; + + /// Currency to transfer, reserve/unreserve, lock/unlock assets + type MultiCurrency: MultiCurrency; + + type Event: From> + IsType<::Event>; + /// The weight for this pallet's extrinsics. + type WeightInfo: WeightInfo; + } + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + pub struct Pallet(_); + + #[pallet::event] + #[pallet::metadata(T::AssetId = "AssetId", T::Balance = "Balance")] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event {} + + #[pallet::error] + pub enum Error {} + + #[pallet::hooks] + impl Hooks> for Pallet {} + + #[pallet::call] + impl Pallet {} + + /// Trait for the pallet extrinsic weights. + pub trait WeightInfo {} + + /// For backwards compatibility and tests + impl WeightInfo for () {} +} diff --git a/primitives/primitives/Cargo.toml b/primitives/primitives/Cargo.toml index eadd177d7e..b980803768 100644 --- a/primitives/primitives/Cargo.toml +++ b/primitives/primitives/Cargo.toml @@ -9,7 +9,7 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -serde = { version = "1.0.101", features = ["derive"], optional = true } +serde = { version = "1.0.124", features = ["derive"], optional = true } codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/primitives/xcm-calls/Cargo.toml b/primitives/xcm-calls/Cargo.toml index 074a77c273..c5370f6b8f 100644 --- a/primitives/xcm-calls/Cargo.toml +++ b/primitives/xcm-calls/Cargo.toml @@ -9,7 +9,7 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -serde = { version = "1.0.101", features = ["derive"], optional = true } +serde = { version = "1.0.124", features = ["derive"], optional = true } codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false } diff --git a/test-utils/xcm-test-support/Cargo.toml b/test-utils/xcm-test-support/Cargo.toml index 2460eeaa04..2aba88a355 100644 --- a/test-utils/xcm-test-support/Cargo.toml +++ b/test-utils/xcm-test-support/Cargo.toml @@ -9,7 +9,7 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -serde = { version = "1.0.101", features = ["derive"], optional = true } +serde = { version = "1.0.124", features = ["derive"], optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" } From 23380f7c534ee7f54bd372100cb5b8573807536d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 18 Aug 2021 14:30:34 +0200 Subject: [PATCH 09/29] modify default tx payment module --- pallets/transaction-payment/src/lib.rs | 874 +++++++++++++++++++++++-- 1 file changed, 832 insertions(+), 42 deletions(-) diff --git a/pallets/transaction-payment/src/lib.rs b/pallets/transaction-payment/src/lib.rs index 0454fed429..ce79492656 100644 --- a/pallets/transaction-payment/src/lib.rs +++ b/pallets/transaction-payment/src/lib.rs @@ -5,67 +5,857 @@ //! //! ## Overview //! -//! Transaction payment pallet that supports charging for weight and tip in +//! Transaction payment pallet is responsible for charge fee and tip in //! different assets #![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::unused_unit)] -use frame_support::{pallet_prelude::*, traits::Currency}; +use frame_support::{ + dispatch::{DispatchResult, Dispatchable}, + pallet_prelude::*, + traits::{ + Currency, ExistenceRequirement, Imbalance, NamedReservableCurrency, OnUnbalanced, SameOrOther, WithdrawReasons, + }, + weights::{DispatchInfo, GetDispatchInfo, Pays, PostDispatchInfo, WeightToFeeCoefficient, WeightToFeePolynomial}, + BoundedVec, +}; use frame_system::pallet_prelude::*; use orml_traits::MultiCurrency; +use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; +use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, InclusionFee}; +use primitives::{Balance, AssetId, ReserveIdentifier}; +use sp_runtime::{ + traits::{ + Bounded, CheckedSub, Convert, DispatchInfoOf, One, PostDispatchInfoOf, SaturatedConversion, Saturating, + SignedExtension, UniqueSaturatedInto, Zero, + }, + transaction_validity::{ + InvalidTransaction, TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransaction, + }, + FixedPointNumber, FixedPointOperand, FixedU128, Perquintill, +}; +use sp_std::{convert::TryInto, prelude::*, vec}; +use support::{DEXManager, PriceProvider, Ratio, TransactionPayment}; -use primitives::*; +// mod mock; +// mod tests; +// pub mod weights; + +pub use module::*; +pub use weights::WeightInfo; + +/// Fee multiplier. +pub type Multiplier = FixedU128; + +type PalletBalanceOf = <::Currency as Currency<::AccountId>>::Balance; +type NegativeImbalanceOf = +<::Currency as Currency<::AccountId>>::NegativeImbalance; + +/// A struct to update the weight multiplier per block. It implements +/// `Convert`, meaning that it can convert the +/// previous multiplier to the next one. This should be called on +/// `on_finalize` of a block, prior to potentially cleaning the weight data +/// from the system module. +/// +/// given: +/// s = previous block weight +/// s'= ideal block weight +/// m = maximum block weight +/// diff = (s - s')/m +/// v = 0.00001 +/// t1 = (v * diff) +/// t2 = (v * diff)^2 / 2 +/// then: +/// next_multiplier = prev_multiplier * (1 + t1 + t2) +/// +/// Where `(s', v)` must be given as the `Get` implementation of the `T` +/// generic type. Moreover, `M` must provide the minimum allowed value for +/// the multiplier. Note that a runtime should ensure with tests that the +/// combination of this `M` and `V` is not such that the multiplier can drop +/// to zero and never recover. +/// +/// note that `s'` is interpreted as a portion in the _normal transaction_ +/// capacity of the block. For example, given `s' == 0.25` and +/// `AvailableBlockRatio = 0.75`, then the target fullness is _0.25 of the +/// normal capacity_ and _0.1875 of the entire block_. +/// +/// This implementation implies the bound: +/// - `v ≤ p / k * (s − s')` +/// - or, solving for `p`: `p >= v * k * (s - s')` +/// +/// where `p` is the amount of change over `k` blocks. +/// +/// Hence: +/// - in a fully congested chain: `p >= v * k * (1 - s')`. +/// - in an empty chain: `p >= v * k * (-s')`. +/// +/// For example, when all blocks are full and there are 28800 blocks per day +/// (default in `substrate-node`) and v == 0.00001, s' == 0.1875, we'd have: +/// +/// p >= 0.00001 * 28800 * 0.8125 +/// p >= 0.234 +/// +/// Meaning that fees can change by around ~23% per day, given extreme +/// congestion. +/// +/// More info can be found at: +/// https://w3f-research.readthedocs.io/en/latest/polkadot/Token%20Economics.html +pub struct TargetedFeeAdjustment(sp_std::marker::PhantomData<(T, S, V, M)>); + +/// Something that can convert the current multiplier to the next one. +pub trait MultiplierUpdate: Convert { + /// Minimum multiplier + fn min() -> Multiplier; + /// Target block saturation level + fn target() -> Perquintill; + /// Variability factor + fn variability() -> Multiplier; +} + +impl MultiplierUpdate for () { + fn min() -> Multiplier { + Default::default() + } + fn target() -> Perquintill { + Default::default() + } + fn variability() -> Multiplier { + Default::default() + } +} + +impl MultiplierUpdate for TargetedFeeAdjustment + where + T: frame_system::Config, + S: Get, + V: Get, + M: Get, +{ + fn min() -> Multiplier { + M::get() + } + fn target() -> Perquintill { + S::get() + } + fn variability() -> Multiplier { + V::get() + } +} + +impl Convert for TargetedFeeAdjustment + where + T: frame_system::Config, + S: Get, + V: Get, + M: Get, +{ + fn convert(previous: Multiplier) -> Multiplier { + // Defensive only. The multiplier in storage should always be at most positive. + // Nonetheless we recover here in case of errors, because any value below this + // would be stale and can never change. + let min_multiplier = M::get(); + let previous = previous.max(min_multiplier); + + let weights = T::BlockWeights::get(); + // the computed ratio is only among the normal class. + let normal_max_weight = weights + .get(DispatchClass::Normal) + .max_total + .unwrap_or(weights.max_block); + let current_block_weight = >::block_weight(); + let normal_block_weight = *current_block_weight.get(DispatchClass::Normal).min(&normal_max_weight); + + let s = S::get(); + let v = V::get(); + + let target_weight = (s * normal_max_weight) as u128; + let block_weight = normal_block_weight as u128; + + // determines if the first_term is positive + let positive = block_weight >= target_weight; + let diff_abs = block_weight.max(target_weight) - block_weight.min(target_weight); + + // defensive only, a test case assures that the maximum weight diff can fit in + // Multiplier without any saturation. + let diff = Multiplier::saturating_from_rational(diff_abs, normal_max_weight.max(1)); + let diff_squared = diff.saturating_mul(diff); + + let v_squared_2 = v.saturating_mul(v) / Multiplier::saturating_from_integer(2); + + let first_term = v.saturating_mul(diff); + let second_term = v_squared_2.saturating_mul(diff_squared); + + if positive { + let excess = first_term.saturating_add(second_term).saturating_mul(previous); + previous.saturating_add(excess).max(min_multiplier) + } else { + // Defensive-only: first_term > second_term. Safe subtraction. + let negative = first_term.saturating_sub(second_term).saturating_mul(previous); + previous.saturating_sub(negative).max(min_multiplier) + } + } +} -#[allow(clippy::unused_unit)] -#[allow(clippy::large_enum_variant)] #[frame_support::pallet] -pub mod pallet { - use super::*; +pub mod module { + use super::*; + use primitives::traits::NavProvider; + + pub const RESERVE_ID: ReserveIdentifier = ReserveIdentifier::TransactionPayment; + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Native currency id, the actual received asset type as fee for + /// treasury. Should be PINT + #[pallet::constant] + type NativeAssetId: Get; + + /// Default fee swap path list + #[pallet::constant] + type DefaultFeeSwapPathList: Get>>; + + /// The currency type in which fees will be paid. + type Currency: Currency + + NamedReservableCurrency + + Send + + Sync; + + /// Currency to transfer, reserve/unreserve, lock/unlock assets + type MultiCurrency: MultiCurrency; + + /// Handler for the unbalanced reduction when taking transaction fees. + /// This is either one or two separate imbalances, the first is the + /// transaction fee paid, the second is the tip paid, if any. + type OnTransactionPayment: OnUnbalanced>; + + /// The fee to be paid for making a transaction; the per-byte portion. + #[pallet::constant] + type TransactionByteFee: Get>; + + /// Convert a weight value into a deductible fee based on the currency + /// type. + type WeightToFee: WeightToFeePolynomial>; + + /// Update the multiplier of the next block, based on the previous + /// block's weight. + type FeeMultiplierUpdate: MultiplierUpdate; + + /// DEX to exchange currencies. + type DEX: DEXManager; + + // /// When swap with DEX, the acceptable max slippage for the price from oracle. + // #[pallet::constant] + // type MaxSwapSlippageCompareToOracle: Get; + + // /// The limit for length of trading path + // #[pallet::constant] + // type TradingPathLimit: Get; + + /// The price source to provider external market price. + type NavProvider: NavProvider; + + /// Weight information for the extrinsics in this module. + type WeightInfo: WeightInfo; + } + + #[pallet::extra_constants] + impl Pallet { + //TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. + #[allow(non_snake_case)] + /// The polynomial that is applied in order to derive fee from weight. + fn WeightToFee() -> Vec>> { + T::WeightToFee::polynomial().to_vec() + } + } + + #[pallet::type_value] + pub fn DefaultFeeMultiplier() -> Multiplier { + Multiplier::saturating_from_integer(1) + } + + #[pallet::error] + pub enum Error { + } + + /// The next fee multiplier. + /// + /// NextFeeMultiplier: Multiplier + #[pallet::storage] + #[pallet::getter(fn next_fee_multiplier)] + pub type NextFeeMultiplier = StorageValue<_, Multiplier, ValueQuery, DefaultFeeMultiplier>; + + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::hooks] + impl Hooks for Pallet { + /// `on_initialize` to return the weight used in `on_finalize`. + fn on_initialize(_: T::BlockNumber) -> Weight { + ::WeightInfo::on_finalize() + } + + fn on_finalize(_: T::BlockNumber) { + NextFeeMultiplier::::mutate(|fm| { + *fm = T::FeeMultiplierUpdate::convert(*fm); + }); + } + + #[cfg(feature = "std")] + fn integrity_test() { + // given weight == u64, we build multipliers from `diff` of two weight values, + // which can at most be MaximumBlockWeight. Make sure that this can fit in a + // multiplier without loss. + use sp_std::convert::TryInto; + assert!( + ::max_value() + >= Multiplier::checked_from_integer(T::BlockWeights::get().max_block.try_into().unwrap()).unwrap(), + ); - #[pallet::config] - pub trait Config: frame_system::Config { - // Origin that is allowed to manage the SAFTs - type AdminOrigin: EnsureOrigin; + // This is the minimum value of the multiplier. Make sure that if we collapse to + // this value, we can recover with a reasonable amount of traffic. For this test + // we assert that if we collapse to minimum, the trend will be positive with a + // weight value which is 1% more than the target. + let min_value = T::FeeMultiplierUpdate::min(); + let mut target = T::FeeMultiplierUpdate::target() + * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( + "Setting `max_total` for `Normal` dispatch class is not compatible with \ + `transaction-payment` pallet.", + ); + + // add 1 percent; + let addition = target / 100; + if addition == 0 { + // this is most likely because in a test setup we set everything to (). + return; + } + target += addition; + + #[cfg(any(feature = "std", test))] + sp_io::TestExternalities::new_empty().execute_with(|| { + >::set_block_consumed_resources(target, 0); + let next = T::FeeMultiplierUpdate::convert(min_value); + assert!( + next > min_value, + "The minimum bound of the multiplier is too low. When \ + block saturation is more than target by 1% and multiplier is minimal then \ + the multiplier doesn't increase." + ); + }) + } + } + + #[pallet::call] + impl Pallet { + } +} + +impl Pallet + where + PalletBalanceOf: FixedPointOperand, +{ + /// Query the data that we know about the fee of a given `call`. + /// + /// This module is not and cannot be aware of the internals of a signed + /// extension, for example a tip. It only interprets the extrinsic as + /// some encoded value and accounts for its weight and length, the + /// runtime's extrinsic base weight, and the current fee multiplier. + /// + /// All dispatchables must be annotated with weight and will have some + /// fee info. This function always returns. + pub fn query_info( + unchecked_extrinsic: Extrinsic, + len: u32, + ) -> RuntimeDispatchInfo> + where + T: Send + Sync, + PalletBalanceOf: Send + Sync, + ::Call: Dispatchable, + { + // NOTE: we can actually make it understand `ChargeTransactionPayment`, but + // would be some hassle for sure. We have to make it aware of the index of + // `ChargeTransactionPayment` in `Extra`. Alternatively, we could actually + // execute the tx's per-dispatch and record the balance of the sender before and + // after the pipeline.. but this is way too much hassle for a very very little + // potential gain in the future. + let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); + + let partial_fee = Self::compute_fee(len, &dispatch_info, 0u32.into()); + let DispatchInfo { weight, class, .. } = dispatch_info; + + RuntimeDispatchInfo { + weight, + class, + partial_fee, + } + } + + /// Query the detailed fee of a given `call`. + pub fn query_fee_details( + unchecked_extrinsic: Extrinsic, + len: u32, + ) -> FeeDetails> + where + T::Call: Dispatchable, + { + let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); + Self::compute_fee_details(len, &dispatch_info, 0u32.into()) + } + + /// Compute the final fee value for a particular transaction. + /// + /// The final fee is composed of: + /// - `base_fee`: This is the minimum amount a user pays for a transaction. It is declared as + /// a base _weight_ in the runtime and converted to a fee using `WeightToFee`. + /// - `len_fee`: The length fee, the amount paid for the encoded length (in bytes) of the + /// transaction. + /// - `weight_fee`: This amount is computed based on the weight of the transaction. Weight + /// accounts for the execution time of a transaction. + /// - `targeted_fee_adjustment`: This is a multiplier that can tune the final fee based on the + /// congestion of the network. + /// - (Optional) `tip`: If included in the transaction, the tip will be added on top. Only + /// signed transactions can have a tip. + /// + /// The base fee and adjusted weight and length fees constitute the + /// _inclusion fee,_ which is the minimum fee for a transaction to be + /// included in a block. + /// + /// ```ignore + /// inclusion_fee = base_fee + len_fee + [targeted_fee_adjustment * weight_fee]; + /// final_fee = inclusion_fee + tip; + /// ``` + pub fn compute_fee( + len: u32, + info: &DispatchInfoOf<::Call>, + tip: PalletBalanceOf, + ) -> PalletBalanceOf + where + ::Call: Dispatchable, + { + Self::compute_fee_details(len, info, tip).final_fee() + } + + /// Compute the fee details for a particular transaction. + pub fn compute_fee_details( + len: u32, + info: &DispatchInfoOf, + tip: PalletBalanceOf, + ) -> FeeDetails> + where + T::Call: Dispatchable, + { + Self::compute_fee_raw(len, info.weight, tip, info.pays_fee, info.class) + } + + /// Compute the actual post dispatch fee details for a particular + /// transaction. + pub fn compute_actual_fee_details( + len: u32, + info: &DispatchInfoOf, + post_info: &PostDispatchInfoOf, + tip: PalletBalanceOf, + ) -> FeeDetails> + where + T::Call: Dispatchable, + { + Self::compute_fee_raw( + len, + post_info.calc_actual_weight(info), + tip, + post_info.pays_fee(info), + info.class, + ) + } + + /// Compute the actual post dispatch fee for a particular transaction. + /// + /// Identical to `compute_fee` with the only difference that the post + /// dispatch corrected weight is used for the weight fee calculation. + pub fn compute_actual_fee( + len: u32, + info: &DispatchInfoOf<::Call>, + post_info: &PostDispatchInfoOf<::Call>, + tip: PalletBalanceOf, + ) -> PalletBalanceOf + where + ::Call: Dispatchable, + { + Self::compute_actual_fee_details(len, info, post_info, tip).final_fee() + } + + fn compute_fee_raw( + len: u32, + weight: Weight, + tip: PalletBalanceOf, + pays_fee: Pays, + class: DispatchClass, + ) -> FeeDetails> { + if pays_fee == Pays::Yes { + let len = >::from(len); + let per_byte = T::TransactionByteFee::get(); + + // length fee. this is not adjusted. + let fixed_len_fee = per_byte.saturating_mul(len); + + // the adjustable part of the fee. + let unadjusted_weight_fee = Self::weight_to_fee(weight); + let multiplier = Self::next_fee_multiplier(); + // final adjusted weight fee. + let adjusted_weight_fee = multiplier.saturating_mul_int(unadjusted_weight_fee); + + let base_fee = Self::weight_to_fee(T::BlockWeights::get().get(class).base_extrinsic); + FeeDetails { + inclusion_fee: Some(InclusionFee { + base_fee, + len_fee: fixed_len_fee, + adjusted_weight_fee, + }), + tip, + } + } else { + FeeDetails { + inclusion_fee: None, + tip, + } + } + } + + fn weight_to_fee(weight: Weight) -> PalletBalanceOf { + // cap the weight to the maximum defined in runtime, otherwise it will be the + // `Bounded` maximum of its data type, which is not desired. + let capped_weight = weight.min(T::BlockWeights::get().max_block); + T::WeightToFee::calc(&capped_weight) + } + + pub fn ensure_can_charge_fee(who: &T::AccountId, fee: PalletBalanceOf, reason: WithdrawReasons) { + let native_existential_deposit = ::Currency::minimum_balance(); + let total_native = ::Currency::total_balance(who); + + // check native balance if is enough + let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native + && ::Currency::free_balance(who) + .checked_sub(&fee) + .map_or(false, |new_free_balance| { + ::Currency::ensure_can_withdraw(who, fee, reason, new_free_balance).is_ok() + }); + + // native is not enough, try swap native to pay fee and gap + if !native_is_enough { + // add extra gap to keep alive after swap + let amount = fee.saturating_add(native_existential_deposit.saturating_sub(total_native)); + let native_currency_id = T::NativeAssetId::get(); + let default_fee_swap_path_list = T::DefaultFeeSwapPathList::get(); + let fee_swap_path_list: Vec> = + if let Some(trading_path) = AlternativeFeeSwapPath::::get(who) { + vec![vec![trading_path.into_inner()], default_fee_swap_path_list].concat() + } else { + default_fee_swap_path_list + }; + + for trading_path in fee_swap_path_list { + match trading_path.last() { + Some(target_currency_id) if *target_currency_id == native_currency_id => { + let supply_currency_id = *trading_path.first().expect("these's first guaranteed by match"); + // calculate the supply limit according to oracle price and the slippage limit, + // if oracle price is not avalible, do not limit + let max_supply_limit = if let Some(target_price) = + T::PriceSource::get_relative_price(*target_currency_id, supply_currency_id) + { + Ratio::one() + .saturating_sub(T::MaxSwapSlippageCompareToOracle::get()) + .reciprocal() + .unwrap_or_else(Ratio::max_value) + .saturating_mul_int(target_price.saturating_mul_int(amount)) + } else { + PalletBalanceOf::::max_value() + }; + + if T::DEX::swap_with_exact_target( + who, + &trading_path, + amount.unique_saturated_into(), + ::MultiCurrency::free_balance(supply_currency_id, who) + .min(max_supply_limit.unique_saturated_into()), + ) + .is_ok() + { + // successfully swap, break iteration + break; + } + } + _ => {} + } + } + } + } +} + +impl Convert> for Pallet + where + T: Config, + PalletBalanceOf: FixedPointOperand, +{ + /// Compute the fee for the specified weight. + /// + /// This fee is already adjusted by the per block fee adjustment factor + /// and is therefore the share that the weight contributes to the + /// overall fee of a transaction. It is mainly for informational + /// purposes and not used in the actual fee calculation. + fn convert(weight: Weight) -> PalletBalanceOf { + NextFeeMultiplier::::get().saturating_mul_int(Self::weight_to_fee(weight)) + } +} + +/// Require the transactor pay for themselves and maybe include a tip to +/// gain additional priority in the queue. +#[derive(Encode, Decode, Clone, Eq, PartialEq)] +pub struct ChargeTransactionPayment(#[codec(compact)] PalletBalanceOf); + +impl sp_std::fmt::Debug for ChargeTransactionPayment { + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + write!(f, "ChargeTransactionPayment<{:?}>", self.0) + } + #[cfg(not(feature = "std"))] + fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + Ok(()) + } +} + +impl ChargeTransactionPayment + where + ::Call: Dispatchable, + PalletBalanceOf: Send + Sync + FixedPointOperand, +{ + /// utility constructor. Used only in client/factory code. + pub fn from(fee: PalletBalanceOf) -> Self { + Self(fee) + } + + fn withdraw_fee( + &self, + who: &T::AccountId, + _call: &::Call, + info: &DispatchInfoOf<::Call>, + len: usize, + ) -> Result<(PalletBalanceOf, Option>), TransactionValidityError> { + let tip = self.0; + let fee = Pallet::::compute_fee(len as u32, info, tip); + + // Only mess with balances if fee is not zero. + if fee.is_zero() { + return Ok((fee, None)); + } + // TODO + + let reason = if tip.is_zero() { + WithdrawReasons::TRANSACTION_PAYMENT + } else { + WithdrawReasons::TRANSACTION_PAYMENT | WithdrawReasons::TIP + }; + + Pallet::::ensure_can_charge_fee(who, fee, reason); + + // withdraw native currency as fee + match ::Currency::withdraw(who, fee, reason, ExistenceRequirement::KeepAlive) { + Ok(imbalance) => Ok((fee, Some(imbalance))), + Err(_) => Err(InvalidTransaction::Payment.into()), + } + } + + /// Get an appropriate priority for a transaction with the given length + /// and info. + /// + /// This will try and optimise the `fee/weight` `fee/length`, whichever + /// is consuming more of the maximum corresponding limit. + /// + /// For example, if a transaction consumed 1/4th of the block length and + /// half of the weight, its final priority is `fee * min(2, 4) = fee * + /// 2`. If it consumed `1/4th` of the block length and the entire block + /// weight `(1/1)`, its priority is `fee * min(1, 4) = fee * 1`. This + /// means that the transaction which consumes more resources (either + /// length or weight) with the same `fee` ends up having lower priority. + fn get_priority( + len: usize, + info: &DispatchInfoOf<::Call>, + final_fee: PalletBalanceOf, + ) -> TransactionPriority { + let weight_saturation = T::BlockWeights::get().max_block / info.weight.max(1); + let max_block_length = *T::BlockLength::get().max.get(DispatchClass::Normal); + let len_saturation = max_block_length as u64 / (len as u64).max(1); + let coefficient: PalletBalanceOf = weight_saturation + .min(len_saturation) + .saturated_into::>(); + final_fee + .saturating_mul(coefficient) + .saturated_into::() + } +} + +impl SignedExtension for ChargeTransactionPayment + where + PalletBalanceOf: Send + Sync + From + FixedPointOperand, + ::Call: Dispatchable, +{ + const IDENTIFIER: &'static str = "ChargeTransactionPayment"; + type AccountId = T::AccountId; + type Call = ::Call; + type AdditionalSigned = (); + type Pre = ( + PalletBalanceOf, + Self::AccountId, + Option>, + PalletBalanceOf, + ); + + fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { + Ok(()) + } + + fn validate( + &self, + who: &Self::AccountId, + call: &Self::Call, + info: &DispatchInfoOf, + len: usize, + ) -> TransactionValidity { + let (fee, _) = self.withdraw_fee(who, call, info, len)?; + Ok(ValidTransaction { + priority: Self::get_priority(len, info, fee), + ..Default::default() + }) + } + + fn pre_dispatch( + self, + who: &Self::AccountId, + call: &Self::Call, + info: &DispatchInfoOf, + len: usize, + ) -> Result { + let (fee, imbalance) = self.withdraw_fee(who, call, info, len)?; + Ok((self.0, who.clone(), imbalance, fee)) + } + + fn post_dispatch( + pre: Self::Pre, + info: &DispatchInfoOf, + post_info: &PostDispatchInfoOf, + len: usize, + _result: &DispatchResult, + ) -> Result<(), TransactionValidityError> { + // TODO + let (tip, who, imbalance, fee) = pre; + if let Some(payed) = imbalance { + let actual_fee = Pallet::::compute_actual_fee(len as u32, info, post_info, tip); + let refund = fee.saturating_sub(actual_fee); + let actual_payment = match ::Currency::deposit_into_existing(&who, refund) { + Ok(refund_imbalance) => { + // The refund cannot be larger than the up front payed max weight. + // `PostDispatchInfo::calc_unspent` guards against such a case. + match payed.offset(refund_imbalance) { + SameOrOther::Same(actual_payment) => actual_payment, + SameOrOther::None => Default::default(), + _ => return Err(InvalidTransaction::Payment.into()), + } + } + // We do not recreate the account using the refund. The up front payment + // is gone in that case. + Err(_) => payed, + }; + let (tip, fee) = actual_payment.split(tip); + + // distribute fee + ::OnTransactionPayment::on_unbalanceds(Some(fee).into_iter().chain(Some(tip))); + } + Ok(()) + } +} - /// Native asset id - /// - /// the actual received asset type as fee for treasury. - /// Should be PINT - #[pallet::constant] - type NativeAssetId: Get; +impl TransactionPayment, NegativeImbalanceOf> +for ChargeTransactionPayment + where + PalletBalanceOf: Send + Sync + FixedPointOperand, +{ + fn reserve_fee(who: &T::AccountId, weight: Weight) -> Result, DispatchError> { + let fee = Pallet::::weight_to_fee(weight); + Pallet::::ensure_can_charge_fee(who, fee, WithdrawReasons::TRANSACTION_PAYMENT); + ::Currency::reserve_named(&RESERVE_ID, &who, fee)?; + Ok(fee) + } - /// The currency type in which fees will be paid. - type Currency: Currency + Send + Sync; + fn unreserve_fee(who: &T::AccountId, fee: PalletBalanceOf) { + ::Currency::unreserve_named(&RESERVE_ID, &who, fee); + } - /// Currency to transfer, reserve/unreserve, lock/unlock assets - type MultiCurrency: MultiCurrency; + fn unreserve_and_charge_fee( + who: &T::AccountId, + weight: Weight, + ) -> Result<(PalletBalanceOf, NegativeImbalanceOf), TransactionValidityError> { + let fee = Pallet::::weight_to_fee(weight); + ::Currency::unreserve_named(&RESERVE_ID, &who, fee); - type Event: From> + IsType<::Event>; - /// The weight for this pallet's extrinsics. - type WeightInfo: WeightInfo; - } + match ::Currency::withdraw( + who, + fee, + WithdrawReasons::TRANSACTION_PAYMENT, + ExistenceRequirement::KeepAlive, + ) { + Ok(imbalance) => Ok((fee, imbalance)), + Err(_) => Err(InvalidTransaction::Payment.into()), + } + } - #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] - pub struct Pallet(_); + fn refund_fee( + who: &T::AccountId, + refund_weight: Weight, + payed: NegativeImbalanceOf, + ) -> Result<(), TransactionValidityError> { + let refund = Pallet::::weight_to_fee(refund_weight); + let actual_payment = match ::Currency::deposit_into_existing(&who, refund) { + Ok(refund_imbalance) => { + // The refund cannot be larger than the up front payed max weight. + match payed.offset(refund_imbalance) { + SameOrOther::Same(actual_payment) => actual_payment, + SameOrOther::None => Default::default(), + _ => return Err(InvalidTransaction::Payment.into()), + } + } + // We do not recreate the account using the refund. The up front payment + // is gone in that case. + Err(_) => payed, + }; - #[pallet::event] - #[pallet::metadata(T::AssetId = "AssetId", T::Balance = "Balance")] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event {} + // distribute fee + ::OnTransactionPayment::on_unbalanced(actual_payment); - #[pallet::error] - pub enum Error {} + Ok(()) + } - #[pallet::hooks] - impl Hooks> for Pallet {} + fn charge_fee( + who: &T::AccountId, + len: u32, + weight: Weight, + tip: PalletBalanceOf, + pays_fee: Pays, + class: DispatchClass, + ) -> Result<(), TransactionValidityError> { + let fee = Pallet::::compute_fee_raw(len, weight, tip, pays_fee, class).final_fee(); - #[pallet::call] - impl Pallet {} + Pallet::::ensure_can_charge_fee(who, fee, WithdrawReasons::TRANSACTION_PAYMENT); - /// Trait for the pallet extrinsic weights. - pub trait WeightInfo {} + // withdraw native currency as fee + let actual_payment = ::Currency::withdraw( + who, + fee, + WithdrawReasons::TRANSACTION_PAYMENT, + ExistenceRequirement::KeepAlive, + ) + .map_err(|_| InvalidTransaction::Payment)?; - /// For backwards compatibility and tests - impl WeightInfo for () {} + // distribute fee + ::OnTransactionPayment::on_unbalanced(actual_payment); + Ok(()) + } } From d77044bf2d2e5567e45ef6e67b1da651e8b9fd8e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 31 Oct 2021 16:52:08 +0100 Subject: [PATCH 10/29] chore(deps): update to polkadot-v0.9.12 --- Cargo.lock | 3095 +++++++---------- Cargo.toml | 367 +- node/Cargo.toml | 114 +- node/src/instant_finalize.rs | 40 + node/src/lib.rs | 1 + node/src/service.rs | 195 +- pallets/asset-index/Cargo.toml | 27 +- pallets/asset-index/rpc/Cargo.toml | 14 +- .../asset-index/rpc/runtime-api/Cargo.toml | 9 +- pallets/asset-index/src/lib.rs | 1 - pallets/asset-index/src/types.rs | 12 +- pallets/committee/Cargo.toml | 11 +- pallets/committee/src/lib.rs | 14 +- pallets/committee/src/types.rs | 18 +- pallets/local-treasury/Cargo.toml | 17 +- pallets/local-treasury/src/lib.rs | 1 - pallets/price-feed/Cargo.toml | 21 +- pallets/price-feed/src/lib.rs | 1 - pallets/price-feed/src/types.rs | 2 +- pallets/remote-asset-manager/Cargo.toml | 75 +- pallets/remote-asset-manager/src/types.rs | 6 +- pallets/remote-treasury/Cargo.toml | 21 +- pallets/remote-treasury/src/lib.rs | 1 - pallets/saft-registry/Cargo.toml | 19 +- pallets/saft-registry/src/lib.rs | 3 +- primitives/primitives/Cargo.toml | 9 +- primitives/primitives/src/fee.rs | 4 +- primitives/primitives/src/types.rs | 8 +- primitives/xcm-calls/Cargo.toml | 31 +- primitives/xcm-calls/src/assets.rs | 8 +- primitives/xcm-calls/src/proxy.rs | 14 +- primitives/xcm-calls/src/staking.rs | 14 +- rpc/Cargo.toml | 26 +- runtime/common/Cargo.toml | 12 +- runtime/common/src/constants.rs | 2 + runtime/dev/Cargo.toml | 97 +- runtime/dev/src/lib.rs | 73 +- runtime/integration-tests/Cargo.toml | 65 +- runtime/integration-tests/src/pint.rs | 25 +- runtime/integration-tests/src/relay.rs | 18 +- runtime/integration-tests/src/statemint.rs | 23 +- runtime/kusama/Cargo.toml | 95 +- runtime/kusama/src/lib.rs | 57 +- runtime/polkadot/Cargo.toml | 95 +- runtime/polkadot/src/lib.rs | 57 +- 45 files changed, 2195 insertions(+), 2623 deletions(-) create mode 100644 node/src/instant_finalize.rs diff --git a/Cargo.lock b/Cargo.lock index 0807021956..8518178bb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,22 +12,13 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" -dependencies = [ - "gimli 0.24.0", -] - [[package]] name = "addr2line" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" dependencies = [ - "gimli 0.25.0", + "gimli", ] [[package]] @@ -53,7 +44,7 @@ checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if 1.0.0", "cipher", - "cpufeatures", + "cpufeatures 0.2.1", "opaque-debug 0.3.0", ] @@ -73,9 +64,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +checksum = "991984e3fd003e7ba02eb724f87a0f997b78677c46c0e91f8424ad7394c9886a" dependencies = [ "getrandom 0.2.3", "once_cell", @@ -159,9 +150,9 @@ checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" [[package]] name = "asn1_der" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" +checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" [[package]] name = "assert_matches" @@ -175,8 +166,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ - "quote 1.0.9", - "syn 1.0.77", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -286,7 +277,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.5", + "crossbeam-utils", "futures-channel", "futures-core", "futures-io", @@ -329,9 +320,9 @@ version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -398,12 +389,12 @@ version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" dependencies = [ - "addr2line 0.16.0", + "addr2line", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.26.2", + "object", "rustc-demangle", ] @@ -415,9 +406,9 @@ checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf" dependencies = [ "heck", "proc-macro-error 0.4.12", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -428,9 +419,9 @@ checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -455,13 +446,12 @@ dependencies = [ [[package]] name = "beefy-gadget" -version = "0.1.0" -source = "git+https://github.com/paritytech//grandpa-bridge-gadget?rev=9954b61657dc8899a21b4f2501ee6bd3b7a2dc23#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "beefy-primitives", "fnv", "futures 0.3.17", - "hex", "log", "parity-scale-codec", "parking_lot 0.11.2", @@ -469,15 +459,14 @@ dependencies = [ "sc-keystore", "sc-network", "sc-network-gossip", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12)", "sp-api", "sp-application-crypto", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-keystore", "sp-runtime", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", "wasm-timer", @@ -485,8 +474,8 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" -version = "0.1.0" -source = "git+https://github.com/paritytech//grandpa-bridge-gadget?rev=9954b61657dc8899a21b4f2501ee6bd3b7a2dc23#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -499,22 +488,22 @@ dependencies = [ "parity-scale-codec", "sc-rpc", "serde", - "serde_json", "sp-core", "sp-runtime", ] [[package]] name = "beefy-merkle-tree" -version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=polkadot-v0.9.10#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" [[package]] name = "beefy-primitives" -version = "0.1.0" -source = "git+https://github.com/paritytech//grandpa-bridge-gadget?rev=9954b61657dc8899a21b4f2501ee6bd3b7a2dc23#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-core", @@ -543,8 +532,8 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.29", - "quote 1.0.9", + "proc-macro2 1.0.30", + "quote 1.0.10", "regex", "rustc-hash", "shlex", @@ -689,14 +678,24 @@ dependencies = [ "once_cell", ] +[[package]] +name = "bounded-vec" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afdd1dffefe5fc66262a524b91087c43b16e478b2e3dc49eb11b0e2fd6b6ec90" +dependencies = [ + "thiserror", +] + [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "finality-grandpa", "frame-support", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-finality-grandpa", @@ -707,18 +706,19 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", + "scale-info", "sp-std", ] [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "bp-runtime", @@ -726,6 +726,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "serde", "sp-std", ] @@ -733,13 +734,14 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-messages", "bp-runtime", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-api", "sp-core", "sp-runtime", @@ -750,7 +752,7 @@ dependencies = [ [[package]] name = "bp-rialto" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-messages", "bp-runtime", @@ -765,14 +767,14 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", "frame-support", "parity-scale-codec", - "smallvec 1.7.0", + "smallvec", "sp-api", "sp-runtime", "sp-std", @@ -782,12 +784,13 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "frame-support", "hash-db", "num-traits", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -799,7 +802,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -814,7 +817,7 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -829,7 +832,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -841,6 +844,7 @@ dependencies = [ "pallet-bridge-messages", "pallet-transaction-payment", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-state-machine", @@ -903,7 +907,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ "byteorder", - "either", "iovec", ] @@ -959,9 +962,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.70" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" dependencies = [ "jobserver", ] @@ -995,21 +998,21 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chacha20" -version = "0.7.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08493fa7707effc63254c66c6ea908675912493cd67952eda23c09fae2610b1" +checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" dependencies = [ "cfg-if 1.0.0", "cipher", - "cpufeatures", + "cpufeatures 0.1.5", "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6547abe025f4027edacd9edaa357aded014eecec42a5070d9b885c3c334aba2" +checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" dependencies = [ "aead", "chacha20", @@ -1068,7 +1071,7 @@ checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" dependencies = [ "glob", "libc", - "libloading 0.7.0", + "libloading 0.7.1", ] [[package]] @@ -1118,35 +1121,19 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys 0.7.0", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ - "core-foundation-sys 0.8.2", + "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - -[[package]] -name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpp_demangle" @@ -1157,6 +1144,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + [[package]] name = "cpufeatures" version = "0.2.1" @@ -1168,36 +1164,35 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ca3560686e7c9c7ed7e0fe77469f2410ba5d7781b1acaa9adc8d8deea28e3e" +checksum = "15013642ddda44eebcf61365b2052a23fd8b7314f90ba44aa059ec02643c5139" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf9bf1ffffb6ce3d2e5ebc83549bd2436426c99b31cc550d521364cbe35d276" +checksum = "298f2a7ed5fdcb062d8e78b7496b0f4b95265d20245f2d0ca88f846dd192a3a3" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.24.0", + "gimli", "log", "regalloc", - "serde", - "smallvec 1.7.0", + "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc21936a5a6d07e23849ffe83e5c1f6f50305c074f4b2970ca50c13bf55b821" +checksum = "5cf504261ac62dfaf4ffb3f41d88fd885e81aba947c1241275043885bc5f0bac" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -1205,59 +1200,56 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5b6ffaa87560bebe69a5446449da18090b126037920b0c1c6d5945f72faf6b" -dependencies = [ - "serde", -] +checksum = "1cd2a72db4301dbe7e5a4499035eedc1e82720009fb60603e20504d8691fa9cd" [[package]] name = "cranelift-entity" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6b4a8bef04f82e4296782646f733c641d09497df2fabf791323fefaa44c64c" +checksum = "48868faa07cacf948dc4a1773648813c0e453ff9467e800ff10f6a78c021b546" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b783b351f966fce33e3c03498cb116d16d97a8f9978164a60920bd0d3a99c" +checksum = "351c9d13b4ecd1a536215ec2fd1c3ee9ee8bc31af172abf1e45ed0adb7a931df" dependencies = [ "cranelift-codegen", "log", - "smallvec 1.7.0", + "smallvec", "target-lexicon", ] [[package]] name = "cranelift-native" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c88d3dd48021ff1e37e978a00098524abd3513444ae252c08d37b310b3d2a" +checksum = "6df8b556663d7611b137b24db7f6c8d9a8a27d7f29c7ea7835795152c94c1b75" dependencies = [ "cranelift-codegen", + "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.74.0" +version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb6d408e2da77cdbbd65466298d44c86ae71c1785d2ab0d8657753cdb4d9d89" +checksum = "7a69816d90db694fa79aa39b89dda7208a4ac74b6f2b8f3c4da26ee1c8bdfc5e" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "itertools", "log", - "serde", - "smallvec 1.7.0", - "thiserror", + "smallvec", "wasmparser", + "wasmtime-types", ] [[package]] @@ -1276,18 +1268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crossbeam-utils", ] [[package]] @@ -1297,23 +1278,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.5", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] @@ -1323,34 +1289,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils", "lazy_static", - "memoffset 0.6.4", + "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.5" @@ -1389,9 +1333,9 @@ dependencies = [ [[package]] name = "ct-logs" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" dependencies = [ "sct", ] @@ -1402,8 +1346,8 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ - "quote 1.0.9", - "syn 1.0.77", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -1429,7 +1373,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "sc-cli", "sc-service", @@ -1439,7 +1383,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1455,7 +1399,6 @@ dependencies = [ "sp-api", "sp-consensus", "sp-core", - "sp-io", "sp-runtime", "tracing", ] @@ -1463,14 +1406,13 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "futures 0.3.17", "parity-scale-codec", - "parking_lot 0.10.2", "polkadot-client", "sc-client-api", "sc-consensus", @@ -1494,38 +1436,32 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "async-trait", "dyn-clone", "futures 0.3.17", "parity-scale-codec", "polkadot-primitives", - "polkadot-runtime", "sc-client-api", "sc-consensus", "sp-api", - "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-inherents", "sp-runtime", "sp-trie", - "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "futures 0.3.17", - "parity-scale-codec", "parking_lot 0.10.2", "polkadot-client", "sc-client-api", @@ -1544,7 +1480,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", @@ -1555,7 +1491,6 @@ dependencies = [ "polkadot-node-primitives", "polkadot-parachain", "polkadot-primitives", - "polkadot-statement-table", "sc-client-api", "sp-api", "sp-blockchain", @@ -1568,7 +1503,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "futures 0.3.17", @@ -1583,7 +1518,6 @@ dependencies = [ "sc-consensus", "sp-api", "sp-consensus", - "sp-core", "sp-maybe-compressed-blob", "sp-runtime", "tracing", @@ -1592,7 +1526,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-common", @@ -1621,13 +1555,14 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "frame-executive", "frame-support", "frame-system", "pallet-aura", "parity-scale-codec", + "scale-info", "serde", "sp-application-crypto", "sp-consensus-aura", @@ -1638,15 +1573,14 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "log", "parity-scale-codec", - "rand 0.8.4", - "rand_chacha 0.3.1", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -1657,7 +1591,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", @@ -1669,6 +1603,7 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "polkadot-parachain", + "scale-info", "serde", "sp-core", "sp-externalities", @@ -1685,23 +1620,24 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -1712,15 +1648,15 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "log", "parity-scale-codec", - "rand 0.8.4", "rand_chacha 0.3.1", + "scale-info", "sp-runtime", "sp-std", "xcm", @@ -1730,7 +1666,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1742,20 +1678,20 @@ dependencies = [ "sp-runtime", "sp-std", "sp-trie", - "xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540)", + "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff)", "parity-scale-codec", "polkadot-client", "sc-client-api", + "scale-info", "sp-api", "sp-core", "sp-inherents", @@ -1769,7 +1705,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "sp-inherents", @@ -1780,11 +1716,10 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "frame-support", - "impl-trait-for-tuples", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", @@ -1798,7 +1733,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.10#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.11#ede4d527c4fc5d84c43216b408a873625488574b" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1811,7 +1746,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1870,7 +1805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.77", + "syn 1.0.80", ] [[package]] @@ -1879,18 +1814,18 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "derive" version = "0.0.1" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -1914,10 +1849,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" dependencies = [ "convert_case", - "proc-macro2 1.0.29", - "quote 1.0.9", + "proc-macro2 1.0.30", + "quote 1.0.10", "rustc_version 0.3.3", - "syn 1.0.77", + "syn 1.0.80", ] [[package]] @@ -2011,9 +1946,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -2058,9 +1993,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ "heck", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -2078,9 +2013,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -2089,9 +2024,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e58b112d5099aa0857c5d05f0eacab86406dd8c0f85fe5d320a13256d29ecf4" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -2109,9 +2044,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.8.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime 2.1.0", @@ -2126,15 +2061,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de9ad4541d99dc22b59134e7ff8dc3d6c988c89ecd7324bf10a8362b07a2afa" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.2.7" @@ -2158,9 +2084,9 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" dependencies = [ "crunchy", "fixed-hash", @@ -2171,9 +2097,9 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd6bde671199089e601e8d47e153368b893ef885f11f365a3261ec58153c211" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" dependencies = [ "ethbloom", "fixed-hash", @@ -2198,28 +2124,6 @@ dependencies = [ "futures 0.3.17", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", - "synstructure", -] - [[package]] name = "fake-simd" version = "0.1.2" @@ -2273,7 +2177,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.11.2", - "scale-info 1.0.0", + "scale-info", ] [[package]] @@ -2316,7 +2220,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", ] @@ -2334,7 +2238,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", @@ -2342,6 +2246,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", + "scale-info", "sp-api", "sp-io", "sp-runtime", @@ -2353,7 +2258,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "Inflector", "chrono", @@ -2379,11 +2284,12 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-npos-elections", "sp-std", @@ -2392,11 +2298,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -2406,19 +2313,20 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96616f82e069102b95a72c87de4c84d2f87ef7f0f20630e78ce3824436483110" dependencies = [ + "cfg-if 1.0.0", "parity-scale-codec", + "scale-info", "serde", - "sp-core", - "sp-std", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "bitflags", "frame-metadata", @@ -2428,8 +2336,9 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", + "scale-info", "serde", - "smallvec 1.7.0", + "smallvec", "sp-arithmetic", "sp-core", "sp-inherents", @@ -2444,46 +2353,46 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "Inflector", "frame-support-procedural-tools", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", - "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -2495,12 +2404,13 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -2509,7 +2419,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", "sp-api", @@ -2518,10 +2428,9 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", - "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -2555,12 +2464,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -2620,16 +2523,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures 0.1.31", - "num_cpus", -] - [[package]] name = "futures-executor" version = "0.3.17" @@ -2671,9 +2564,9 @@ checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ "autocfg", "proc-macro-hack", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -2683,7 +2576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" dependencies = [ "futures-io", - "rustls 0.19.1", + "rustls", "webpki", ] @@ -2788,21 +2681,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" - [[package]] name = "glob" version = "0.3.0" @@ -2835,44 +2722,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "h2" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -dependencies = [ - "byteorder", - "bytes 0.4.12", - "fnv", - "futures 0.1.31", - "http 0.1.21", - "indexmap", - "log", - "slab", - "string", - "tokio-io", -] - -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.5", - "indexmap", - "slab", - "tokio 0.2.25", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "handlebars" version = "3.5.5" @@ -2935,31 +2784,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" -dependencies = [ - "hex-literal-impl", - "proc-macro-hack", -] - [[package]] name = "hex-literal" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e4590e13640f19f249fe3e4eca5113bc4289f2497710378190e7f4bd96f45b" -[[package]] -name = "hex-literal-impl" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f769599eb31de176303197b7ba4973299c38c7a7604a6bc88c3eef05b9b46" -dependencies = [ - "proc-macro-hack", -] - [[package]] name = "hex_fmt" version = "0.3.0" @@ -3008,17 +2838,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa", -] - [[package]] name = "http" version = "0.2.5" @@ -3030,28 +2849,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "http 0.1.21", - "tokio-buf", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http 0.2.5", -] - [[package]] name = "http-body" version = "0.4.3" @@ -3059,7 +2856,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" dependencies = [ "bytes 1.1.0", - "http 0.2.5", + "http", "pin-project-lite 0.2.7", ] @@ -3069,12 +2866,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - [[package]] name = "httpdate" version = "1.0.1" @@ -3098,95 +2889,41 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.12.36" +version = "0.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" +checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "futures-cpupool", - "h2 0.1.26", - "http 0.1.21", - "http-body 0.1.0", + "bytes 1.1.0", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", "httparse", - "iovec", - "itoa", - "log", - "net2", - "rustc_version 0.2.3", - "time", - "tokio 0.1.22", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "want 0.2.0", -] - -[[package]] -name = "hyper" -version = "0.13.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.2.7", - "http 0.2.5", - "http-body 0.3.1", - "httparse", - "httpdate 0.3.2", - "itoa", - "pin-project 1.0.8", - "socket2 0.3.19", - "tokio 0.2.25", - "tower-service", - "tracing", - "want 0.3.0", -] - -[[package]] -name = "hyper" -version = "0.14.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" -dependencies = [ - "bytes 1.1.0", - "futures-channel", - "futures-core", - "futures-util", - "http 0.2.5", - "http-body 0.4.3", - "httparse", - "httpdate 1.0.1", + "httpdate", "itoa", "pin-project-lite 0.2.7", - "tokio 1.12.0", + "socket2 0.4.2", + "tokio", "tower-service", "tracing", - "want 0.3.0", + "want", ] [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes 0.5.6", "ct-logs", "futures-util", - "hyper 0.13.10", + "hyper", "log", - "rustls 0.18.1", - "rustls-native-certs 0.4.0", - "tokio 0.2.25", - "tokio-rustls 0.14.1", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", "webpki", ] @@ -3282,9 +3019,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -3343,9 +3080,9 @@ dependencies = [ [[package]] name = "ip_network" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" +checksum = "09b746553d2f4a1ca26fab939943ddfb217a091f34f53571620a8e3d30691303" [[package]] name = "ipconfig" @@ -3400,12 +3137,12 @@ dependencies = [ [[package]] name = "jsonrpc-client-transports" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7" +checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" dependencies = [ - "failure", - "futures 0.1.31", + "derive_more 0.99.16", + "futures 0.3.17", "jsonrpc-core", "jsonrpc-pubsub", "log", @@ -3416,11 +3153,13 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "futures 0.1.31", + "futures 0.3.17", + "futures-executor", + "futures-util", "log", "serde", "serde_derive", @@ -3429,94 +3168,102 @@ dependencies = [ [[package]] name = "jsonrpc-core-client" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db" +checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" dependencies = [ + "futures 0.3.17", "jsonrpc-client-transports", ] [[package]] name = "jsonrpc-derive" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" +checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "jsonrpc-http-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7" +checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ - "hyper 0.12.36", + "futures 0.3.17", + "hyper", "jsonrpc-core", "jsonrpc-server-utils", "log", "net2", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "unicase", ] [[package]] name = "jsonrpc-ipc-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7" +checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845" dependencies = [ + "futures 0.3.17", "jsonrpc-core", "jsonrpc-server-utils", "log", "parity-tokio-ipc", - "parking_lot 0.10.2", - "tokio-service", + "parking_lot 0.11.2", + "tower-service", ] [[package]] name = "jsonrpc-pubsub" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77" +checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" dependencies = [ + "futures 0.3.17", "jsonrpc-core", + "lazy_static", "log", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "rand 0.7.3", "serde", ] [[package]] name = "jsonrpc-server-utils" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176" +checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" dependencies = [ - "bytes 0.4.12", + "bytes 1.1.0", + "futures 0.3.17", "globset", "jsonrpc-core", "lazy_static", "log", - "tokio 0.1.22", - "tokio-codec", + "tokio", + "tokio-stream", + "tokio-util", "unicase", ] [[package]] name = "jsonrpc-ws-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22" +checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946" dependencies = [ + "futures 0.3.17", "jsonrpc-core", "jsonrpc-server-utils", "log", "parity-ws", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "slab", ] @@ -3529,9 +3276,9 @@ dependencies = [ "Inflector", "bae", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -3544,7 +3291,7 @@ dependencies = [ "beef", "futures-channel", "futures-util", - "hyper 0.14.13", + "hyper", "log", "serde", "serde_json", @@ -3564,14 +3311,14 @@ dependencies = [ "jsonrpsee-types", "log", "pin-project 1.0.8", - "rustls 0.19.1", - "rustls-native-certs 0.5.0", + "rustls", + "rustls-native-certs", "serde", "serde_json", "soketto 0.6.0", "thiserror", - "tokio 0.2.25", - "tokio-rustls 0.15.0", + "tokio", + "tokio-rustls", "tokio-util", "url 2.2.2", ] @@ -3594,8 +3341,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-primitives", "bitvec 0.20.4", @@ -3607,11 +3354,12 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.3.3", + "hex-literal", "log", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", + "pallet-bags-list", "pallet-balances", "pallet-bounties", "pallet-collective", @@ -3650,9 +3398,10 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", - "smallvec 1.7.0", + "smallvec", "sp-api", "sp-arithmetic", "sp-authority-discovery", @@ -3692,7 +3441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" dependencies = [ "parity-util-mem", - "smallvec 1.7.0", + "smallvec", ] [[package]] @@ -3708,9 +3457,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d169dbb316aa0fa185d02d847c047f1aa20e292cf1563d790c13536a2a732c8" +checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" dependencies = [ "fs-swap", "kvdb", @@ -3721,7 +3470,7 @@ dependencies = [ "parking_lot 0.11.2", "regex", "rocksdb", - "smallvec 1.7.0", + "smallvec", ] [[package]] @@ -3754,9 +3503,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" dependencies = [ "cfg-if 1.0.0", "winapi 0.3.9", @@ -3803,7 +3552,7 @@ dependencies = [ "multiaddr", "parking_lot 0.11.2", "pin-project 1.0.8", - "smallvec 1.7.0", + "smallvec", "wasm-timer", ] @@ -3834,7 +3583,7 @@ dependencies = [ "ring", "rw-stream-sink", "sha2 0.9.8", - "smallvec 1.7.0", + "smallvec", "thiserror", "unsigned-varint 0.7.0", "void", @@ -3862,7 +3611,7 @@ dependencies = [ "futures 0.3.17", "libp2p-core", "log", - "smallvec 1.7.0", + "smallvec", "trust-dns-resolver", ] @@ -3881,7 +3630,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", ] [[package]] @@ -3905,7 +3654,7 @@ dependencies = [ "rand 0.7.3", "regex", "sha2 0.9.8", - "smallvec 1.7.0", + "smallvec", "unsigned-varint 0.7.0", "wasm-timer", ] @@ -3922,7 +3671,7 @@ dependencies = [ "log", "prost", "prost-build", - "smallvec 1.7.0", + "smallvec", "wasm-timer", ] @@ -3945,7 +3694,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "sha2 0.9.8", - "smallvec 1.7.0", + "smallvec", "uint", "unsigned-varint 0.7.0", "void", @@ -3968,7 +3717,7 @@ dependencies = [ "libp2p-swarm", "log", "rand 0.8.4", - "smallvec 1.7.0", + "smallvec", "socket2 0.4.2", "void", ] @@ -3987,7 +3736,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.11.2", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", "unsigned-varint 0.7.0", ] @@ -4076,7 +3825,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", "unsigned-varint 0.7.0", "void", "wasm-timer", @@ -4094,10 +3843,10 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru", + "lru 0.6.6", "minicbor", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", "unsigned-varint 0.7.0", "wasm-timer", ] @@ -4113,7 +3862,7 @@ dependencies = [ "libp2p-core", "log", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", "void", "wasm-timer", ] @@ -4124,8 +3873,8 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" dependencies = [ - "quote 1.0.9", - "syn 1.0.77", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -4224,9 +3973,9 @@ dependencies = [ "base64 0.12.3", "digest 0.9.0", "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", + "libsecp256k1-core 0.2.2", + "libsecp256k1-gen-ecmult 0.2.1", + "libsecp256k1-gen-genmult 0.2.1", "rand 0.7.3", "serde", "sha2 0.9.8", @@ -4243,15 +3992,34 @@ dependencies = [ "base64 0.12.3", "digest 0.9.0", "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", + "libsecp256k1-core 0.2.2", + "libsecp256k1-gen-ecmult 0.2.1", + "libsecp256k1-gen-genmult 0.2.1", "rand 0.7.3", "serde", "sha2 0.9.8", "typenum", ] +[[package]] +name = "libsecp256k1" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" +dependencies = [ + "arrayref", + "base64 0.13.0", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core 0.3.0", + "libsecp256k1-gen-ecmult 0.3.0", + "libsecp256k1-gen-genmult 0.3.0", + "rand 0.8.4", + "serde", + "sha2 0.9.8", + "typenum", +] + [[package]] name = "libsecp256k1-core" version = "0.2.2" @@ -4263,13 +4031,33 @@ dependencies = [ "subtle", ] +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + [[package]] name = "libsecp256k1-gen-ecmult" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" dependencies = [ - "libsecp256k1-core", + "libsecp256k1-core 0.2.2", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core 0.3.0", ] [[package]] @@ -4278,7 +4066,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" dependencies = [ - "libsecp256k1-core", + "libsecp256k1-core 0.2.2", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core 0.3.0", ] [[package]] @@ -4354,6 +4151,15 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lru" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c748cfe47cb8da225c37595b3108bea1c198c84aaae8ea0ba76d01dda9fc803" +dependencies = [ + "hashbrown", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -4363,6 +4169,26 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lz4" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "mach" version = "0.3.2" @@ -4408,12 +4234,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -4429,15 +4249,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.6.4" @@ -4464,7 +4275,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "beeb98b3d1ed2c0054bd81b5ba949a0243c3ccad751d45ea898fa8059fa2860a" dependencies = [ - "lru", + "lru 0.6.6", ] [[package]] @@ -4487,12 +4298,14 @@ dependencies = [ [[package]] name = "metered-channel" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", "futures-timer 3.0.2", + "thiserror", + "tracing", ] [[package]] @@ -4521,9 +4334,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -4556,38 +4369,28 @@ dependencies = [ ] [[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio", - "slab", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" +name = "mio" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" dependencies = [ + "libc", "log", - "mio", "miow 0.3.7", + "ntapi", "winapi 0.3.9", ] [[package]] -name = "mio-uds" -version = "0.6.8" +name = "mio-extras" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ - "iovec", - "libc", - "mio", + "lazycell", + "log", + "mio 0.6.23", + "slab", ] [[package]] @@ -4684,9 +4487,9 @@ checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro-error 1.0.4", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "synstructure", ] @@ -4706,7 +4509,7 @@ dependencies = [ "futures 0.3.17", "log", "pin-project 1.0.8", - "smallvec 1.7.0", + "smallvec", "unsigned-varint 0.7.0", ] @@ -4734,18 +4537,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "names" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" +checksum = "10a8690bf09abf659851e58cd666c3d37ac6af07c2bd7a9e332cfba471715775" dependencies = [ - "rand 0.3.23", + "rand 0.8.4", ] [[package]] @@ -4783,6 +4586,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -4856,22 +4668,14 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" -dependencies = [ - "crc32fast", - "indexmap", -] - [[package]] name = "object" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39f37e50073ccad23b6d09bcb5b263f4e76d3bb6038e4a3c08e52162ffa8abc2" dependencies = [ + "crc32fast", + "indexmap", "memchr", ] @@ -4911,13 +4715,14 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "frame-system", "orml-traits", "orml-utilities", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -4927,12 +4732,13 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "frame-system", "orml-traits", "parity-scale-codec", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -4941,13 +4747,14 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "impl-trait-for-tuples", "num-traits", "orml-utilities", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -4958,12 +4765,13 @@ dependencies = [ [[package]] name = "orml-unknown-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=master#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "frame-system", "orml-xcm-support", "parity-scale-codec", + "scale-info", "serde", "sp-std", "xcm", @@ -4972,10 +4780,11 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -4985,7 +4794,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "frame-support", "orml-traits", @@ -4999,7 +4808,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=37e42936c41dbdbaf0117c628c9eab0e06044844#37e42936c41dbdbaf0117c628c9eab0e06044844" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5007,6 +4816,7 @@ dependencies = [ "orml-traits", "orml-xcm-support", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -5041,6 +4851,7 @@ dependencies = [ "polkadot-parachain", "primitives", "rand 0.8.4", + "scale-info", "serde", "sp-core", "sp-io", @@ -5073,6 +4884,7 @@ version = "0.0.1" dependencies = [ "parity-scale-codec", "primitives", + "scale-info", "serde", "sp-api", "sp-runtime", @@ -5082,12 +4894,13 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -5095,13 +4908,13 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", - "pallet-session", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", @@ -5111,12 +4924,13 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-authority-discovery", "sp-runtime", @@ -5126,13 +4940,14 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", - "sp-authorship 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7)", + "scale-info", + "sp-authorship 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-runtime", "sp-std", ] @@ -5140,7 +4955,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", @@ -5150,6 +4965,7 @@ dependencies = [ "pallet-session", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", @@ -5160,31 +4976,52 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-bags-list" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] [[package]] name = "pallet-beefy" -version = "0.1.0" -source = "git+https://github.com/paritytech//grandpa-bridge-gadget?rev=9954b61657dc8899a21b4f2501ee6bd3b7a2dc23#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", - "scale-info 0.10.0", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -5192,22 +5029,22 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" -version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=polkadot-v0.9.10#9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "beefy-merkle-tree", "beefy-primitives", "frame-support", "frame-system", "hex", - "libsecp256k1 0.6.0", + "libsecp256k1 0.7.0", "log", "pallet-beefy", "pallet-mmr", "pallet-mmr-primitives", "pallet-session", "parity-scale-codec", - "scale-info 0.10.0", + "scale-info", "serde", "sp-core", "sp-io", @@ -5218,13 +5055,17 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-treasury", "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", "sp-runtime", "sp-std", ] @@ -5232,7 +5073,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5240,6 +5081,7 @@ dependencies = [ "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -5248,7 +5090,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5259,6 +5101,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-finality-grandpa", "sp-runtime", @@ -5269,7 +5112,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "bp-message-dispatch", @@ -5281,6 +5124,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-runtime", @@ -5290,12 +5134,13 @@ dependencies = [ [[package]] name = "pallet-chainlink-feed" version = "0.1.0" -source = "git+https://github.com/chainSafe/chainlink-polkadot?branch=polkadot-v0.9.10#9d2896539c173aafad67d6cbeecb87a2312b513a" +source = "git+https://github.com/smartcontractkit/chainlink-polkadot?branch=polkadot-v0.9.12#8ad333a2c04030f69736e5fb4651ce1ca4249a60" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "sp-arithmetic", "sp-core", @@ -5306,7 +5151,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "frame-benchmarking", "frame-support", @@ -5315,6 +5160,8 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", + "rand 0.7.3", + "scale-info", "serde", "sp-runtime", "sp-staking", @@ -5324,13 +5171,14 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -5346,18 +5194,20 @@ dependencies = [ "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "sp-io", "sp-runtime", @@ -5367,7 +5217,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5376,6 +5226,7 @@ dependencies = [ "log", "parity-scale-codec", "rand 0.7.3", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", @@ -5383,18 +5234,21 @@ dependencies = [ "sp-runtime", "sp-std", "static_assertions", + "strum 0.21.0", + "strum_macros 0.21.1", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-npos-elections", @@ -5405,12 +5259,13 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-runtime", "sp-std", @@ -5419,7 +5274,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", @@ -5428,6 +5283,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-core", "sp-finality-grandpa", @@ -5441,13 +5297,14 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5456,7 +5313,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", @@ -5464,6 +5321,7 @@ dependencies = [ "log", "pallet-authorship", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-core", "sp-io", @@ -5475,12 +5333,13 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-keyring", @@ -5497,6 +5356,7 @@ dependencies = [ "frame-system", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -5506,13 +5366,15 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -5521,7 +5383,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5529,6 +5391,7 @@ dependencies = [ "frame-system", "pallet-mmr-primitives", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -5538,7 +5401,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", @@ -5554,7 +5417,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5565,20 +5428,19 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", - "sp-rpc", "sp-runtime", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", - "sp-core", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5587,11 +5449,12 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5600,13 +5463,14 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-runtime", "sp-staking", @@ -5616,7 +5480,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5630,6 +5494,7 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-staking", "sp-std", @@ -5647,6 +5512,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "primitives", + "scale-info", "serde", "sp-core", "sp-io", @@ -5656,13 +5522,13 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", - "sp-core", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5671,12 +5537,13 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "safe-mix", + "scale-info", "sp-runtime", "sp-std", ] @@ -5684,12 +5551,12 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "enumflags2", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5735,6 +5602,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "primitives", + "scale-info", "serde", "sp-core", "sp-io", @@ -5761,6 +5629,7 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "primitives", + "scale-info", "serde", "sp-core", "sp-io", @@ -5784,6 +5653,7 @@ dependencies = [ "pallet-remote-asset-manager", "parity-scale-codec", "primitives", + "scale-info", "serde", "sp-core", "sp-io", @@ -5794,13 +5664,14 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5809,7 +5680,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", @@ -5817,6 +5688,7 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -5829,7 +5701,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", @@ -5845,12 +5717,13 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "rand_chacha 0.2.2", + "scale-info", "sp-runtime", "sp-std", ] @@ -5858,7 +5731,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5868,32 +5741,31 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", - "paste", "rand_chacha 0.2.2", + "scale-info", "serde", "sp-application-crypto", "sp-io", "sp-runtime", "sp-staking", "sp-std", - "static_assertions", ] [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "sp-arithmetic", @@ -5902,11 +5774,12 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -5915,14 +5788,14 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-inherents", "sp-io", "sp-runtime", @@ -5933,14 +5806,18 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-treasury", "parity-scale-codec", + "scale-info", "serde", + "sp-core", + "sp-io", "sp-runtime", "sp-std", ] @@ -5948,13 +5825,14 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", - "smallvec 1.7.0", + "smallvec", "sp-core", "sp-io", "sp-runtime", @@ -5964,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5981,7 +5859,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5992,7 +5870,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", @@ -6000,6 +5878,7 @@ dependencies = [ "impl-trait-for-tuples", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -6008,12 +5887,13 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -6023,27 +5903,47 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "enumflags2", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] [[package]] name = "pallet-xcm" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "serde", + "sp-core", + "sp-runtime", + "sp-std", + "xcm", + "xcm-executor", +] + +[[package]] +name = "pallet-xcm-benchmarks" +version = "0.9.8" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", "xcm", @@ -6053,20 +5953,21 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=870b214693856e768ba482fe2d3b9a83b24e4540#870b214693856e768ba482fe2d3b9a83b24e4540" +source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", ] [[package]] name = "parity-db" -version = "0.2.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e337f62db341435f0da05b8f6b97e984ef4ea5800510cd07c2d624688c40b47" +checksum = "91b679c6acc14fac74382942e2b73bea441686a33430b951ea03b5aeb6a7f254" dependencies = [ "blake2-rfc", "crc32fast", @@ -6074,9 +5975,11 @@ dependencies = [ "hex", "libc", "log", + "lz4", "memmap2", "parking_lot 0.11.2", "rand 0.8.4", + "snap", ] [[package]] @@ -6100,9 +6003,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -6113,20 +6016,15 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-tokio-ipc" -version = "0.4.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf" +checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", + "futures 0.3.17", "libc", "log", - "mio-named-pipes", - "miow 0.3.7", "rand 0.7.3", - "tokio 0.1.22", - "tokio-named-pipes", - "tokio-uds", + "tokio", "winapi 0.3.9", ] @@ -6140,11 +6038,11 @@ dependencies = [ "ethereum-types", "hashbrown", "impl-trait-for-tuples", - "lru", + "lru 0.6.6", "parity-util-mem-derive", "parking_lot 0.11.2", "primitive-types", - "smallvec 1.7.0", + "smallvec", "winapi 0.3.9", ] @@ -6154,8 +6052,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.29", - "syn 1.0.77", + "proc-macro2 1.0.30", + "syn 1.0.80", "synstructure", ] @@ -6176,15 +6074,15 @@ checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parity-ws" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322d72dfe461b8b9e367d057ceace105379d64d5b03907d23c481ccf3fbf8aa4" +checksum = "d0ab8a461779bd022964cae2b4989fa9c99deb270bec162da2125ec03c09fcaa" dependencies = [ "byteorder", "bytes 0.4.12", "httparse", "log", - "mio", + "mio 0.6.23", "mio-extras", "rand 0.7.3", "sha-1 0.8.2", @@ -6198,17 +6096,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version 0.2.3", -] - [[package]] name = "parking_lot" version = "0.10.2" @@ -6230,21 +6117,6 @@ dependencies = [ "parking_lot_core 0.8.5", ] -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version 0.2.3", - "smallvec 0.6.14", - "winapi 0.3.9", -] - [[package]] name = "parking_lot_core" version = "0.7.2" @@ -6255,7 +6127,7 @@ dependencies = [ "cloudabi", "libc", "redox_syscall 0.1.57", - "smallvec 1.7.0", + "smallvec", "winapi 0.3.9", ] @@ -6269,7 +6141,7 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.10", - "smallvec 1.7.0", + "smallvec", "winapi 0.3.9", ] @@ -6297,12 +6169,6 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "pdqselect" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" - [[package]] name = "peeking_take_while" version = "0.1.2" @@ -6348,9 +6214,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -6398,9 +6264,9 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -6409,9 +6275,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -6452,7 +6318,7 @@ dependencies = [ "frame-support", "frame-system-rpc-runtime-api", "futures 0.3.17", - "hex-literal 0.2.1", + "hex-literal", "jsonrpc-core", "log", "pallet-asset-index-rpc", @@ -6571,7 +6437,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex", - "hex-literal 0.3.3", + "hex-literal", "log", "orml-currencies", "orml-tokens", @@ -6605,6 +6471,7 @@ dependencies = [ "pint-runtime-common", "polkadot-parachain", "primitives", + "scale-info", "serde", "sp-api", "sp-block-builder", @@ -6645,7 +6512,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex", - "hex-literal 0.3.3", + "hex-literal", "log", "orml-currencies", "orml-tokens", @@ -6679,6 +6546,7 @@ dependencies = [ "pint-runtime-common", "polkadot-parachain", "primitives", + "scale-info", "serde", "sp-api", "sp-block-builder", @@ -6719,7 +6587,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex", - "hex-literal 0.3.3", + "hex-literal", "log", "orml-currencies", "orml-tokens", @@ -6753,6 +6621,7 @@ dependencies = [ "pint-runtime-common", "polkadot-parachain", "primitives", + "scale-info", "serde", "sp-api", "sp-block-builder", @@ -6787,8 +6656,8 @@ checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" [[package]] name = "polkadot-approval-distribution" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6801,8 +6670,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6814,22 +6683,20 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", - "lru", + "lru 0.7.0", "parity-scale-codec", "polkadot-erasure-coding", - "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.4", - "sp-application-crypto", "sp-core", "sp-keystore", "thiserror", @@ -6838,11 +6705,11 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", - "lru", + "lru 0.7.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6851,14 +6718,15 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.4", + "sc-network", "thiserror", "tracing", ] [[package]] name = "polkadot-cli" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "frame-benchmarking-cli", "futures 0.3.17", @@ -6877,8 +6745,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6907,8 +6775,8 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "always-assert", "derive_more 0.99.16", @@ -6928,11 +6796,12 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "parity-scale-codec", "parity-util-mem", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -6940,24 +6809,21 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", - "lru", + "lru 0.7.0", "parity-scale-codec", "polkadot-erasure-coding", - "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.4", "sc-network", "sp-application-crypto", - "sp-core", "sp-keystore", "thiserror", "tracing", @@ -6965,8 +6831,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6979,16 +6845,18 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", + "futures-timer 3.0.2", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.4", "rand_chacha 0.3.1", + "sc-network", "sp-application-crypto", "sp-core", "sp-keystore", @@ -6997,8 +6865,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "futures 0.3.17", @@ -7016,8 +6884,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "parity-scale-codec", @@ -7034,15 +6902,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "derive_more 0.99.16", "futures 0.3.17", "futures-timer 3.0.2", "kvdb", - "lru", + "lru 0.7.0", "merlin", "parity-scale-codec", "polkadot-node-jaeger", @@ -7051,11 +6919,9 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sc-client-api", "sc-keystore", "schnorrkel", "sp-application-crypto", - "sp-blockchain", "sp-consensus", "sp-consensus-slots", "sp-runtime", @@ -7064,8 +6930,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "futures 0.3.17", @@ -7084,8 +6950,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "futures 0.3.17", @@ -7102,8 +6968,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -7117,8 +6983,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "futures 0.3.17", @@ -7135,8 +7001,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -7150,8 +7016,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7167,8 +7033,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "derive_more 0.99.16", @@ -7186,8 +7052,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-participation" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "polkadot-node-primitives", @@ -7199,8 +7065,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "futures 0.3.17", @@ -7216,8 +7082,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "futures 0.3.17", @@ -7231,8 +7097,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "always-assert", "assert_matches", @@ -7244,6 +7110,7 @@ dependencies = [ "parity-scale-codec", "pin-project 1.0.8", "polkadot-core-primitives", + "polkadot-node-subsystem-util", "polkadot-parachain", "rand 0.8.4", "sc-executor", @@ -7261,8 +7128,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "futures 0.3.17", "memory-lru", @@ -7279,8 +7146,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-std", "lazy_static", @@ -7297,24 +7164,19 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ - "async-trait", "futures 0.3.17", "futures-timer 3.0.2", "metered-channel", - "sc-network", - "sp-application-crypto", - "sp-core", - "sp-keystore", "substrate-prometheus-endpoint", ] [[package]] name = "polkadot-node-network-protocol" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -7325,20 +7187,20 @@ dependencies = [ "polkadot-primitives", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.22.0", "thiserror", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ + "bounded-vec", "futures 0.3.17", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", - "polkadot-statement-table", "schnorrkel", "serde", "sp-application-crypto", @@ -7347,16 +7209,14 @@ dependencies = [ "sp-core", "sp-keystore", "sp-maybe-compressed-blob", - "sp-runtime", "thiserror", - "tracing", "zstd", ] [[package]] name = "polkadot-node-subsystem" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7365,20 +7225,11 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ - "async-std", - "async-trait", "derive_more 0.99.16", "futures 0.3.17", - "futures-timer 3.0.2", - "lazy_static", - "log", - "mick-jaeger", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project 1.0.8", "polkadot-node-jaeger", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7386,59 +7237,52 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", - "smallvec 1.7.0", - "sp-core", + "smallvec", "substrate-prometheus-endpoint", "thiserror", - "tracing", ] [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "derive_more 0.99.16", "futures 0.3.17", - "futures-timer 3.0.2", "itertools", - "lru", + "lru 0.7.0", "metered-channel", "parity-scale-codec", "pin-project 1.0.8", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", - "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", "rand 0.8.4", - "sc-network", "sp-application-crypto", "sp-core", "sp-keystore", - "substrate-prometheus-endpoint", "thiserror", "tracing", ] [[package]] name = "polkadot-overseer" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ - "async-trait", "futures 0.3.17", "futures-timer 3.0.2", - "lru", + "lru 0.7.0", + "parity-util-mem", "parking_lot 0.11.2", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-overseer-all-subsystems-gen", "polkadot-overseer-gen", "polkadot-primitives", "sc-client-api", @@ -7446,21 +7290,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "polkadot-overseer-all-subsystems-gen" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" -dependencies = [ - "assert_matches", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", -] - [[package]] name = "polkadot-overseer-gen" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "futures 0.3.17", @@ -7476,25 +7309,26 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "polkadot-parachain" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "derive_more 0.99.16", "frame-support", "parity-scale-codec", "parity-util-mem", "polkadot-core-primitives", + "scale-info", "serde", "sp-core", "sp-runtime", @@ -7503,16 +7337,17 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitvec 0.20.4", "frame-system", - "hex-literal 0.3.3", + "hex-literal", "parity-scale-codec", "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -7528,20 +7363,18 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "thiserror", ] [[package]] name = "polkadot-rpc" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "jsonrpc-core", "pallet-mmr-rpc", "pallet-transaction-payment-rpc", - "parity-scale-codec", "polkadot-primitives", "sc-chain-spec", "sc-client-api", @@ -7550,7 +7383,6 @@ dependencies = [ "sc-consensus-epochs", "sc-finality-grandpa", "sc-finality-grandpa-rpc", - "sc-keystore", "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", @@ -7566,8 +7398,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-primitives", "bitvec 0.20.4", @@ -7579,7 +7411,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.3.3", + "hex-literal", "log", "pallet-authority-discovery", "pallet-authorship", @@ -7616,10 +7448,12 @@ dependencies = [ "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", + "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", - "smallvec 1.7.0", + "smallvec", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -7641,22 +7475,24 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ + "beefy-primitives", "bitvec 0.20.4", "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "impl-trait-for-tuples", - "libsecp256k1 0.6.0", + "libsecp256k1 0.7.0", "log", "pallet-authorship", "pallet-babe", + "pallet-bags-list", "pallet-balances", "pallet-beefy-mmr", "pallet-election-provider-multi-phase", - "pallet-offences", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7667,6 +7503,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", "slot-range-helper", @@ -7674,6 +7511,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-npos-elections", "sp-runtime", "sp-session", "sp-staking", @@ -7684,8 +7522,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "bitflags", "bitvec 0.20.4", @@ -7697,7 +7535,6 @@ dependencies = [ "pallet-authority-discovery", "pallet-authorship", "pallet-balances", - "pallet-offences", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7707,6 +7544,7 @@ dependencies = [ "rand 0.8.4", "rand_chacha 0.3.1", "rustc-hex", + "scale-info", "serde", "sp-api", "sp-core", @@ -7723,18 +7561,19 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "async-trait", "beefy-gadget", "beefy-primitives", "frame-system-rpc-runtime-api", "futures 0.3.17", - "hex-literal 0.3.3", + "hex-literal", "kusama-runtime", "kvdb", "kvdb-rocksdb", + "lru 0.7.0", "pallet-babe", "pallet-im-online", "pallet-mmr-primitives", @@ -7783,7 +7622,7 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "sc-consensus-slots", - "sc-consensus-uncles 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10)", + "sc-consensus-uncles", "sc-executor", "sc-finality-grandpa", "sc-keystore", @@ -7820,8 +7659,8 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "arrayvec 0.5.2", "derive_more 0.99.16", @@ -7841,8 +7680,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7868,7 +7707,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ - "cpufeatures", + "cpufeatures 0.2.1", "opaque-debug 0.3.0", "universal-hash", ] @@ -7880,16 +7719,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ "cfg-if 1.0.0", - "cpufeatures", + "cpufeatures 0.2.1", "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" [[package]] name = "primitive-types" @@ -7901,6 +7740,7 @@ dependencies = [ "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "uint", ] @@ -7911,6 +7751,7 @@ dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "xcm", ] @@ -7941,9 +7782,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" dependencies = [ "proc-macro-error-attr 0.4.12", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "version_check", ] @@ -7954,9 +7795,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr 1.0.4", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "version_check", ] @@ -7966,9 +7807,9 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "syn-mid", "version_check", ] @@ -7979,8 +7820,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", + "proc-macro2 1.0.30", + "quote 1.0.10", "version_check", ] @@ -8007,24 +7848,24 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" dependencies = [ "unicode-xid 0.2.2", ] [[package]] name = "prometheus" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" +checksum = "5986aa8d62380092d2f50f8b1cdba9cb9b6731ffd4b25b51fd126b6c3e05b99c" dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", + "memchr", "parking_lot 0.11.2", - "regex", "thiserror", ] @@ -8064,9 +7905,9 @@ checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -8133,11 +7974,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ - "proc-macro2 1.0.29", + "proc-macro2 1.0.30", ] [[package]] @@ -8152,29 +7993,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -8221,21 +8039,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -8304,7 +8107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ "autocfg", - "crossbeam-deque 0.8.1", + "crossbeam-deque", "either", "rayon-core", ] @@ -8316,21 +8119,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", - "crossbeam-deque 0.8.1", - "crossbeam-utils 0.8.5", + "crossbeam-deque", + "crossbeam-utils", "lazy_static", "num_cpus", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.1.57" @@ -8384,9 +8178,9 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -8397,8 +8191,7 @@ checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ "log", "rustc-hash", - "serde", - "smallvec 1.7.0", + "smallvec", ] [[package]] @@ -8442,10 +8235,9 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "env_logger 0.8.4", - "hex", + "env_logger 0.9.0", "jsonrpsee-proc-macros", "jsonrpsee-ws-client", "log", @@ -8455,6 +8247,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-version", ] [[package]] @@ -8519,8 +8312,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-primitives", "bp-messages", @@ -8528,11 +8321,12 @@ dependencies = [ "bp-runtime", "bp-wococo", "bridge-runtime-common", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "hex-literal 0.3.3", + "hex-literal", "log", "pallet-authority-discovery", "pallet-authorship", @@ -8550,11 +8344,11 @@ dependencies = [ "pallet-membership", "pallet-mmr", "pallet-mmr-primitives", + "pallet-multisig", "pallet-offences", "pallet-proxy", "pallet-session", "pallet-staking", - "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -8566,9 +8360,10 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", + "scale-info", "serde", "serde_derive", - "smallvec 1.7.0", + "smallvec", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -8640,6 +8435,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "primitives", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -8688,19 +8484,6 @@ dependencies = [ "semver 0.11.0", ] -[[package]] -name = "rustls" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", -] - [[package]] name = "rustls" version = "0.19.1" @@ -8714,18 +8497,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "rustls-native-certs" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" -dependencies = [ - "openssl-probe", - "rustls 0.18.1", - "schannel", - "security-framework 1.0.0", -] - [[package]] name = "rustls-native-certs" version = "0.5.0" @@ -8733,19 +8504,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", - "rustls 0.19.1", + "rustls", "schannel", - "security-framework 2.4.2", -] - -[[package]] -name = "ruzstd" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" -dependencies = [ - "byteorder", - "twox-hash", + "security-framework", ] [[package]] @@ -8795,7 +8556,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "sp-core", @@ -8806,11 +8567,10 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", - "either", "futures 0.3.17", "futures-timer 3.0.2", "ip_network", @@ -8822,7 +8582,6 @@ dependencies = [ "rand 0.7.3", "sc-client-api", "sc-network", - "serde_json", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -8835,7 +8594,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8858,7 +8617,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8874,7 +8633,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8890,18 +8649,18 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "chrono", "fdlimit", @@ -8920,6 +8679,7 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-tracing", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde", "serde_json", "sp-blockchain", @@ -8928,54 +8688,46 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-utils", "sp-version", "structopt", "thiserror", "tiny-bip39", - "tokio 0.2.25", + "tokio", ] [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "derive_more 0.99.16", "fnv", "futures 0.3.17", "hash-db", - "kvdb", - "lazy_static", "log", "parity-scale-codec", "parking_lot 0.11.2", "sc-executor", "sc-transaction-pool-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-database", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", - "sp-utils", - "sp-version", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "blake2-rfc", "hash-db", "kvdb", "kvdb-memorydb", @@ -8984,10 +8736,8 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.11.2", "sc-client-api", - "sc-executor", "sc-state-db", "sp-arithmetic", "sp-blockchain", @@ -8996,13 +8746,12 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-trie", - "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "futures 0.3.17", @@ -9011,6 +8760,7 @@ dependencies = [ "log", "parking_lot 0.11.2", "sc-client-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde", "sp-api", "sp-blockchain", @@ -9018,21 +8768,18 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", "futures 0.3.17", - "futures-timer 3.0.2", "log", "parity-scale-codec", "sc-block-builder", @@ -9049,23 +8796,20 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", "fork-tree", "futures 0.3.17", - "futures-timer 3.0.2", "log", "merlin", "num-bigint", @@ -9073,14 +8817,12 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.11.2", - "pdqselect", "rand 0.7.3", "retain_mut", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-consensus-uncles 0.10.0-dev (git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7)", "sc-keystore", "sc-telemetry", "schnorrkel", @@ -9098,7 +8840,6 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-utils", "sp-version", "substrate-prometheus-endpoint", ] @@ -9106,7 +8847,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", @@ -9130,7 +8871,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9143,7 +8884,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "assert_matches", "async-trait", @@ -9154,7 +8895,6 @@ dependencies = [ "jsonrpc-derive", "log", "parity-scale-codec", - "parking_lot 0.11.2", "sc-client-api", "sc-consensus", "sc-consensus-babe", @@ -9169,7 +8909,6 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keyring", "sp-keystore", "sp-runtime", "sp-timestamp", @@ -9179,19 +8918,17 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "futures 0.3.17", "futures-timer 3.0.2", - "impl-trait-for-tuples", "log", "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", "sp-api", - "sp-application-crypto", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -9201,28 +8938,16 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-trie", - "thiserror", -] - -[[package]] -name = "sc-consensus-uncles" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" -dependencies = [ - "sc-client-api", - "sp-authorship 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10)", - "sp-runtime", "thiserror", ] [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "sc-client-api", - "sp-authorship 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7)", + "sp-authorship 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12)", "sp-runtime", "thiserror", ] @@ -9230,14 +8955,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "derive_more 0.99.16", "lazy_static", "libsecp256k1 0.6.0", "log", "parity-scale-codec", - "parity-wasm 0.42.2", "parking_lot 0.11.2", "sc-executor-common", "sc-executor-wasmi", @@ -9248,7 +8971,6 @@ dependencies = [ "sp-io", "sp-panic-handler", "sp-runtime-interface", - "sp-serializer", "sp-tasks", "sp-trie", "sp-version", @@ -9259,9 +8981,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "derive_more 0.99.16", + "environmental", "parity-scale-codec", "pwasm-utils", "sc-allocator", @@ -9276,12 +8999,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "parity-scale-codec", "sc-allocator", "sc-executor-common", + "scoped-tls", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -9291,17 +9015,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "cfg-if 1.0.0", "libc", "log", "parity-scale-codec", "parity-wasm 0.42.2", - "pwasm-utils", "sc-allocator", "sc-executor-common", - "scoped-tls", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -9311,7 +9033,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -9320,11 +9042,9 @@ dependencies = [ "fork-tree", "futures 0.3.17", "futures-timer 3.0.2", - "linked-hash-map", "log", "parity-scale-codec", "parking_lot 0.11.2", - "pin-project 1.0.8", "rand 0.8.4", "sc-block-builder", "sc-client-api", @@ -9333,6 +9053,7 @@ dependencies = [ "sc-network", "sc-network-gossip", "sc-telemetry", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde_json", "sp-api", "sp-application-crypto", @@ -9341,18 +9062,15 @@ dependencies = [ "sp-consensus", "sp-core", "sp-finality-grandpa", - "sp-inherents", "sp-keystore", "sp-runtime", - "sp-utils", "substrate-prometheus-endpoint", - "wasm-timer", ] [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "derive_more 0.99.16", "finality-grandpa", @@ -9376,7 +9094,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "ansi_term 0.12.1", "futures 0.3.17", @@ -9388,36 +9106,29 @@ dependencies = [ "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", - "wasm-timer", ] [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", - "futures 0.3.17", - "futures-util", "hex", - "merlin", "parking_lot 0.11.2", - "rand 0.7.3", "serde_json", "sp-application-crypto", "sp-core", "sp-keystore", - "subtle", ] [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "hash-db", - "lazy_static", "parity-scale-codec", "parking_lot 0.11.2", "sc-client-api", @@ -9433,18 +9144,16 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-std", "async-trait", "asynchronous-codec 0.5.0", "bitflags", - "bs58", "bytes 1.1.0", "cid", "derive_more 0.99.16", "either", - "erased-serde", "fnv", "fork-tree", "futures 0.3.17", @@ -9455,8 +9164,7 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru", - "nohash-hasher", + "lru 0.6.6", "parity-scale-codec", "parking_lot 0.11.2", "pin-project 1.0.8", @@ -9467,52 +9175,50 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-peerset", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde", "serde_json", - "smallvec 1.7.0", + "smallvec", "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", "sp-finality-grandpa", "sp-runtime", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", "void", - "wasm-timer", "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", "libp2p", "log", - "lru", + "lru 0.6.6", "sc-network", "sp-runtime", "substrate-prometheus-endpoint", "tracing", - "wasm-timer", ] [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "fnv", "futures 0.3.17", "futures-timer 3.0.2", "hex", - "hyper 0.13.10", + "hyper", "hyper-rustls", "log", "num_cpus", @@ -9520,33 +9226,32 @@ dependencies = [ "parking_lot 0.11.2", "rand 0.7.3", "sc-client-api", - "sc-keystore", "sc-network", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-api", "sp-core", "sp-offchain", "sp-runtime", - "sp-utils", "threadpool", ] [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "libp2p", "log", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde_json", - "sp-utils", "wasm-timer", ] [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9555,7 +9260,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "hash-db", @@ -9567,11 +9272,10 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", - "sc-executor", - "sc-keystore", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde_json", "sp-api", "sp-blockchain", @@ -9581,18 +9285,14 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", - "sp-state-machine", - "sp-tracing", - "sp-utils", "sp-version", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "derive_more 0.99.16", "futures 0.3.17", "jsonrpc-core", "jsonrpc-core-client", @@ -9610,41 +9310,39 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-version", + "thiserror", ] [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "futures 0.1.31", + "futures 0.3.17", "jsonrpc-core", "jsonrpc-http-server", "jsonrpc-ipc-server", "jsonrpc-pubsub", "jsonrpc-ws-server", "log", - "serde", "serde_json", - "sp-runtime", "substrate-prometheus-endpoint", + "tokio", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.1.31", "futures 0.3.17", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", - "lazy_static", "log", "parity-scale-codec", "parity-util-mem", @@ -9668,6 +9366,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde", "serde_json", "sp-api", @@ -9678,7 +9377,6 @@ dependencies = [ "sp-core", "sp-externalities", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", "sp-session", @@ -9688,20 +9386,19 @@ dependencies = [ "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", - "sp-utils", "sp-version", "substrate-prometheus-endpoint", "tempfile", "thiserror", + "tokio", "tracing", "tracing-futures", - "wasm-timer", ] [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "parity-scale-codec", @@ -9710,13 +9407,12 @@ dependencies = [ "parking_lot 0.11.2", "sc-client-api", "sp-core", - "thiserror", ] [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9738,7 +9434,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "chrono", "futures 0.3.17", @@ -9749,20 +9445,18 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "take_mut", "thiserror", - "void", "wasm-timer", ] [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "ansi_term 0.12.1", "atty", - "erased-serde", + "chrono", "lazy_static", "log", "once_cell", @@ -9771,44 +9465,36 @@ dependencies = [ "rustc-hash", "sc-client-api", "sc-rpc-server", - "sc-telemetry", "sc-tracing-proc-macro", "serde", - "serde_json", "sp-api", - "sp-block-builder", "sp-blockchain", "sp-core", "sp-rpc", "sp-runtime", - "sp-storage", "sp-tracing", "thiserror", "tracing", "tracing-log", "tracing-subscriber", - "wasm-bindgen", - "wasm-timer", - "web-sys", ] [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "derive_more 0.99.16", "futures 0.3.17", "intervalier", "linked-hash-map", @@ -9819,6 +9505,7 @@ dependencies = [ "retain_mut", "sc-client-api", "sc-transaction-pool-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "serde", "sp-api", "sp-blockchain", @@ -9826,21 +9513,18 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-transaction-pool", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", "log", - "parity-scale-codec", "serde", "sp-blockchain", "sp-runtime", @@ -9848,16 +9532,25 @@ dependencies = [ ] [[package]] -name = "scale-info" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e62ff266e136db561a007c84569985805f84a1d5a08278e52c36aacb6e061b" +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "bitvec 0.20.4", - "cfg-if 1.0.0", - "derive_more 0.99.16", - "parity-scale-codec", - "scale-info-derive 0.7.0", + "futures 0.3.17", + "futures-timer 3.0.2", + "lazy_static", + "prometheus", +] + +[[package]] +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "futures 0.3.17", + "futures-timer 3.0.2", + "lazy_static", + "prometheus", ] [[package]] @@ -9870,19 +9563,8 @@ dependencies = [ "cfg-if 1.0.0", "derive_more 0.99.16", "parity-scale-codec", - "scale-info-derive 1.0.0", -] - -[[package]] -name = "scale-info-derive" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b648fa291891a4c80187a25532f6a7d96b82c70353e30b868b14632b8fe043d6" -dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "scale-info-derive", + "serde", ] [[package]] @@ -9892,9 +9574,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -9949,26 +9631,13 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] -[[package]] -name = "security-framework" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b" -dependencies = [ - "bitflags", - "core-foundation 0.7.0", - "core-foundation-sys 0.7.0", - "libc", - "security-framework-sys 1.0.0", -] - [[package]] name = "security-framework" version = "2.4.2" @@ -9976,20 +9645,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" dependencies = [ "bitflags", - "core-foundation 0.9.1", - "core-foundation-sys 0.8.2", - "libc", - "security-framework-sys 2.4.2", -] - -[[package]] -name = "security-framework-sys" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" -dependencies = [ - "core-foundation-sys 0.7.0", + "core-foundation", + "core-foundation-sys", "libc", + "security-framework-sys", ] [[package]] @@ -9998,7 +9657,7 @@ version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" dependencies = [ - "core-foundation-sys 0.8.2", + "core-foundation-sys", "libc", ] @@ -10060,9 +9719,9 @@ version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -10096,7 +9755,7 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures", + "cpufeatures 0.2.1", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -10121,7 +9780,7 @@ checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures", + "cpufeatures 0.2.1", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -10140,9 +9799,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] @@ -10192,23 +9851,14 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slot-range-helper" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "enumn", "parity-scale-codec", @@ -10228,18 +9878,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.14" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] -name = "smallvec" -version = "1.7.0" +name = "snap" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451" [[package]] name = "snow" @@ -10314,7 +9961,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "hash-db", "log", @@ -10331,21 +9978,22 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -10355,11 +10003,12 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-debug-derive", "sp-std", @@ -10369,9 +10018,10 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", @@ -10381,7 +10031,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.10#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "parity-scale-codec", @@ -10393,7 +10043,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "parity-scale-codec", @@ -10405,7 +10055,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", "sp-api", @@ -10417,11 +10067,11 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "log", - "lru", + "lru 0.6.6", "parity-scale-codec", "parking_lot 0.11.2", "sp-api", @@ -10435,36 +10085,30 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "futures 0.3.17", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.11.2", - "serde", - "sp-api", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", "sp-std", - "sp-trie", - "sp-utils", "sp-version", - "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-consensus", @@ -10478,11 +10122,12 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "merlin", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -10500,9 +10145,10 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-runtime", ] @@ -10510,7 +10156,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10522,7 +10168,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "base58", "blake2-rfc", @@ -10545,6 +10191,7 @@ dependencies = [ "primitive-types", "rand 0.7.3", "regex", + "scale-info", "schnorrkel", "secrecy", "serde", @@ -10554,6 +10201,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -10566,7 +10214,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -10575,17 +10223,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "environmental", "parity-scale-codec", @@ -10596,11 +10244,12 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -10613,7 +10262,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10627,7 +10276,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "futures 0.3.17", "hash-db", @@ -10638,7 +10287,6 @@ dependencies = [ "sp-core", "sp-externalities", "sp-keystore", - "sp-maybe-compressed-blob", "sp-runtime-interface", "sp-state-machine", "sp-std", @@ -10652,18 +10300,18 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.20.0", ] [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -10680,40 +10328,41 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "ruzstd", "zstd", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-npos-elections-solution-type", + "sp-runtime", "sp-std", ] [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "sp-api", "sp-core", @@ -10723,7 +10372,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "backtrace", ] @@ -10731,18 +10380,17 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "rustc-hash", "serde", "sp-core", - "tracing-core", ] [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "either", "hash256-std-hasher", @@ -10752,6 +10400,7 @@ dependencies = [ "parity-util-mem", "paste", "rand 0.7.3", + "scale-info", "serde", "sp-application-crypto", "sp-arithmetic", @@ -10763,7 +10412,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10780,19 +10429,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "serde", "serde_json", @@ -10801,9 +10450,10 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-core", "sp-runtime", @@ -10814,9 +10464,10 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -10824,7 +10475,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "hash-db", "log", @@ -10832,7 +10483,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.2", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", @@ -10847,12 +10498,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10865,7 +10516,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "log", "sp-core", @@ -10878,7 +10529,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -10889,21 +10540,14 @@ dependencies = [ "sp-runtime", "sp-std", "thiserror", - "wasm-timer", ] [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -10913,7 +10557,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "sp-api", "sp-runtime", @@ -10922,11 +10566,12 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-trait", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-inherents", "sp-runtime", @@ -10937,37 +10582,27 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", + "scale-info", "sp-core", "sp-std", "trie-db", "trie-root", ] -[[package]] -name = "sp-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" -dependencies = [ - "futures 0.3.17", - "futures-core", - "futures-timer 3.0.2", - "lazy_static", - "prometheus", -] - [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm 0.42.2", + "scale-info", "serde", "sp-runtime", "sp-std", @@ -10978,19 +10613,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "parity-scale-codec", - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11004,6 +10638,20 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb102b328df61c67f8ccf8471b29c31c7d6da646a867aff95fe8bff386fe7c4d" +dependencies = [ + "Inflector", + "proc-macro2 1.0.30", + "quote 1.0.10", + "serde", + "serde_json", + "unicode-xid 0.2.2", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -11036,9 +10684,9 @@ checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" dependencies = [ "cfg_aliases", "memchr", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -11054,15 +10702,6 @@ dependencies = [ "rand 0.8.4", ] -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes 0.4.12", -] - [[package]] name = "strsim" version = "0.8.0" @@ -11088,9 +10727,9 @@ checksum = "134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0ba" dependencies = [ "heck", "proc-macro-error 1.0.4", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -11099,7 +10738,22 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" dependencies = [ - "strum_macros", + "strum_macros 0.20.1", +] + +[[package]] +name = "strum" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" + +[[package]] +name = "strum" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" +dependencies = [ + "strum_macros 0.22.0", ] [[package]] @@ -11109,9 +10763,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", +] + +[[package]] +name = "strum_macros" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" +dependencies = [ + "heck", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", +] + +[[package]] +name = "strum_macros" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" +dependencies = [ + "heck", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -11130,7 +10808,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "platforms", ] @@ -11138,7 +10816,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.17", @@ -11150,7 +10828,6 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde", "sp-api", "sp-block-builder", "sp-blockchain", @@ -11161,24 +10838,23 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "async-std", "derive_more 0.99.16", "futures-util", - "hyper 0.13.10", + "hyper", "log", "prometheus", - "tokio 0.2.25", + "tokio", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ "ansi_term 0.12.1", - "atty", "build-helper", "cargo_metadata", "sp-maybe-compressed-blob", @@ -11207,12 +10883,12 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.77" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5239bc68e0fef57495900cfea4e8dc75596d9a319d7e16b1e0a440d24e6fe0a0" +checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", + "proc-macro2 1.0.30", + "quote 1.0.10", "unicode-xid 0.2.2", ] @@ -11222,29 +10898,23 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "synstructure" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "unicode-xid 0.2.2", ] -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - [[package]] name = "tap" version = "1.0.1" @@ -11291,22 +10961,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] @@ -11396,300 +11066,69 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio" -version = "0.2.25" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg", + "bytes 1.1.0", "libc", "memchr", - "mio", - "mio-uds", + "mio 0.7.13", "num_cpus", - "pin-project-lite 0.1.12", + "once_cell", + "pin-project-lite 0.2.7", "signal-hook-registry", - "slab", "tokio-macros", "winapi 0.3.9", ] -[[package]] -name = "tokio" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" -dependencies = [ - "autocfg", - "pin-project-lite 0.2.7", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes 0.4.12", - "either", - "futures 0.1.31", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures 0.1.31", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures 0.1.31", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", -] - [[package]] name = "tokio-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" -dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", -] - -[[package]] -name = "tokio-named-pipes" -version = "0.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae" +checksum = "b2dd85aeaba7b68df939bd357c6afb36c87951be9e80bf9c859f2fc3e9fca0fd" dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "mio", - "mio-named-pipes", - "tokio 0.1.22", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "futures-core", - "rustls 0.18.1", - "tokio 0.2.25", + "rustls", + "tokio", "webpki", ] [[package]] -name = "tokio-rustls" -version = "0.15.0" +name = "tokio-stream" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d15e5669243a45f630a5167d101b942174ca94b615445b2057eace1c818736" +checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" dependencies = [ "futures-core", - "rustls 0.19.1", - "tokio 0.2.25", - "webpki", -] - -[[package]] -name = "tokio-service" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -dependencies = [ - "futures 0.1.31", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures 0.1.31", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque 0.7.4", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "iovec", - "libc", - "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "pin-project-lite 0.2.7", + "tokio", ] [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", + "pin-project-lite 0.2.7", + "tokio", ] [[package]] @@ -11709,12 +11148,11 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f96e095c0c82419687c20ddf5cb3eadb61f4e1405923c9dc8e53a1adacbda8" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", - "log", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -11722,20 +11160,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98863d0dd09fa59a1b79c6750ad80dbda6b75f4e71c437a6a1a8cb91a8bcbd77" +checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "tracing-core" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46125608c26121c81b0c6d693eab5a420e416da7e43c426d2e8f7df8da8a3acf" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ "lazy_static", ] @@ -11773,9 +11211,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd0568dbfe3baf7048b7908d2b32bca0d81cd56bec6d2a8f894b01d74f86be3" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ "ansi_term 0.12.1", "chrono", @@ -11785,7 +11223,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.7.0", + "smallvec", "thread_local", "tracing", "tracing-core", @@ -11803,7 +11241,7 @@ dependencies = [ "hashbrown", "log", "rustc-hex", - "smallvec 1.7.0", + "smallvec", ] [[package]] @@ -11833,7 +11271,7 @@ dependencies = [ "lazy_static", "log", "rand 0.8.4", - "smallvec 1.7.0", + "smallvec", "thiserror", "tinyvec", "url 2.2.2", @@ -11853,7 +11291,7 @@ dependencies = [ "lru-cache", "parking_lot 0.11.2", "resolv-conf", - "smallvec 1.7.0", + "smallvec", "thiserror", "trust-dns-proto", ] @@ -11867,25 +11305,24 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?rev=420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7#420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7" +source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "frame-try-runtime", + "jsonrpsee-ws-client", "log", "parity-scale-codec", "remote-externalities", "sc-chain-spec", "sc-cli", - "sc-client-api", "sc-executor", "sc-service", "serde", - "sp-api", - "sp-blockchain", "sp-core", "sp-externalities", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-version", "structopt", ] @@ -11935,9 +11372,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] name = "unicode-normalization" @@ -12092,17 +11529,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -dependencies = [ - "futures 0.1.31", - "log", - "try-lock", -] - [[package]] name = "want" version = "0.3.0" @@ -12144,9 +11570,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "wasm-bindgen-shared", ] @@ -12168,7 +11594,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ - "quote 1.0.9", + "quote 1.0.10", "wasm-bindgen-macro-support", ] @@ -12178,9 +11604,9 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12243,15 +11669,15 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.80.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "449167e2832691a1bff24cde28d2804e90e09586a448c8e76984792c44334a6b" [[package]] name = "wasmtime" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b310b9d20fcf59385761d1ade7a3ef06aecc380e3d3172035b919eaf7465d9f7" +checksum = "899b1e5261e3d3420860dacfb952871ace9d7ba9f953b314f67aaf9f8e2a4d89" dependencies = [ "anyhow", "backtrace", @@ -12262,27 +11688,28 @@ dependencies = [ "lazy_static", "libc", "log", + "object", "paste", "psm", + "rayon", "region", "rustc-demangle", "serde", - "smallvec 1.7.0", "target-lexicon", "wasmparser", "wasmtime-cache", + "wasmtime-cranelift", "wasmtime-environ", "wasmtime-jit", - "wasmtime-profiling", "wasmtime-runtime", "winapi 0.3.9", ] [[package]] name = "wasmtime-cache" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14d500d5c3dc5f5c097158feee123d64b3097f0d836a2a27dff9c761c73c843" +checksum = "e2493b81d7a9935f7af15e06beec806f256bc974a90a843685f3d61f2fc97058" dependencies = [ "anyhow", "base64 0.13.0", @@ -12301,29 +11728,19 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c525b39f062eada7db3c1298287b96dcb6e472b9f6b22501300b28d9fa7582f6" +checksum = "99706bacdf5143f7f967d417f0437cce83a724cf4518cb1a3ff40e519d793021" dependencies = [ + "anyhow", "cranelift-codegen", "cranelift-entity", "cranelift-frontend", + "cranelift-native", "cranelift-wasm", - "target-lexicon", - "wasmparser", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-debug" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d2a763e7a6fc734218e0e463196762a4f409c483063d81e0e85f96343b2e0a" -dependencies = [ - "anyhow", - "gimli 0.24.0", + "gimli", "more-asserts", - "object 0.24.0", + "object", "target-lexicon", "thiserror", "wasmparser", @@ -12332,91 +11749,55 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64d0c2d881c31b0d65c1f2695e022d71eb60b9fbdd336aacca28208b58eac90" +checksum = "ac42cb562a2f98163857605f02581d719a410c5abe93606128c59a10e84de85b" dependencies = [ + "anyhow", "cfg-if 1.0.0", - "cranelift-codegen", "cranelift-entity", - "cranelift-wasm", - "gimli 0.24.0", + "gimli", "indexmap", "log", "more-asserts", + "object", "serde", + "target-lexicon", "thiserror", "wasmparser", + "wasmtime-types", ] [[package]] name = "wasmtime-jit" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4539ea734422b7c868107e2187d7746d8affbcaa71916d72639f53757ad707" +checksum = "24f46dd757225f29a419be415ea6fb8558df9b0194f07e3a6a9c99d0e14dd534" dependencies = [ - "addr2line 0.15.2", + "addr2line", "anyhow", + "bincode", "cfg-if 1.0.0", - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli 0.24.0", + "gimli", + "libc", "log", "more-asserts", - "object 0.24.0", - "rayon", + "object", "region", "serde", "target-lexicon", "thiserror", "wasmparser", - "wasmtime-cranelift", - "wasmtime-debug", "wasmtime-environ", - "wasmtime-obj", - "wasmtime-profiling", "wasmtime-runtime", "winapi 0.3.9", ] -[[package]] -name = "wasmtime-obj" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1a8ff85246d091828e2225af521a6208ed28c997bb5c39eb697366dc2e2f2b" -dependencies = [ - "anyhow", - "more-asserts", - "object 0.24.0", - "target-lexicon", - "wasmtime-debug", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-profiling" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b" -dependencies = [ - "anyhow", - "cfg-if 1.0.0", - "lazy_static", - "libc", - "serde", - "target-lexicon", - "wasmtime-environ", - "wasmtime-runtime", -] - [[package]] name = "wasmtime-runtime" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51e57976e8a19a18a18e002c6eb12e5769554204238e47ff155fda1809ef0f7" +checksum = "0122215a44923f395487048cb0a1d60b5b32c73aab15cf9364b798dbaff0996f" dependencies = [ "anyhow", "backtrace", @@ -12427,7 +11808,7 @@ dependencies = [ "libc", "log", "mach", - "memoffset 0.6.4", + "memoffset", "more-asserts", "rand 0.8.4", "region", @@ -12436,6 +11817,18 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "wasmtime-types" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9b01caf8a204ef634ebac99700e77ba716d3ebbb68a1abbc2ceb6b16dbec9e4" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + [[package]] name = "web-sys" version = "0.3.55" @@ -12476,8 +11869,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "beefy-primitives", "bitvec 0.20.4", @@ -12489,11 +11882,12 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.3.3", + "hex-literal", "log", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", + "pallet-bags-list", "pallet-balances", "pallet-collective", "pallet-democracy", @@ -12525,15 +11919,17 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "rustc-hex", + "scale-info", "serde", "serde_derive", - "smallvec 1.7.0", + "smallvec", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -12549,7 +11945,6 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", - "static_assertions", "substrate-wasm-builder", "xcm", "xcm-builder", @@ -12643,9 +12038,9 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "x25519-dalek" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" +checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" dependencies = [ "curve25519-dalek 3.2.0", "rand_core 0.5.1", @@ -12654,27 +12049,29 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "xcm-procedural", ] [[package]] name = "xcm-builder" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", + "log", "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain", + "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", @@ -12698,6 +12095,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-timestamp", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-runtime", @@ -12708,14 +12106,14 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/shaunxw/xcm-simulator.git?branch=polkadot-v0.9.10#0c71745f7218ac562c45f44f7493981e35e3897d" +source = "git+https://github.com/shaunxw/xcm-simulator.git?branch=master#4d3bb9dd4fa2cd554a9970ffff816d9346269eaa" dependencies = [ "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.10)", + "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.11)", "frame-support", "frame-system", "parachain-info", @@ -12731,9 +12129,10 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.10" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ + "frame-benchmarking", "frame-support", "impl-trait-for-tuples", "log", @@ -12749,17 +12148,17 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech//polkadot?rev=aeea9b7bd81919e014f7621f6c4b2eb9709d918f#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +source = "git+https://github.com/paritytech//polkadot?rev=5feed981cf0fe671447eabaa9c0d235a8dd0003e#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", ] [[package]] name = "xcm-simulator" -version = "0.9.10" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.10#aeea9b7bd81919e014f7621f6c4b2eb9709d918f" +version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.12#5feed981cf0fe671447eabaa9c0d235a8dd0003e" dependencies = [ "frame-support", "parity-scale-codec", @@ -12789,9 +12188,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.3.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" dependencies = [ "zeroize_derive", ] @@ -12802,26 +12201,26 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.77", + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", "synstructure", ] [[package]] name = "zstd" -version = "0.6.1+zstd.1.4.9" +version = "0.9.0+zstd.1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" +checksum = "07749a5dc2cb6b36661290245e350f15ec3bbb304e493db54a1d354480522ccd" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "3.0.1+zstd.1.4.9" +version = "4.1.1+zstd.1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" +checksum = "c91c90f2c593b003603e5e0493c837088df4469da25aafff8bce42ba48caf079" dependencies = [ "libc", "zstd-sys", @@ -12829,9 +12228,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.20+zstd.1.4.9" +version = "1.6.1+zstd.1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" +checksum = "615120c7a2431d16cf1cf979e7fc31ba7a5b5e5707b29c8a99e5dbf8a8392a33" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index af4b61ca10..24d7b2e8ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,196 +14,193 @@ members = [ ] exclude = ["test-utils/xcm-test-support"] -[patch."https://github.com/smartcontractkit/chainlink-polkadot"] -pallet-chainlink-feed = { git = "https://github.com/chainSafe/chainlink-polkadot", branch = "polkadot-v0.9.10" } - [patch."https://github.com/paritytech/substrate"] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-election-provider-support = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-executive = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-support = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-support-procedural = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-system = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -frame-try-runtime = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -#max-encoded-len = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -#max-encoded-len-derive = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-aura = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-bounties = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-collective = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-democracy = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-grandpa = {git = 'https://github.com/paritytech//substrate', rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-identity = {git = 'https://github.com/paritytech//substrate', rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-im-online = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-indices = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-membership = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-mmr = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-mmr-primitives = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-mmr-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-multisig = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-nicks = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-offences = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-proxy = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-offences-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-randomness-collective-flip = {git = 'https://github.com/paritytech//substrate', rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-recovery = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-scheduler = {git = 'https://github.com/paritytech//substrate', rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-sudo = {git = 'https://github.com/paritytech//substrate', rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-session = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-society = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-tips = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-utility = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -remote-externalities = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-basic-authorship = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-block-builder = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-chain-spec = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-cli = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-aura = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-babe = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-manual-seal = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-executor = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-finality-grandpa = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -#sc-finality-grandpa-warp-sync = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-informant = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-keystore = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-network = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-network-gossip = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-offchain = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-rpc-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-service = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-telemetry = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-tracing = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-api = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-block-builder = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-consensus-aura = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-consensus-babe = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-consensus-vrf = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-core = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-finality-grandpa = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-io = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-offchain = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-rpc = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-serializer = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-session = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-staking = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-std = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-storage = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-trie = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-utils = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-version = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -try-runtime-cli = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} -substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", rev = "420db18eaa1a1f5ce9ba40dd6ccb69f7b3dd9bb7"} +frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-election-provider-support = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-executive = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-support = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-support-procedural = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-system = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +frame-try-runtime = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +#max-encoded-len = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +#max-encoded-len-derive = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-aura = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-bounties = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-collective = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-democracy = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-grandpa = {git = 'https://github.com/paritytech//substrate', rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-identity = {git = 'https://github.com/paritytech//substrate', rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-im-online = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-indices = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-membership = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-mmr = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-mmr-primitives = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-mmr-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-multisig = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-nicks = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-offences = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-proxy = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-offences-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-randomness-collective-flip = {git = 'https://github.com/paritytech//substrate', rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-recovery = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-scheduler = {git = 'https://github.com/paritytech//substrate', rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-sudo = {git = 'https://github.com/paritytech//substrate', rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-session = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-society = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-tips = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-utility = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +remote-externalities = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-basic-authorship = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-block-builder = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-chain-spec = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-cli = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-aura = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-babe = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-manual-seal = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-executor = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-finality-grandpa = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +#sc-finality-grandpa-warp-sync = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-informant = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-keystore = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-network = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-network-gossip = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-offchain = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-rpc-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-service = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-telemetry = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-tracing = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-api = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-block-builder = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-consensus-aura = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-consensus-babe = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-consensus-vrf = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-core = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-finality-grandpa = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-io = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-offchain = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-rpc = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-serializer = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-session = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-staking = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-std = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-storage = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-transaction-pool = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-trie = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-version = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +try-runtime-cli = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} +substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", rev = "d76f39995315ec36980908e4b99709bd14927044"} [patch."https://github.com/paritytech/polkadot"] -xcm = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-runtime = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -rococo-runtime = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -westend-runtime = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -kusama-runtime = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -# polkadot-test-service = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -# polkadot-test-runtime = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-overseer = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-service = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-cli = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } -polkadot-client = { git = "https://github.com/paritytech//polkadot", rev = "aeea9b7bd81919e014f7621f6c4b2eb9709d918f" } +xcm = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-runtime = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +rococo-runtime = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +westend-runtime = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +kusama-runtime = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +# polkadot-test-service = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +# polkadot-test-runtime = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-overseer = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-service = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-cli = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } +polkadot-client = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } [patch."https://github.com/paritytech/cumulus"] -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -pallet-collator-selection = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", rev = "870b214693856e768ba482fe2d3b9a83b24e4540" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +pallet-collator-selection = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -[patch."https://github.com/paritytech/grandpa-bridge-gadget"] -pallet-beefy = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -beefy-primitives = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -beefy-gadget = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -beefy-gadget-rpc = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } +#[patch."https://github.com/paritytech/grandpa-bridge-gadget"] +#pallet-beefy = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } +#beefy-primitives = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } +#beefy-gadget = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } +#beefy-gadget-rpc = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } [patch."https://github.com/open-web3-stack/open-runtime-module-library"] -orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844" } -orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844" } -orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844" } -orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844" } -orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844" } +orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } diff --git a/node/Cargo.toml b/node/Cargo.toml index 947ae66ca9..f4a89833c5 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -13,7 +13,7 @@ build = 'build.rs' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] default = [ ] @@ -32,11 +32,11 @@ log = '0.4.14' codec = { package = 'parity-scale-codec', version = '2.0.0' } structopt = '0.3.8' serde = { version = '1.0.119', features = ['derive'] } -hex-literal = '0.2.1' +hex-literal = '0.3.1' futures = { version = "0.3.1", features = ["compat"] } # RPC related Dependencies -jsonrpc-core = '15.1.0' +jsonrpc-core = "18.0.0" # Local Dependencies pint-runtime-dev = { path = '../runtime/dev' } @@ -49,67 +49,67 @@ pint-rpc = { path = '../rpc' } pallet-asset-index-rpc = { path = '../pallets/asset-index/rpc' } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = 'polkadot-v0.9.10'} +substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = 'polkadot-v0.9.12'} ## Substrate Client Dependencies -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-client-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } -sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } -sc-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-executor = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-network = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-service = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', features = ['wasmtime'] } -sc-telemetry = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sc-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sc-basic-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-chain-spec = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-client-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-executor = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-network = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-rpc-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-service = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ['wasmtime'] } +sc-telemetry = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sc-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } ## Substrate Primitive Dependencies -sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-blockchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-trie = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-storage = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-blockchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-trie = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-storage = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } # Cumulus dependencies -cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } +cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } # Polkadot dependencies -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10'} -polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10'} -polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10'} -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10'} +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} +polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} +polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} diff --git a/node/src/instant_finalize.rs b/node/src/instant_finalize.rs new file mode 100644 index 0000000000..0acad63699 --- /dev/null +++ b/node/src/instant_finalize.rs @@ -0,0 +1,40 @@ +// Copyright 2021 ChainSafe Systems +// SPDX-License-Identifier: LGPL-3.0-only + +use sc_consensus::BlockImport; +use sp_runtime::traits::Block as BlockT; + +pub struct InstantFinalizeBlockImport(I); + +impl InstantFinalizeBlockImport { + /// Create a new instance. + pub fn new(inner: I) -> Self { + Self(inner) + } +} + +#[async_trait::async_trait] +impl BlockImport for InstantFinalizeBlockImport +where + Block: BlockT, + I: BlockImport + Send, +{ + type Error = I::Error; + type Transaction = I::Transaction; + + async fn check_block( + &mut self, + block: sc_consensus::BlockCheckParams, + ) -> Result { + self.0.check_block(block).await + } + + async fn import_block( + &mut self, + mut block_import_params: sc_consensus::BlockImportParams, + cache: std::collections::HashMap>, + ) -> Result { + block_import_params.finalized = true; + self.0.import_block(block_import_params, cache).await + } +} diff --git a/node/src/lib.rs b/node/src/lib.rs index 663598ad04..b289173fdc 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -3,4 +3,5 @@ pub mod chain_spec; pub mod client; +mod instant_finalize; pub mod service; diff --git a/node/src/service.rs b/node/src/service.rs index 904d5634dc..e63f2557a1 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -15,12 +15,9 @@ use sc_chain_spec::ChainSpec; use sc_client_api::ExecutorProvider; use sc_consensus::LongestChain; use sc_consensus_aura::ImportQueueParams; -pub use sc_executor::NativeExecutor; -use sc_executor::{native_executor_instance, NativeExecutionDispatch}; +use sc_executor::NativeElseWasmExecutor; use sc_network::NetworkService; -use sc_service::{ - error::Error as ServiceError, Configuration, PartialComponents, Role, TFullBackend, TFullClient, TaskManager, -}; +use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, Role, TFullBackend, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sc_transaction_pool::BasicPool; use sp_api::ConstructRuntimeApi; @@ -29,9 +26,12 @@ use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPai use sp_keystore::SyncCryptoStorePtr; use sp_runtime::traits::BlakeTwo256; use sp_trie::PrefixedMemoryDB; -use std::sync::Arc; use substrate_prometheus_endpoint::Registry; +use std::sync::Arc; + +use crate::instant_finalize; + use crate::client::*; // Runtime type overrides @@ -40,28 +40,63 @@ type Header = sp_runtime::generic::Header; type Hash = sp_core::H256; -native_executor_instance!( - pub DevExecutor, - pint_runtime_dev::api::dispatch, - pint_runtime_dev::native_version, - frame_benchmarking::benchmarking::HostFunctions, -); - -#[cfg(feature = "kusama")] -native_executor_instance!( - pub KusamaExecutor, - pint_runtime_kusama::api::dispatch, - pint_runtime_kusama::native_version, - frame_benchmarking::benchmarking::HostFunctions, -); - -#[cfg(feature = "polkadot")] -native_executor_instance!( - pub PolkadotExecutor, - pint_runtime_polkadot::api::dispatch, - pint_runtime_polkadot::native_version, - frame_benchmarking::benchmarking::HostFunctions, -); +pub fn default_mock_parachain_inherent_data_provider() -> MockValidationDataInherentDataProvider { + MockValidationDataInherentDataProvider { current_para_block: 0, relay_offset: 1000, relay_blocks_per_para_block: 2 } +} + +pub struct DevExecutorDispatch; +impl sc_executor::NativeExecutionDispatch for DevExecutorDispatch { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + + fn dispatch(method: &str, data: &[u8]) -> Option> { + pint_runtime_dev::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + pint_runtime_dev::native_version() + } +} + +#[cfg(feature = "with-kusama-runtime")] +mod karura_executor { + pub use pint_runtime_kusama; + + pub struct KusamaExecutorDispatch; + impl sc_executor::NativeExecutionDispatch for KusamaExecutorDispatch { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + + fn dispatch(method: &str, data: &[u8]) -> Option> { + pint_runtime_kusama::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + pint_runtime_kusama::native_version() + } + } +} + +#[cfg(feature = "with-polkadot-runtime")] +mod polkadot_executor { + pub use pint_runtime_polkadot; + + pub struct PolkadotExecutorDispatch; + impl sc_executor::NativeExecutionDispatch for PolkadotExecutorDispatch { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + + fn dispatch(method: &str, data: &[u8]) -> Option> { + pint_runtime_polkadot::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + pint_runtime_polkadot::native_version() + } + } +} + +#[cfg(feature = "with-kusama-runtime")] +pub use kusama_executor::*; +#[cfg(feature = "with-polkadot-runtime")] +pub use polkadot_executor::*; pub trait IdentifyVariant { fn is_kusama(&self) -> bool; @@ -92,10 +127,6 @@ type FullClient = TFullClient /// Maybe PINT Dev full select chain. type MaybeFullSelectChain = Option>; -fn default_mock_parachain_inherent_data_provider() -> MockValidationDataInherentDataProvider { - MockValidationDataInherentDataProvider { current_para_block: 0, relay_offset: 1000, relay_blocks_per_para_block: 2 } -} - pub fn new_partial( config: &Configuration, dev: bool, @@ -115,7 +146,7 @@ where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection>, RuntimeApi::RuntimeApi: sp_consensus_aura::AuraApi, - Executor: NativeExecutionDispatch + 'static, + Executor: sc_executor::NativeExecutionDispatch + 'static, { let telemetry = config .telemetry_endpoints @@ -128,10 +159,18 @@ where }) .transpose()?; - let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( - &config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - )?; + let executor = NativeElseWasmExecutor::::new( + config.wasm_method, + config.default_heap_pages, + config.max_runtime_instances, + ); + + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::>( + config, + telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, + )?; let client = Arc::new(client); let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle()); @@ -143,7 +182,7 @@ where let registry = config.prometheus_registry(); - let transaction_pool = BasicPool::new_full( + let transaction_pool = sc_transaction_pool::BasicPool::new_full( config.transaction_pool.clone(), config.role.is_authority().into(), registry, @@ -237,18 +276,22 @@ async fn start_node_impl( build_consensus: BIC, ) -> sc_service::error::Result<(TaskManager, Arc>)> where - RB: Fn(Arc>) -> jsonrpc_core::IoHandler + Send + 'static, + RB: Fn( + Arc>, + ) -> Result, sc_service::Error> + + Send + + 'static, RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection>, RuntimeApi::RuntimeApi: sp_consensus_aura::AuraApi, - Executor: NativeExecutionDispatch + 'static, + Executor: sc_executor::NativeExecutionDispatch + 'static, BIC: FnOnce( - Arc>, + Arc>, Option<&Registry>, Option, &TaskManager, &polkadot_service::NewFull, - Arc>>, + Arc>>, Arc>, SyncCryptoStorePtr, bool, @@ -392,13 +435,13 @@ where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection>, RuntimeApi::RuntimeApi: sp_consensus_aura::AuraApi, - Executor: NativeExecutionDispatch + 'static, + Executor: sc_executor::NativeExecutionDispatch + 'static, { start_node_impl( parachain_config, polkadot_config, id, - |_| Default::default(), + |_| Ok(Default::default()), |client, prometheus_registry, telemetry, @@ -469,7 +512,7 @@ where pub const KUSAMA_RUNTIME_NOT_AVAILABLE: &str = "pint-kusama runtime is not available. Please compile the node with `--features kusama` to enable it."; #[allow(dead_code)] -pub const POLKADOT_RUNTIME_NOT_AVAILABLE: &str = +pub const pint_runtime_polkadot_NOT_AVAILABLE: &str = "pint-polkadot runtime is not available. Please compile the node with `--features polkadot` to enable it."; /// Builds a new object suitable for chain operations. @@ -482,14 +525,14 @@ pub fn new_chain_ops( sc_consensus::import_queue::BasicQueue>, TaskManager, ), - sc_service::Error, + ServiceError, > { config.keystore = sc_service::config::KeystoreConfig::InMemory; if config.chain_spec.is_kusama() { #[cfg(feature = "kusama")] { let PartialComponents { client, backend, import_queue, task_manager, .. } = - new_partial::(config, false, false)?; + new_partial::(config, false, false)?; Ok((Arc::new(Client::Kusama(client)), backend, import_queue, task_manager)) } @@ -499,12 +542,12 @@ pub fn new_chain_ops( #[cfg(feature = "polkadot")] { let PartialComponents { client, backend, import_queue, task_manager, .. } = - new_partial::(config, false, false)?; + new_partial::(config, false, false)?; Ok((Arc::new(Client::Polkadot(client)), backend, import_queue, task_manager)) } #[cfg(not(feature = "polkadot"))] - Err(POLKADOT_RUNTIME_NOT_AVAILABLE.into()) + Err(pint_runtime_polkadot_NOT_AVAILABLE.into()) } else { let PartialComponents { client, backend, import_queue, task_manager, .. } = new_partial(config, config.chain_spec.is_dev(), false)?; @@ -524,7 +567,7 @@ fn inner_pint_dev(config: Configuration, instant_sealing: bool) -> Result(&config, true, instant_sealing)?; + } = new_partial::(&config, true, instant_sealing)?; let (network, system_rpc_tx, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -592,36 +635,34 @@ fn inner_pint_dev(config: Configuration, instant_sealing: bool) -> Result( - sc_consensus_aura::StartAuraParams { - slot_duration: sc_consensus_aura::slot_duration(&*client)?, - client: client.clone(), - select_chain, - block_import: client.clone(), - proposer_factory, - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + let aura = sc_consensus_aura::start_aura::(StartAuraParams { + slot_duration: sc_consensus_aura::slot_duration(&*client)?, + client: client.clone(), + select_chain, + block_import: instant_finalize::InstantFinalizeBlockImport::new(client.clone()), + proposer_factory, + create_inherent_data_providers: move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( - *timestamp, - slot_duration, - ); + let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + *timestamp, + slot_duration, + ); - Ok((timestamp, slot, default_mock_parachain_inherent_data_provider())) - }, - force_authoring, - backoff_authoring_blocks, - keystore: keystore_container.sync_keystore(), - can_author_with, - sync_oracle: network.clone(), - justification_sync_link: network.clone(), - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry: telemetry.as_ref().map(|x| x.handle()), + Ok((timestamp, slot, default_mock_parachain_inherent_data_provider())) }, - )?; + force_authoring, + backoff_authoring_blocks, + keystore: keystore_container.sync_keystore(), + can_author_with, + sync_oracle: network.clone(), + justification_sync_link: network.clone(), + // We got around 500ms for proposing + block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), + // And a maximum of 750ms if slots are skipped + max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), + telemetry: telemetry.as_ref().map(|x| x.handle()), + })?; // the AURA authoring task is considered essential, i.e. if it // fails we take down the service with it. diff --git a/pallets/asset-index/Cargo.toml b/pallets/asset-index/Cargo.toml index cc2b2d7b42..2e8ac0d851 100644 --- a/pallets/asset-index/Cargo.toml +++ b/pallets/asset-index/Cargo.toml @@ -9,22 +9,23 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } serde = { version = "1.0.101", features = ["derive"], optional = true } +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } # Polkadot Dependencies -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # PINT dependencies -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } pallet-price-feed = { path = "../price-feed", default-features = false } primitives = { path = "../../primitives/primitives", default-features = false } @@ -34,11 +35,11 @@ orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-li [dev-dependencies] serde = { version = "1.0.101" } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-saft-registry = { path = "../saft-registry" } diff --git a/pallets/asset-index/rpc/Cargo.toml b/pallets/asset-index/rpc/Cargo.toml index 0da6687afe..b71ebfcb8f 100644 --- a/pallets/asset-index/rpc/Cargo.toml +++ b/pallets/asset-index/rpc/Cargo.toml @@ -10,13 +10,13 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.124", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2.2.0" } -jsonrpc-core = "15.0.0" -jsonrpc-core-client = "15.0.0" -jsonrpc-derive = "15.0.0" -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" } +codec = { package = "parity-scale-codec", version = "2.3.1" } +jsonrpc-core = "18.0.0" +jsonrpc-core-client = "18.0.0" +jsonrpc-derive = "18.0.0" +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } # PINT RPC pallet-asset-index-rpc-runtime-api = { path = "runtime-api" } diff --git a/pallets/asset-index/rpc/runtime-api/Cargo.toml b/pallets/asset-index/rpc/runtime-api/Cargo.toml index 3569398186..7a856e0580 100644 --- a/pallets/asset-index/rpc/runtime-api/Cargo.toml +++ b/pallets/asset-index/rpc/runtime-api/Cargo.toml @@ -10,10 +10,11 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.124", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } # PINT dependencies primitives = { path = "../../../../primitives/primitives", default-features = false } diff --git a/pallets/asset-index/src/lib.rs b/pallets/asset-index/src/lib.rs index dc844ebec3..883d597edd 100644 --- a/pallets/asset-index/src/lib.rs +++ b/pallets/asset-index/src/lib.rs @@ -278,7 +278,6 @@ pub mod pallet { } #[pallet::event] - #[pallet::metadata(T::AssetId = "AccountId", AccountIdFor < T > = "AccountId", T::Balance = "Balance")] #[pallet::generate_deposit(pub (super) fn deposit_event)] pub enum Event { /// A new asset was added to the index and some index token paid out diff --git a/pallets/asset-index/src/types.rs b/pallets/asset-index/src/types.rs index 98879afdf6..30fb23c241 100644 --- a/pallets/asset-index/src/types.rs +++ b/pallets/asset-index/src/types.rs @@ -12,7 +12,7 @@ use frame_support::{ /// Abstraction over the lock of minted index token that are locked up for /// `LockupPeriod` -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct IndexTokenLock { /// Locked amount of index token. pub locked: Balance, @@ -21,7 +21,7 @@ pub struct IndexTokenLock { } /// Metadata for an asset -#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetMetadata { pub name: BoundedString, pub symbol: BoundedString, @@ -29,7 +29,7 @@ pub struct AssetMetadata { } /// Represents a single asset being withdrawn -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetWithdrawal { /// The identifier of the asset pub asset: AssetId, @@ -41,7 +41,7 @@ pub struct AssetWithdrawal { pub withdrawn: bool, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] /// Describes an in progress withdrawal of a collection of assets from the index pub struct PendingRedemption { /// The block after which the redemption process is over. @@ -52,7 +52,7 @@ pub struct PendingRedemption { /// Represents the redemption of a given pint amount based on the /// `AssetDistribution`. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetRedemption { /// All the assets together with their redeemed amount pub asset_amounts: Vec<(AssetId, Balance)>, @@ -67,7 +67,7 @@ impl Default for AssetRedemption { } /// Limits the amount of deposits -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct DepositRange { /// Minimum amount of index tokens a deposit must be worth diff --git a/pallets/committee/Cargo.toml b/pallets/committee/Cargo.toml index 6e668dff50..1269667d50 100644 --- a/pallets/committee/Cargo.toml +++ b/pallets/committee/Cargo.toml @@ -10,15 +10,16 @@ version = '0.0.1' [dependencies] log = { version = "0.4.14", default-features = false } -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] default = ['std'] diff --git a/pallets/committee/src/lib.rs b/pallets/committee/src/lib.rs index 8484ba8034..9e01f74233 100644 --- a/pallets/committee/src/lib.rs +++ b/pallets/committee/src/lib.rs @@ -55,10 +55,19 @@ pub mod pallet { type Action: Parameter + Dispatchable::Origin, PostInfo = PostDispatchInfo> + From> - + GetDispatchInfo; + + GetDispatchInfo + + scale_info::TypeInfo; /// A unique number assigned to each new instance of a proposal - type ProposalNonce: Parameter + Member + One + Zero + Codec + Default + MaybeSerializeDeserialize + CheckedAdd; + type ProposalNonce: Parameter + + Member + + One + + Zero + + Codec + + Default + + MaybeSerializeDeserialize + + CheckedAdd + + scale_info::TypeInfo; /// Duration (in blocks) of the proposal submission period type ProposalSubmissionPeriod: Get; @@ -176,7 +185,6 @@ pub mod pallet { // end storage defs #[pallet::event] - #[pallet::metadata(T::ProposalNonce = "ProposalNonce",T::Hash = "Hash", AccountIdFor = "AccountId")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// A new proposal has been created diff --git a/pallets/committee/src/types.rs b/pallets/committee/src/types.rs index a5f2fa6e76..98f77e64df 100644 --- a/pallets/committee/src/types.rs +++ b/pallets/committee/src/types.rs @@ -10,18 +10,20 @@ use frame_support::{ }; use frame_system::RawOrigin; -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub enum ProposalStatus { Active, Executed, Timeout, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] /// This represents an instance of a proposal that can be voted on. /// It has been proposed and has an assigned nonce. /// This extra abstraction is required since it may be desirable construct /// multiple proposal instances out of a single proposal +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[codec(mel_bound(T: Config))] +#[scale_info(skip_type_params(T))] pub struct Proposal { pub action: T::Action, pub issuer: T::AccountId, @@ -39,18 +41,18 @@ impl Proposal { } } -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] /// Defines what sub-type a member belongs to. /// Council members are fixed in number and can vote on proposals /// Constituent members are unbounded in number but can only veto council /// proposals +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, scale_info::TypeInfo)] pub enum MemberType { Council, Constituent, } -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] /// Assignment of a member type to an accountId +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, scale_info::TypeInfo)] pub struct CommitteeMember { pub account_id: AccountId, pub member_type: MemberType, @@ -66,8 +68,8 @@ impl CommitteeMember { } } -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] /// A committee member together with their cast vote. +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, scale_info::TypeInfo)] pub struct MemberVote { pub member: CommitteeMember, pub vote: VoteKind, @@ -80,7 +82,7 @@ impl MemberVote { } /// Origin for the committee pallet. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, scale_info::TypeInfo)] pub enum CommitteeOrigin { /// Action is executed by the committee. Contains the closer account and the /// members that voted Aye @@ -89,9 +91,9 @@ pub enum CommitteeOrigin { CommitteeMember(AccountId), } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default)] /// Info for keeping track of a motion being voted on. /// Default is empty vectors for all votes +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default, scale_info::TypeInfo)] pub struct VoteAggregate { /// The current set of votes. pub votes: Vec>, @@ -172,7 +174,7 @@ impl VoteAggregate(_); #[pallet::event] - #[pallet::metadata(AccountIdFor = "AccountId", BalanceFor = "Balance")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Admin successfully transferred some funds from the treasury to diff --git a/pallets/price-feed/Cargo.toml b/pallets/price-feed/Cargo.toml index e1241db117..be126432be 100644 --- a/pallets/price-feed/Cargo.toml +++ b/pallets/price-feed/Cargo.toml @@ -10,25 +10,26 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } # PINT dependencies -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } primitives = { path = "../../primitives/primitives", default-features = false } [dev-dependencies] serde = { version = "1.0.101" } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = 'polkadot-v0.9.10' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = 'polkadot-v0.9.12' } [features] default = ['std'] diff --git a/pallets/price-feed/src/lib.rs b/pallets/price-feed/src/lib.rs index c5487c72b1..93f259dd9b 100644 --- a/pallets/price-feed/src/lib.rs +++ b/pallets/price-feed/src/lib.rs @@ -162,7 +162,6 @@ pub mod pallet { } #[pallet::event] - #[pallet::metadata(T::AssetId = "AssetId", FeedIdFor = "FeedId")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// A new assetId -> feedId mapping was inserted diff --git a/pallets/price-feed/src/types.rs b/pallets/price-feed/src/types.rs index c2c43f9ec9..43b7609107 100644 --- a/pallets/price-feed/src/types.rs +++ b/pallets/price-feed/src/types.rs @@ -4,7 +4,7 @@ use frame_support::pallet_prelude::*; /// Represents an answer of a feed at a certain point of time -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct TimestampedValue { /// The timestamped value pub value: Value, diff --git a/pallets/remote-asset-manager/Cargo.toml b/pallets/remote-asset-manager/Cargo.toml index 0f723be6f2..f21fa3514f 100644 --- a/pallets/remote-asset-manager/Cargo.toml +++ b/pallets/remote-asset-manager/Cargo.toml @@ -11,21 +11,22 @@ version = '0.0.1' [dependencies] log = { version = "0.4.14", default-features = false } serde = { version = "1.0.101", features = ["derive"], optional = true } -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # Polkadot Dependencies -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # Cumulus dependencies -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } # PINT dependencies xcm-calls = {path = "../../primitives/xcm-calls", default-features = false } @@ -38,41 +39,41 @@ orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-l [dev-dependencies] serde = { version = "1.0.101", features = ["derive"] } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } ## Substrate Pallet Dependencies -pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10'} -pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-collective = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12'} +pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-collective = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } # polkadot -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10' } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12' } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } # PINT pallet-asset-index = {path = "../asset-index" } diff --git a/pallets/remote-asset-manager/src/types.rs b/pallets/remote-asset-manager/src/types.rs index 2a1b0b234b..fe63d794df 100644 --- a/pallets/remote-asset-manager/src/types.rs +++ b/pallets/remote-asset-manager/src/types.rs @@ -6,7 +6,7 @@ use frame_support::{sp_runtime::traits::AtLeast32BitUnsigned, RuntimeDebug}; use xcm::v1::{AssetId, Fungibility, Junction, Junctions, MultiAsset, MultiLocation}; /// Represents all XCM calls of the `pallet_staking` pallet transacted on a parachain -#[derive(Default, Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Default, Encode, Decode, Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] pub struct XcmStakingMessageCount { /// Total number of all `pallet_staking::Pallet::bond_extra` calls transacted pub bond_extra: u32, @@ -17,7 +17,7 @@ pub struct XcmStakingMessageCount { } /// Represents the different balances of an asset -#[derive(Default, Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Default, Encode, Decode, Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetLedger { /// The real deposits contributed to the index pub deposited: Balance, @@ -38,7 +38,7 @@ where } /// Represents the config for the statemint parachain -#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct StatemintConfig { /// The id of the `statemint` parachain diff --git a/pallets/remote-treasury/Cargo.toml b/pallets/remote-treasury/Cargo.toml index fc4e6e7f84..091606c4a3 100644 --- a/pallets/remote-treasury/Cargo.toml +++ b/pallets/remote-treasury/Cargo.toml @@ -11,16 +11,17 @@ version = '0.0.1' [dependencies] log = { version = "0.4.14", default-features = false } serde = { version = "1.0.101", features = ["derive"], optional = true } -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } # Polkadot Dependencies -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # PINT dependencies primitives = { path = "../../primitives/primitives", default-features = false } @@ -32,11 +33,11 @@ orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-l [dev-dependencies] serde = { version = "1.0.101" } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } [features] default = ['std'] diff --git a/pallets/remote-treasury/src/lib.rs b/pallets/remote-treasury/src/lib.rs index d0f2b99932..b1f0518b39 100644 --- a/pallets/remote-treasury/src/lib.rs +++ b/pallets/remote-treasury/src/lib.rs @@ -78,7 +78,6 @@ pub mod pallet { } #[pallet::event] - #[pallet::metadata(T::AssetId = "AssetId", T::AccountId = "AccountId", T::Balance = "Balance")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Admin successfully transferred some funds from the treasury to diff --git a/pallets/saft-registry/Cargo.toml b/pallets/saft-registry/Cargo.toml index a6fd05434e..ac04bf088a 100644 --- a/pallets/saft-registry/Cargo.toml +++ b/pallets/saft-registry/Cargo.toml @@ -9,15 +9,16 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # Substrate Dependencies -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } # polkadot -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # PINT dependencies pallet-asset-index = {path = "../asset-index", default-features = false } @@ -27,11 +28,11 @@ primitives = { path = "../../primitives/primitives", default-features = false } serde = { version = "1.0.101" } # substrate -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-asset-index= { path = "../asset-index" } pallet-remote-asset-manager = { path = "../remote-asset-manager" } diff --git a/pallets/saft-registry/src/lib.rs b/pallets/saft-registry/src/lib.rs index 1055cab526..17597eef94 100644 --- a/pallets/saft-registry/src/lib.rs +++ b/pallets/saft-registry/src/lib.rs @@ -64,7 +64,7 @@ pub mod pallet { } /// Represents a single off-chain SAFT Record of a non liquid asset - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct SAFTRecord { /// Net asset value of the SAFT, or the total value of `units` nav: NAV, @@ -114,7 +114,6 @@ pub mod pallet { pub type SAFTNetAssetValue = StorageMap<_, Blake2_128Concat, T::AssetId, T::Balance, ValueQuery>; #[pallet::event] - #[pallet::metadata(T::AssetId = "AssetId", T::Balance = "Balance")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// A new SAFT was added diff --git a/primitives/primitives/Cargo.toml b/primitives/primitives/Cargo.toml index 277fbdfb28..b37088e70b 100644 --- a/primitives/primitives/Cargo.toml +++ b/primitives/primitives/Cargo.toml @@ -10,12 +10,13 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.101", features = ["derive"], optional = true } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive'] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # Polkadot Dependencies -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } [features] default = ['std'] diff --git a/primitives/primitives/src/fee.rs b/primitives/primitives/src/fee.rs index 657f47fa53..56bfa2edcc 100644 --- a/primitives/primitives/src/fee.rs +++ b/primitives/primitives/src/fee.rs @@ -7,7 +7,7 @@ use codec::{Decode, Encode}; use frame_support::sp_runtime::traits::AtLeast32Bit; /// Represents the fee rate where fee_rate = numerator / denominator -#[derive(Debug, Encode, Decode, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Encode, Decode, Copy, Clone, PartialEq, Eq, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct FeeRate { pub numerator: u32, @@ -43,7 +43,7 @@ impl BaseFee for u128 { } /// Determines the fee upon index token redemptions from range -#[derive(Clone, Decode, Debug, Default, Encode, PartialEq, Eq)] +#[derive(Clone, Decode, Debug, Default, Encode, PartialEq, Eq, scale_info::TypeInfo)] pub struct RedemptionFeeRange { pub range: [(BlockNumber, FeeRate); 2], pub default_fee: FeeRate, diff --git a/primitives/primitives/src/types.rs b/primitives/primitives/src/types.rs index edbd9ce98e..eb4ca45b79 100644 --- a/primitives/primitives/src/types.rs +++ b/primitives/primitives/src/types.rs @@ -79,7 +79,7 @@ pub type Ratio = FixedU128; /// SAFT implies the asset is a Simple Agreement for Future Tokens and the /// promised tokens are not able to be transferred or traded until some time /// in the future. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub enum AssetAvailability { Liquid(MultiLocation), Saft, @@ -103,7 +103,7 @@ impl From for AssetAvailability { } } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetProportions { /// The per token value used to calculate proportions pub nav: Price, @@ -112,7 +112,7 @@ pub struct AssetProportions { } /// Represents an asset and its proportion in the value of the index -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetProportion { /// The identifier for the asset pub asset: AssetId, @@ -132,7 +132,7 @@ impl AssetProportion { } /// Defines an asset pair identifier -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct AssetPricePair { /// The base asset id of this pair. pub base: AssetId, diff --git a/primitives/xcm-calls/Cargo.toml b/primitives/xcm-calls/Cargo.toml index bffae454e3..3ae4acccf4 100644 --- a/primitives/xcm-calls/Cargo.toml +++ b/primitives/xcm-calls/Cargo.toml @@ -10,28 +10,29 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.101", features = ["derive"], optional = true } -codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive'] } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive'] } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } ## Substrate Pallet Dependencies -pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10'} -pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12'} +pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } # Polkadot Dependencies -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10' } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12' } [features] default = ['std'] diff --git a/primitives/xcm-calls/src/assets.rs b/primitives/xcm-calls/src/assets.rs index 258022835f..b642f6463b 100644 --- a/primitives/xcm-calls/src/assets.rs +++ b/primitives/xcm-calls/src/assets.rs @@ -75,7 +75,7 @@ where /// Represents dispatchable calls of the FRAME `pallet_assets` pallet. /// /// *NOTE*: `Balance` and `AssetId` are expected to encode with `HasCompact` -#[derive(Clone, PartialEq, RuntimeDebug)] +#[derive(Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] pub enum AssetsCall { /// The [`mint`](https://crates.parity.io/pallet_assets/pallet/enum.Call.html#variant.mint) extrinsic. /// @@ -165,7 +165,7 @@ impl PalletCall for AssetsCall { /// The identifier for the asset. pub id: AssetId, @@ -189,7 +189,7 @@ impl AssetParams { } /// The `pallet_assets` configuration for a particular chain -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct AssetsConfig { /// The index of `pallet_index` within the parachain's runtime @@ -199,7 +199,7 @@ pub struct AssetsConfig { } /// Represents an excerpt from the `pallet_asset` weights -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct AssetsWeights { /// Weight for `mint` extrinsic diff --git a/primitives/xcm-calls/src/proxy.rs b/primitives/xcm-calls/src/proxy.rs index 85e969035c..197f2ceafa 100644 --- a/primitives/xcm-calls/src/proxy.rs +++ b/primitives/xcm-calls/src/proxy.rs @@ -17,7 +17,9 @@ pub const POLKADOT_PALLET_PROXY_INDEX: u8 = 29u8; pub const POLKADOT_PALLET_PROXY_TYPE_STAKING_INDEX: u8 = 3u8; /// Denotes an enum based (identified by an `u8`) proxy type -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)] +#[derive( + Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, scale_info::TypeInfo, +)] pub struct ProxyType(pub u8); impl From for ProxyType { @@ -69,7 +71,7 @@ where /// /// This is a generic version of the `pallet_proxy::Call` enum generated by the substrate pallet /// macros -#[derive(Clone, PartialEq, RuntimeDebug)] +#[derive(Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] pub enum ProxyCall { /// The [`add_proxy`](https://crates.parity.io/pallet_proxy/pallet/enum.Call.html#variant.add_proxy) extrinsic. /// @@ -82,7 +84,7 @@ pub enum ProxyCall { RemoveProxy(ProxyParams), } -#[derive(Clone, PartialEq, RuntimeDebug)] +#[derive(Clone, PartialEq, RuntimeDebug, scale_info::TypeInfo)] pub struct ProxyParams { /// The account that the `caller` would like to make a proxy. pub delegate: AccountId, @@ -104,7 +106,7 @@ impl PalletCall for ProxyCall, @@ -125,7 +127,7 @@ impl ProxyState { } /// The `pallet_proxy` configuration for a particular chain -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct ProxyConfig { /// The index of `pallet_index` within the parachain's runtime @@ -135,7 +137,7 @@ pub struct ProxyConfig { } /// Represents an excerpt from the `pallet_proxy` weights -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct ProxyWeights { /// Weight for `add_proxy` extrinsic diff --git a/primitives/xcm-calls/src/staking.rs b/primitives/xcm-calls/src/staking.rs index a00143d52a..e0310b3de7 100644 --- a/primitives/xcm-calls/src/staking.rs +++ b/primitives/xcm-calls/src/staking.rs @@ -157,7 +157,7 @@ impl PalletCall for StakingCall { /// The lookup type of the controller, pub controller: Source, @@ -168,7 +168,7 @@ pub struct Bond { } /// A destination account for payment. mirrored from `pallet_staking` -#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum RewardDestination { /// Pay into the stash account, increasing the amount at stake accordingly. @@ -184,7 +184,7 @@ pub enum RewardDestination { } /// The `pallet_staking` configuration for a particular chain -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct StakingConfig { /// The index of `pallet_index` within the parachain's runtime @@ -213,7 +213,7 @@ pub struct StakingConfig { pub type EraIndex = u32; /// Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct UnlockChunk { /// Amount of funds to be unlocked. pub value: Balance, @@ -224,7 +224,7 @@ pub struct UnlockChunk { } /// Represents the state of staking of the PINT's sovereign account on another chain -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub struct StakingLedger { /// The controller account pub controller: Source, @@ -277,7 +277,7 @@ where } /// Represents an excerpt from the `pallet_staking` weights -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct StakingWeights { /// Weight for `bond` extrinsic @@ -292,7 +292,7 @@ pub struct StakingWeights { /// Represents all staking related durations required to determine the correct chain-specific /// bonding duration. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct StakingDurations { /// This determines the average expected block time that the chain is targeting. diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 977502ce19..37c491a8cf 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -8,19 +8,19 @@ repository = 'https://github.com/ChainSafe/PINT/' version = '0.0.1' [dependencies] -jsonrpc-core = "15.0.0" -codec = { package = "parity-scale-codec", version = "2.2.0" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -#sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +jsonrpc-core = "18.0.0" +codec = { package = "parity-scale-codec", version = "2.3.1" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +#sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } # PINT dependencies pallet-asset-index-rpc= { path = "../pallets/asset-index/rpc" } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 2f3892bc8b..ce330dae26 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -8,20 +8,20 @@ repository = 'https://github.com/substrate-developer-hub/substrate-parachain-tem version = '0.0.1' [dependencies] -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # xcm -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } xcm-calls = { path = "../../primitives/xcm-calls", default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } # orml orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } # chainlink -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } # pint primitives = { path = '../../primitives/primitives', default-features = false } diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index 6928b36ca9..2e89992e2f 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -124,6 +124,7 @@ parameter_types! { // Maximum allowed string length for feed names pub const StringLimit: u32 = 15; pub const TransactionByteFee: Balance = 1 ; + pub const OperationalFeeMultiplier: u8 = 5; pub const TreasuryPalletId: PalletId = PalletId(*b"Treasury"); pub const LockupPeriod: BlockNumber = DAYS; pub const MaxCandidates: u32 = 200; @@ -145,6 +146,7 @@ parameter_types! { pub const UnitPerSecond: (xcm::v1::AssetId, u128) = (xcm::v1::AssetId::Concrete(MultiLocation::here()), UNIT); // One XCM operation is 200_000_000 weight, cross-chain transfer ~= 2x of transfer. pub const UnitWeightCost: Weight = 200_000_000; + pub const MaxInstructions: u32 = 100; pub const WithdrawalPeriod: BlockNumber = 10; } diff --git a/runtime/dev/Cargo.toml b/runtime/dev/Cargo.toml index 8778550ccc..e7e9ed0ea7 100644 --- a/runtime/dev/Cargo.toml +++ b/runtime/dev/Cargo.toml @@ -11,68 +11,70 @@ version = '2.0.0' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [dependencies] -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive', 'max-encoded-len']} +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + log = { version = '0.4.14', default-features = false } serde = { version = '1.0.119', optional = true, features = ['derive'] } hex-literal = { version = '0.3.1', optional = true } # Substrate Dependencies ## Substrate Primitive Dependencies -sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate FRAME Dependencies -frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate Pallet Dependencies -pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.10' } -pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false} -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, features = ['historical'] } -pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.12' } +pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false} +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, features = ['historical'] } +pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # Cumulus Dependencies -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10", default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12", default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } # Polkadot Dependencies -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # ORML Dependencies orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } @@ -95,7 +97,7 @@ primitives = { path = '../../primitives/primitives', default-features = false } xcm-calls = { path = '../../primitives/xcm-calls', default-features = false } pallet-asset-index-rpc-runtime-api = { path = '../../pallets/asset-index/rpc/runtime-api', default-features = false } -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } [dev-dependencies] hex-literal = '0.3.1' @@ -103,6 +105,7 @@ hex = '0.4.3' [features] default = ['std'] +no_std = [] runtime-benchmarks = [ 'hex-literal', 'sp-runtime/runtime-benchmarks', diff --git a/runtime/dev/src/lib.rs b/runtime/dev/src/lib.rs index 69d5f00441..8a26cd8557 100644 --- a/runtime/dev/src/lib.rs +++ b/runtime/dev/src/lib.rs @@ -54,7 +54,7 @@ use xcm_builder::{ }; use xcm_executor::XcmExecutor; -use frame_support::traits::Everything; +use frame_support::traits::{Everything, Nothing}; use pallet_committee::EnsureMember; pub use pint_runtime_common::{constants::*, types::*, weights}; @@ -208,6 +208,7 @@ impl pallet_balances::Config for Runtime { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; + type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); } @@ -259,20 +260,19 @@ pub type LocalAssetTransactor = MultiCurrencyAdapter< AssetIdConvert, >; -/// This is the type we use to convert an (incoming) XCM origin into a local -/// `Origin` instance, ready for dispatching a transaction with Xcm's -/// `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognised. + // recognized. RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognised. + // recognized. SiblingParachainAsNative, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. @@ -315,24 +315,26 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; - type OriginConverter = XcmOriginToTransactDispatchOrigin; + type OriginConverter = XcmOriginToCallOrigin; type IsReserve = MultiNativeAsset; type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); // Don't handle responses for now. - type SubscriptionService = (); // Don't handle subscription for now. + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; } pub type LocalOriginToLocation = SignedToAccountId32; -/// The means for routing XCM messages which are not for local execution into -/// the right message queues. +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -344,10 +346,14 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = (); + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { @@ -359,7 +365,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -368,9 +374,14 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { type ExecuteOverweightOrigin = frame_system::EnsureRoot; } +parameter_types! { + pub const MaxAuthorities: u32 = 32; +} + impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; } impl pallet_authorship::Config for Runtime { @@ -391,7 +402,6 @@ impl pallet_session::Config for Runtime { // Essentially just Aura, but lets be pedantic. type SessionHandler = ::KeyTypeIdProviders; type Keys = opaque::SessionKeys; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type WeightInfo = (); } @@ -564,7 +574,7 @@ impl orml_xtokens::Config for Runtime { type AccountIdToMultiLocation = AccountId32Convert; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; } @@ -726,7 +736,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 100, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 101, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 102, + PolkadotXcm: pallet_xcm::{Pallet, Storage, Call, Event, Origin, Config} = 102, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 103 } ); @@ -753,6 +763,8 @@ pub type SignedExtra = ( ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +/// The payload being signed in transactions. +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various pallets. @@ -776,7 +788,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -835,7 +847,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities() + Aura::authorities().into_inner() } } @@ -878,6 +890,21 @@ impl_runtime_apis! { } } + // #[cfg(feature = "try-runtime")] + // impl frame_try_runtime::TryRuntime for Runtime { + // fn on_runtime_upgrade() -> (Weight, Weight) { + // // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // // have a backtrace here. If any of the pre/post migration checks fail, we shall stop + // // right here and right now. + // let weight = Executive::try_runtime_upgrade().unwrap(); + // (weight, RuntimeBlockWeights::get().max_block) + // } + // + // fn execute_block_no_check(block: Block) -> Weight { + // Executive::execute_block_no_check(block) + // } + // } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 31d137a9c6..f222732c19 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -5,43 +5,44 @@ version = "0.1.0" edition = "2018" [dependencies] -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive', 'max-encoded-len']} +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # substrate -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } -sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } # polkadot -kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" } +kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.12" } # cumulus -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10' } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12' } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12" } # orml orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library' } @@ -63,7 +64,7 @@ primitives = { path = "../../primitives/primitives" } xcm-calls = { path = "../../primitives/xcm-calls" } # others -xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator.git", branch = "polkadot-v0.9.10" } +xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator.git", branch = "master" } [features] runtime-benchmarks = [] \ No newline at end of file diff --git a/runtime/integration-tests/src/pint.rs b/runtime/integration-tests/src/pint.rs index 45338d89f4..e282efc38f 100644 --- a/runtime/integration-tests/src/pint.rs +++ b/runtime/integration-tests/src/pint.rs @@ -13,7 +13,7 @@ use frame_support::{ ord_parameter_types, parameter_types, sp_runtime::traits::{AccountIdConversion, Zero}, sp_std::marker::PhantomData, - traits::{Everything, Get, LockIdentifier}, + traits::{Everything, Get, LockIdentifier, Nothing}, weights::{constants::WEIGHT_PER_SECOND, Weight}, PalletId, }; @@ -180,6 +180,7 @@ pub type XcmOriginToCallOrigin = ( parameter_types! { pub const UnitWeightCost: Weight = 1; + pub const MaxInstructions: u32 = 100; pub KsmPerSecond: (xcm::v1::AssetId, u128) = (xcm::v1::AssetId::Concrete(KsmLocation::get()), 1); } @@ -210,17 +211,19 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); - type SubscriptionService = (); + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; } impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -276,7 +279,7 @@ impl orml_xtokens::Config for Runtime { type AccountIdToMultiLocation = AccountId32Convert; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; } @@ -435,10 +438,14 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -468,6 +475,6 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event}, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin}, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, + PolkadotXcm: pallet_xcm::{Pallet, Storage, Call, Event, Origin, Config}, } ); diff --git a/runtime/integration-tests/src/relay.rs b/runtime/integration-tests/src/relay.rs index a7e13937ac..bc793dc5f0 100644 --- a/runtime/integration-tests/src/relay.rs +++ b/runtime/integration-tests/src/relay.rs @@ -14,7 +14,7 @@ use frame_support::{ traits::BlakeTwo256, AccountId32, BoundToRuntimeAppPublic, Perbill, }, - traits::{Currency, Everything, FindAuthor, Imbalance, InstanceFilter, OnUnbalanced, OneSessionHandler}, + traits::{Currency, Everything, FindAuthor, Imbalance, InstanceFilter, Nothing, OnUnbalanced, OneSessionHandler}, weights::Weight, }; use pallet_staking as staking; @@ -66,6 +66,7 @@ parameter_types! { pub const AnyNetwork: NetworkId = NetworkId::Any; pub Ancestry: MultiLocation = MultiLocation::default(); pub UnitWeightCost: Weight = 1_000; + pub const MaxInstructions: u32 = 100; } pub type SovereignAccountOf = @@ -101,8 +102,10 @@ impl Config for XcmConfig { type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); - type SubscriptionService = (); + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; } pub type LocalOriginToLocation = SignedToAccountId32; @@ -115,10 +118,14 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } parameter_types! { @@ -233,7 +240,6 @@ impl pallet_session::Config for Runtime { type Event = Event; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type NextSessionRotation = pallet_session::PeriodicSessions; type WeightInfo = (); } @@ -405,7 +411,7 @@ construct_runtime!( Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, ParasUmp: ump::{Pallet, Call, Storage, Event}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event}, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event}, // use polkadot index 7 Staking: staking::{Pallet, Call, Storage, Event} = 7, diff --git a/runtime/integration-tests/src/statemint.rs b/runtime/integration-tests/src/statemint.rs index 3c7371487b..10989d1683 100644 --- a/runtime/integration-tests/src/statemint.rs +++ b/runtime/integration-tests/src/statemint.rs @@ -4,7 +4,7 @@ use super::types::*; use frame_support::{ construct_runtime, parameter_types, - traits::Everything, + traits::{Everything, Nothing}, weights::{constants::WEIGHT_PER_SECOND, Weight}, }; use frame_system::EnsureRoot; @@ -112,6 +112,7 @@ pub type XcmOriginToCallOrigin = ( parameter_types! { pub const UnitWeightCost: Weight = 1; + pub const MaxInstructions: u32 = 100; pub KsmPerSecond: (xcm::v1::AssetId, u128) = (xcm::v1::AssetId::Concrete(KsmLocation::get()), 1); } @@ -131,17 +132,19 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); - type SubscriptionService = (); + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; } impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -164,10 +167,14 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = (); + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } parameter_types! { @@ -212,7 +219,7 @@ construct_runtime!( DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin}, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, + PolkadotXcm: pallet_xcm::{Pallet, Storage, Call, Event, Origin, Config}, Assets: pallet_assets::{Pallet, Call, Storage, Event} = 50, } ); diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 61168a6561..17f68ccbf9 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -11,68 +11,69 @@ version = '2.0.0' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [dependencies] -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive', 'max-encoded-len']} +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = '0.4.14', default-features = false } serde = { version = '1.0.119', optional = true, features = ['derive'] } hex-literal = { version = '0.3.1', optional = true } # Substrate Dependencies ## Substrate Primitive Dependencies -sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate FRAME Dependencies -frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate Pallet Dependencies -pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.10' } -pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false} -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, features = ['historical'] } -pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.12' } +pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false} +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, features = ['historical'] } +pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # Cumulus Dependencies -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10", default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12", default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } # Polkadot Dependencies -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # ORML Dependencies orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } @@ -95,7 +96,7 @@ primitives = { path = '../../primitives/primitives', default-features = false } xcm-calls = {path = '../../primitives/xcm-calls', default-features = false } pallet-asset-index-rpc-runtime-api = { path = '../../pallets/asset-index/rpc/runtime-api', default-features = false } -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } [dev-dependencies] hex-literal = '0.3.1' diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index def99755fb..48c21df42a 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -24,7 +24,7 @@ pub use frame_support::{ }; // orml imports -use frame_support::traits::Everything; +use frame_support::traits::{Everything, Nothing}; use orml_currencies::BasicCurrencyAdapter; use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; pub use pallet_balances::Call as BalancesCall; @@ -199,6 +199,7 @@ impl pallet_balances::Config for Runtime { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; + type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); } @@ -250,20 +251,19 @@ pub type LocalAssetTransactor = MultiCurrencyAdapter< AssetIdConvert, >; -/// This is the type we use to convert an (incoming) XCM origin into a local -/// `Origin` instance, ready for dispatching a transaction with Xcm's -/// `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognised. + // recognized. RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognised. + // recognized. SiblingParachainAsNative, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. @@ -306,24 +306,27 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; - type OriginConverter = XcmOriginToTransactDispatchOrigin; + type OriginConverter = XcmOriginToCallOrigin; type IsReserve = MultiNativeAsset; + // Teleporting is disabled. type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); // Don't handle responses for now. + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; } pub type LocalOriginToLocation = SignedToAccountId32; -/// The means for routing XCM messages which are not for local execution into -/// the right message queues. +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -333,12 +336,16 @@ impl pallet_xcm::Config for Runtime { type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Everything; + type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = (); + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { @@ -350,7 +357,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -359,9 +366,14 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { type ExecuteOverweightOrigin = frame_system::EnsureRoot; } +parameter_types! { + pub const MaxAuthorities: u32 = 32; +} + impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; } impl pallet_authorship::Config for Runtime { @@ -382,7 +394,6 @@ impl pallet_session::Config for Runtime { // Essentially just Aura, but lets be pedantic. type SessionHandler = ::KeyTypeIdProviders; type Keys = opaque::SessionKeys; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type WeightInfo = (); } @@ -528,7 +539,7 @@ impl orml_xtokens::Config for Runtime { type AccountIdToMultiLocation = AccountId32Convert; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; } @@ -690,7 +701,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 100, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 101, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 102, + PolkadotXcm: pallet_xcm::{Pallet, Storage, Call, Event, Origin, Config} = 102, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 103 } ); @@ -740,7 +751,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -799,7 +810,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities() + Aura::authorities().into_inner() } } diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 6e7b7d4133..065a6b0c43 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -11,68 +11,69 @@ version = '2.0.0' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10' } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [dependencies] -codec = { package = 'parity-scale-codec', version = '2.2.0', default-features = false, features = ['derive', 'max-encoded-len']} +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive', 'max-encoded-len']} +scale-info = { version = "1.0", default-features = false, features = ["derive"] } log = { version = '0.4.14', default-features = false } serde = { version = '1.0.119', optional = true, features = ['derive'] } hex-literal = { version = '0.3.1', optional = true } # Substrate Dependencies ## Substrate Primitive Dependencies -sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate FRAME Dependencies -frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } ## Substrate Pallet Dependencies -pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.10' } -pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false} -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false } -pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false, features = ['historical'] } -pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.12' } +pallet-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false} +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +pallet-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, features = ['historical'] } +pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } # Cumulus Dependencies -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10", default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.10', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12", default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } # Polkadot Dependencies -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.10', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } # ORML Dependencies orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } @@ -95,7 +96,7 @@ primitives = { path = '../../primitives/primitives', default-features = false } xcm-calls = {path = '../../primitives/xcm-calls', default-features = false } pallet-asset-index-rpc-runtime-api = { path = '../../pallets/asset-index/rpc/runtime-api', default-features = false } -pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.9', default-features = false } +pallet-chainlink-feed = { git = 'https://github.com/smartcontractkit/chainlink-polkadot', branch = 'polkadot-v0.9.12', default-features = false } [dev-dependencies] hex-literal = '0.3.1' diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ba5f886c57..26d06ca9be 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -54,7 +54,7 @@ use xcm_builder::{ }; use xcm_executor::XcmExecutor; -use frame_support::traits::Everything; +use frame_support::traits::{Everything, Nothing}; use pallet_committee::EnsureMember; pub use pint_runtime_common::{constants::*, types::*, weights}; use primitives::traits::MultiAssetRegistry; @@ -202,6 +202,7 @@ impl pallet_balances::Config for Runtime { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; + type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); } @@ -253,20 +254,19 @@ pub type LocalAssetTransactor = MultiCurrencyAdapter< AssetIdConvert, >; -/// This is the type we use to convert an (incoming) XCM origin into a local -/// `Origin` instance, ready for dispatching a transaction with Xcm's -/// `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToCallOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognised. + // recognized. RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognised. + // recognized. SiblingParachainAsNative, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. @@ -307,24 +307,27 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; - type OriginConverter = XcmOriginToTransactDispatchOrigin; + type OriginConverter = XcmOriginToCallOrigin; type IsReserve = MultiNativeAsset; + // Teleporting is disabled. type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; - type ResponseHandler = (); // Don't handle responses for now. - type SubscriptionService = (); // Don't handle subscription for now. + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; } pub type LocalOriginToLocation = SignedToAccountId32; -/// The means for routing XCM messages which are not for local execution into -/// the right message queues. +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -336,10 +339,14 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = (); + type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; + type Origin = Origin; + type Call = Call; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { @@ -351,7 +358,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = (); + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -360,9 +367,14 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { type ExecuteOverweightOrigin = frame_system::EnsureRoot; } +parameter_types! { + pub const MaxAuthorities: u32 = 32; +} + impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; } impl pallet_authorship::Config for Runtime { @@ -383,7 +395,6 @@ impl pallet_session::Config for Runtime { // Essentially just Aura, but lets be pedantic. type SessionHandler = ::KeyTypeIdProviders; type Keys = opaque::SessionKeys; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type WeightInfo = (); } @@ -531,7 +542,7 @@ impl orml_xtokens::Config for Runtime { type AccountIdToMultiLocation = AccountId32Convert; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; } @@ -693,7 +704,7 @@ construct_runtime!( // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 100, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 101, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 102, + PolkadotXcm: pallet_xcm::{Pallet, Storage, Call, Event, Origin, Config} = 102, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 103 } ); @@ -743,7 +754,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -802,7 +813,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities() + Aura::authorities().into_inner() } } From bebaf3df12a59ddb7ada8bca2aaa3b21da4c3288 Mon Sep 17 00:00:00 2001 From: clearloop Date: Mon, 1 Nov 2021 19:44:19 +0800 Subject: [PATCH 11/29] chore(remote-asset-manager): use xcm v2 --- pallets/remote-asset-manager/src/lib.rs | 35 ++++++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/pallets/remote-asset-manager/src/lib.rs b/pallets/remote-asset-manager/src/lib.rs index 5a96022fdd..01ec2aea68 100644 --- a/pallets/remote-asset-manager/src/lib.rs +++ b/pallets/remote-asset-manager/src/lib.rs @@ -27,7 +27,9 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use orml_traits::{MultiCurrency, XcmTransfer}; - use xcm::v1::{Error as XcmError, ExecuteXcm, MultiLocation, OriginKind, Result as XcmResult, SendXcm, Xcm}; + use xcm::latest::{ + Error as XcmError, ExecuteXcm, Instruction, MultiLocation, OriginKind, Result as XcmResult, SendXcm, Xcm, + }; use primitives::traits::{MaybeAssetIdConvert, RemoteAssetManager}; use xcm_calls::{ @@ -419,8 +421,8 @@ pub mod pallet { } else if !balances.pending_redemption.is_zero() { // check if we need and able to unbond funds: only with we currently have enough active funds // and room for 1 more unlocking chunk - if balances.pending_redemption < ledger.active.saturating_sub(config.minimum_balance) && - ledger.unlocking.len() < pallet_staking::MAX_UNLOCKING_CHUNKS + if balances.pending_redemption < ledger.active.saturating_sub(config.minimum_balance) + && ledger.unlocking.len() < pallet_staking::MAX_UNLOCKING_CHUNKS { // attempt to send unbond match Self::do_transact_unbond(&config, asset, balances.pending_redemption, dest) { @@ -489,11 +491,13 @@ pub mod pallet { let call = PalletStakingCall::::Bond(Bond { controller: controller.clone(), value, payee }); let encoder = call.encoder::(&asset); - let xcm = Xcm::Transact { + let transact = Instruction::Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most: config.weights.bond, call: encoder.encode_runtime_call(config.pallet_index).encode().into(), }; + let mut xcm = Xcm::new(); + xcm.0.push(transact); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::bond xcm: {:?} ",result); @@ -542,11 +546,13 @@ pub mod pallet { }); let encoder = call.encoder::(&asset); - let xcm = Xcm::Transact { + let transact = Instruction::Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most: config.weights.add_proxy, call: encoder.encode_runtime_call(config.pallet_index).encode().into(), }; + let mut xcm = Xcm::new(); + xcm.0.push(transact); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_proxy::add_proxy xcm: {:?} ",result); @@ -776,14 +782,18 @@ pub mod pallet { let call = PalletStakingCall::::BondExtra(amount); let encoder = call.encoder::(&asset); - let xcm = Xcm::Transact { + let transact = Instruction::Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most: config.weights.bond_extra, call: encoder.encode_runtime_call(config.pallet_index).encode().into(), }; + let mut xcm = Xcm::new(); + xcm.0.push(transact); + let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::bond_extra xcm: {:?} ",result); - result + + result.map_err(|e| e.into()) } /// Sends an XCM [`unbond`](https://crates.parity.io/pallet_staking/enum.Call.html#variant.unbond) call @@ -835,14 +845,17 @@ pub mod pallet { let call = PalletStakingCall::::Unbond(amount); let encoder = call.encoder::(&asset); - let xcm = Xcm::Transact { + let transact = Instruction::Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most: config.weights.unbond, call: encoder.encode_runtime_call(config.pallet_index).encode().into(), }; + let mut xcm = Xcm::new(); + xcm.0.push(transact); + let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::unbond xcm: {:?} ",result); - result + result.map_err(|e| e.into()) } /// Sends an XCM [`withdraw_unbonded`](https://crates.parity.io/pallet_staking/enum.Call.html#variant.withdraw_unbonded) call @@ -871,11 +884,13 @@ pub mod pallet { let call = PalletStakingCall::::WithdrawUnbonded(0); let encoder = call.encoder::(&asset); - let xcm = Xcm::Transact { + let transact = Instruction::Transact { origin_type: OriginKind::SovereignAccount, require_weight_at_most: config.weights.withdraw_unbonded, call: encoder.encode_runtime_call(config.pallet_index).encode().into(), }; + let mut xcm = Xcm::new(); + xcm.0.push(transact); let result = T::XcmSender::send_xcm(dest, xcm); log::info!(target: "pint_xcm", "sent pallet_staking::withdraw_unbonded xcm: {:?} ",result); From 6765902105aa50b839ffe317e60d269bc473bfe0 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 1 Nov 2021 17:16:23 +0100 Subject: [PATCH 12/29] fix: pallet-xcm feaute --- pallets/remote-asset-manager/src/lib.rs | 4 ++-- runtime/dev/Cargo.toml | 1 + runtime/kusama/Cargo.toml | 1 + runtime/polkadot/Cargo.toml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pallets/remote-asset-manager/src/lib.rs b/pallets/remote-asset-manager/src/lib.rs index 01ec2aea68..47f7a60e1c 100644 --- a/pallets/remote-asset-manager/src/lib.rs +++ b/pallets/remote-asset-manager/src/lib.rs @@ -421,8 +421,8 @@ pub mod pallet { } else if !balances.pending_redemption.is_zero() { // check if we need and able to unbond funds: only with we currently have enough active funds // and room for 1 more unlocking chunk - if balances.pending_redemption < ledger.active.saturating_sub(config.minimum_balance) - && ledger.unlocking.len() < pallet_staking::MAX_UNLOCKING_CHUNKS + if balances.pending_redemption < ledger.active.saturating_sub(config.minimum_balance) && + ledger.unlocking.len() < pallet_staking::MAX_UNLOCKING_CHUNKS { // attempt to send unbond match Self::do_transact_unbond(&config, asset, balances.pending_redemption, dest) { diff --git a/runtime/dev/Cargo.toml b/runtime/dev/Cargo.toml index e7e9ed0ea7..d3dfce57cc 100644 --- a/runtime/dev/Cargo.toml +++ b/runtime/dev/Cargo.toml @@ -163,6 +163,7 @@ std = [ 'pallet-sudo/std', 'pallet-session/std', 'pallet-transaction-payment/std', + 'pallet-xcm/std', 'parachain-info/std', 'cumulus-pallet-aura-ext/std', diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 17f68ccbf9..526cb5caaf 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -188,6 +188,7 @@ std = [ 'primitives/std', 'pallet-asset-index-rpc-runtime-api/std', 'pallet-chainlink-feed/std', + 'pallet-xcm/std', 'orml-currencies/std', 'orml-unknown-tokens/std', diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 065a6b0c43..1f6bd96528 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -161,6 +161,7 @@ std = [ 'pallet-sudo/std', 'pallet-session/std', 'pallet-transaction-payment/std', + 'pallet-xcm/std', 'parachain-info/std', 'cumulus-pallet-aura-ext/std', From 494d085ab296fd568324dbefb0209d6ae9ecc834 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 1 Nov 2021 23:53:40 +0100 Subject: [PATCH 13/29] fix: breaking changes --- Cargo.lock | 265 ++++++++++++++++++++++++- Cargo.toml | 6 - node/Cargo.toml | 4 +- node/src/chain_spec/dev.rs | 1 + node/src/chain_spec/kusama.rs | 1 + node/src/chain_spec/polkadot.rs | 1 + node/src/client.rs | 33 ++- node/src/command.rs | 42 ++-- node/src/lib.rs | 2 +- node/src/main.rs | 1 + node/src/service.rs | 20 +- primitives/xcm-calls/src/lib.rs | 3 - runtime/integration-tests/Cargo.toml | 2 + runtime/integration-tests/src/relay.rs | 38 +++- 14 files changed, 344 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8518178bb3..05247d0fe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4562,6 +4562,114 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "node-executor" +version = "3.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-benchmarking", + "node-primitives", + "node-runtime", + "parity-scale-codec", + "sc-executor", + "scale-info", + "sp-core", + "sp-keystore", + "sp-state-machine", + "sp-trie", +] + +[[package]] +name = "node-primitives" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "node-runtime" +version = "3.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "log", + "node-primitives", + "pallet-assets", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-bounties", + "pallet-collective", + "pallet-contracts", + "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-elections-phragmen", + "pallet-gilt", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-lottery", + "pallet-membership", + "pallet-mmr", + "pallet-multisig", + "pallet-offences", + "pallet-proxy", + "pallet-randomness-collective-flip", + "pallet-recovery", + "pallet-scheduler", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-sudo", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-transaction-storage", + "pallet-treasury", + "pallet-uniques", + "pallet-utility", + "pallet-vesting", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12)", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "substrate-wasm-builder", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -5198,6 +5306,70 @@ dependencies = [ "sp-core", ] +[[package]] +name = "pallet-contracts" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "bitflags", + "frame-benchmarking", + "frame-support", + "frame-system", + "libsecp256k1 0.6.0", + "log", + "pallet-contracts-primitives", + "pallet-contracts-proc-macro", + "parity-scale-codec", + "pwasm-utils", + "rand 0.7.3", + "scale-info", + "serde", + "smallvec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-sandbox", + "sp-std", + "wasmi-validation", +] + +[[package]] +name = "pallet-contracts-primitives" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "bitflags", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "proc-macro2 1.0.30", + "quote 1.0.10", + "syn 1.0.80", +] + +[[package]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "pallet-contracts-primitives", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" @@ -5342,7 +5514,7 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-keyring", + "sp-keyring 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-runtime", "sp-std", ] @@ -5363,6 +5535,19 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-lottery" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "4.0.0-dev" @@ -5867,6 +6052,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-transaction-storage-proof 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12)", +] + [[package]] name = "pallet-treasury" version = "4.0.0-dev" @@ -5884,6 +6087,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-uniques" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-utility" version = "4.0.0-dev" @@ -6302,6 +6519,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" name = "pint" version = "3.0.0" dependencies = [ + "async-trait", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", @@ -6321,6 +6539,7 @@ dependencies = [ "hex-literal", "jsonrpc-core", "log", + "node-executor", "pallet-asset-index-rpc", "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", @@ -8416,6 +8635,7 @@ dependencies = [ "orml-xtokens", "pallet-asset-index", "pallet-assets", + "pallet-bags-list", "pallet-balances", "pallet-committee", "pallet-price-feed", @@ -8438,6 +8658,7 @@ dependencies = [ "scale-info", "sp-core", "sp-io", + "sp-npos-elections", "sp-runtime", "sp-staking", "xcm", @@ -8684,7 +8905,7 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", - "sp-keyring", + "sp-keyring 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-keystore", "sp-panic-handler", "sp-runtime", @@ -9384,7 +9605,7 @@ dependencies = [ "sp-storage", "sp-tracing", "sp-transaction-pool", - "sp-transaction-storage-proof", + "sp-transaction-storage-proof 4.0.0-dev (git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044)", "sp-trie", "sp-version", "substrate-prometheus-endpoint", @@ -10297,6 +10518,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "sp-keyring" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "lazy_static", + "sp-core", + "sp-runtime", + "strum 0.20.0", +] + [[package]] name = "sp-keyring" version = "4.0.0-dev" @@ -10438,6 +10670,20 @@ dependencies = [ "syn 1.0.80", ] +[[package]] +name = "sp-sandbox" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "log", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-std", + "sp-wasm-interface", + "wasmi", +] + [[package]] name = "sp-serializer" version = "3.0.0" @@ -10563,6 +10809,18 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sp-transaction-storage-proof" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" @@ -11651,6 +11909,7 @@ checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" dependencies = [ "downcast-rs", "libc", + "libm", "memory_units", "num-rational 0.2.4", "num-traits", diff --git a/Cargo.toml b/Cargo.toml index 24d7b2e8ba..b0ec3a98ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -191,12 +191,6 @@ cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", r cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -#[patch."https://github.com/paritytech/grandpa-bridge-gadget"] -#pallet-beefy = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -#beefy-primitives = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -#beefy-gadget = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } -#beefy-gadget-rpc = { git = "https://github.com/paritytech//grandpa-bridge-gadget", rev = "9954b61657dc8899a21b4f2501ee6bd3b7a2dc23" } - [patch."https://github.com/open-web3-stack/open-runtime-module-library"] orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } diff --git a/node/Cargo.toml b/node/Cargo.toml index f4a89833c5..85c66dc4a4 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -16,7 +16,6 @@ targets = ['x86_64-unknown-linux-gnu'] substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] -default = [ ] kusama = [ 'pint-runtime-kusama' ] polkadot = [ 'pint-runtime-polkadot' ] runtime-benchmarks = [ @@ -34,6 +33,7 @@ structopt = '0.3.8' serde = { version = '1.0.119', features = ['derive'] } hex-literal = '0.3.1' futures = { version = "0.3.1", features = ["compat"] } +async-trait = "0.1.51" # RPC related Dependencies jsonrpc-core = "18.0.0" @@ -113,3 +113,5 @@ polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12'} + +node-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } diff --git a/node/src/chain_spec/dev.rs b/node/src/chain_spec/dev.rs index 78a2a130cb..a2af6fcea7 100644 --- a/node/src/chain_spec/dev.rs +++ b/node/src/chain_spec/dev.rs @@ -168,5 +168,6 @@ fn pint_testnet_genesis( proxy_configs: vec![(42, ProxyConfig { pallet_index: 29, weights: ProxyWeights::polkadot() })], statemint_config: None, }, + polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(2) }, } } diff --git a/node/src/chain_spec/kusama.rs b/node/src/chain_spec/kusama.rs index e09b4f42f9..5e757bb9ae 100644 --- a/node/src/chain_spec/kusama.rs +++ b/node/src/chain_spec/kusama.rs @@ -168,5 +168,6 @@ fn pint_testnet_genesis( proxy_configs: vec![(42, ProxyConfig { pallet_index: 29, weights: ProxyWeights::polkadot() })], statemint_config: None, }, + polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(2) }, } } diff --git a/node/src/chain_spec/polkadot.rs b/node/src/chain_spec/polkadot.rs index 36e849805d..235afed4f1 100644 --- a/node/src/chain_spec/polkadot.rs +++ b/node/src/chain_spec/polkadot.rs @@ -168,5 +168,6 @@ fn pint_testnet_genesis( proxy_configs: vec![(42, ProxyConfig { pallet_index: 29, weights: ProxyWeights::polkadot() })], statemint_config: None, }, + polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(2) }, } } diff --git a/node/src/client.rs b/node/src/client.rs index e88216fb43..b94d952384 100644 --- a/node/src/client.rs +++ b/node/src/client.rs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: LGPL-3.0-only use primitives::{AccountId, AssetId, Balance, Block, BlockNumber, Hash, Header, Nonce}; use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator}; -use sc_service::{TFullBackend, TFullClient}; use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; use sp_consensus::BlockStatus; @@ -14,12 +13,6 @@ use sp_runtime::{ use sp_storage::{ChildInfo, PrefixedStorageKey, StorageData, StorageKey}; use std::sync::Arc; -/// PINT's full backend. -pub type FullBackend = TFullBackend; - -/// PINT's full client. -pub type FullClient = TFullClient; - /// A set of APIs that polkadot-like runtimes must implement. pub trait RuntimeApiCollection: sp_transaction_pool::runtime_api::TaggedTransactionQueue @@ -111,7 +104,7 @@ pub trait ExecuteWithClient { >::StateBackend: sp_api::StateBackend, Backend: sc_client_api::Backend, Backend::State: sp_api::StateBackend, - Api: crate::client::RuntimeApiCollection, + Api: RuntimeApiCollection, Client: AbstractClient + 'static; } @@ -130,21 +123,23 @@ pub trait ClientHandle { /// A client instance of Polkadot. #[derive(Clone)] pub enum Client { - Dev(Arc>), + Dev(Arc>), #[cfg(feature = "kusama")] - Kusama(Arc>), + Kusama(Arc>), #[cfg(feature = "polkadot")] - Polkadot(Arc>), + Polkadot( + Arc>, + ), } impl ClientHandle for Client { fn execute_with(&self, t: T) -> T::Output { match self { - Self::Dev(client) => T::execute_with_client::<_, _, FullBackend>(t, client.clone()), + Self::Dev(client) => T::execute_with_client::<_, _, crate::service::FullBackend>(t, client.clone()), #[cfg(feature = "kusama")] - Self::Kusama(client) => T::execute_with_client::<_, _, FullBackend>(t, client.clone()), + Self::Kusama(client) => T::execute_with_client::<_, _, crate::service::FullBackend>(t, client.clone()), #[cfg(feature = "polkadot")] - Self::Polkadot(client) => T::execute_with_client::<_, _, FullBackend>(t, client.clone()), + Self::Polkadot(client) => T::execute_with_client::<_, _, crate::service::FullBackend>(t, client.clone()), } } } @@ -243,7 +238,7 @@ impl sc_client_api::BlockBackend for Client { } } -impl sc_client_api::StorageProvider for Client { +impl sc_client_api::StorageProvider for Client { fn storage(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result> { match self { Self::Dev(client) => client.storage(id, key), @@ -297,7 +292,9 @@ impl sc_client_api::StorageProvider for Client { id: &BlockId, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, - ) -> sp_blockchain::Result>::State, Block>> { + ) -> sp_blockchain::Result< + KeyIterator<'a, >::State, Block>, + > { match self { Self::Dev(client) => client.storage_keys_iter(id, prefix, start_key), #[cfg(feature = "kusama")] @@ -343,7 +340,9 @@ impl sc_client_api::StorageProvider for Client { child_info: ChildInfo, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, - ) -> sp_blockchain::Result>::State, Block>> { + ) -> sp_blockchain::Result< + KeyIterator<'a, >::State, Block>, + > { match self { Self::Dev(client) => client.child_storage_keys_iter(id, child_info, prefix, start_key), #[cfg(feature = "kusama")] diff --git a/node/src/command.rs b/node/src/command.rs index 2741450f26..60433bcfc3 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -138,7 +138,7 @@ impl SubstrateCli for RelayChainCli { } fn copyright_start_year() -> i32 { - 2017 + 2021 } fn load_spec(&self, id: &str) -> std::result::Result, String> { @@ -151,17 +151,17 @@ impl SubstrateCli for RelayChainCli { } fn set_default_ss58_version(spec: &Box) { - use sp_core::crypto::Ss58AddressFormat; + use sp_core::crypto::Ss58AddressFormatRegistry; let ss58_version = if spec.is_kusama() { - Ss58AddressFormat::KusamaAccount + Ss58AddressFormatRegistry::KusamaAccount } else if spec.is_polkadot() { - Ss58AddressFormat::PolkadotAccount + Ss58AddressFormatRegistry::PolkadotAccount } else { - Ss58AddressFormat::SubstrateAccount + Ss58AddressFormatRegistry::SubstrateAccount }; - sp_core::crypto::set_default_ss58_version(ss58_version); + sp_core::crypto::set_default_ss58_version(ss58_version.into()); } fn extract_genesis_wasm(chain_spec: &Box) -> Result> { @@ -180,7 +180,7 @@ macro_rules! with_runtime { #[cfg(feature = "kusama")] use pint_runtime_kusama::{Block, RuntimeApi}; #[cfg(feature = "kusama")] - use service::{KusamaExecutor as Executor}; + use service::{KusamaExecutorDispatch as Executor}; #[cfg(feature = "kusama")] $( $code )* @@ -191,7 +191,7 @@ macro_rules! with_runtime { #[cfg(feature = "polkadot")] use pint_runtime_polkadot::{Block, RuntimeApi}; #[cfg(feature = "polkadot")] - use service::{PolkadotExecutor as Executor}; + use service::{PolkadotExecutorDispatch as Executor}; #[cfg(feature = "polkadot")] $( $code )* @@ -200,7 +200,7 @@ macro_rules! with_runtime { } else { #[allow(unused_imports)] use pint_runtime_dev::{Block, RuntimeApi}; - use service::{DevExecutor as Executor}; + use service::{DevExecutorDispatch as Executor}; $( $code )* } } @@ -237,11 +237,11 @@ pub fn run() -> Result<()> { runner.sync_run(|config| { let polkadot_cli = RelayChainCli::new( &config, - [RelayChainCli::executable_name().to_string()].iter().chain(cli.relaychain_args.iter()), + [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), ); let polkadot_config = - SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, config.task_executor.clone()) + SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, config.tokio_handle.clone()) .map_err(|err| format!("Relay chain argument error: {}", err))?; cmd.run(config, polkadot_config) @@ -275,6 +275,7 @@ pub fn run() -> Result<()> { Ok(()) } + Some(Subcommand::ExportGenesisWasm(params)) => { let mut builder = sc_cli::LoggerBuilder::new(""); builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); @@ -299,6 +300,9 @@ pub fn run() -> Result<()> { if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; let chain_spec = &runner.config().chain_spec; + + set_default_ss58_version(chain_spec); + with_runtime!(chain_spec, { return runner.sync_run(|config| cmd.run::(config)); }) @@ -326,7 +330,7 @@ pub fn run() -> Result<()> { let polkadot_cli = RelayChainCli::new( &config, - [RelayChainCli::executable_name().to_string()].iter().chain(cli.relaychain_args.iter()), + [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), ); let id = ParaId::from(cli.run.parachain_id.or(para_id).unwrap_or(200)); @@ -336,9 +340,9 @@ pub fn run() -> Result<()> { let block: Block = generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?; let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); - let task_executor = config.task_executor.clone(); - let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, task_executor) - .map_err(|err| format!("Relay chain argument error: {}", err))?; + let polkadot_config = + SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, config.tokio_handle.clone()) + .map_err(|err| format!("Relay chain argument error: {}", err))?; info!("Parachain id: {:?}", id); info!("Parachain Account: {}", parachain_account); @@ -447,10 +451,6 @@ impl CliConfiguration for RelayChainCli { self.base.base.rpc_cors(is_dev) } - fn telemetry_external_transport(&self) -> Result> { - self.base.base.telemetry_external_transport() - } - fn default_heap_pages(&self) -> Result> { self.base.base.default_heap_pages() } @@ -470,8 +470,4 @@ impl CliConfiguration for RelayChainCli { fn announce_block(&self) -> Result { self.base.base.announce_block() } - - fn telemetry_endpoints(&self, chain_spec: &Box) -> Result> { - self.base.base.telemetry_endpoints(chain_spec) - } } diff --git a/node/src/lib.rs b/node/src/lib.rs index b289173fdc..802d378404 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -3,5 +3,5 @@ pub mod chain_spec; pub mod client; -mod instant_finalize; +pub mod instant_finalize; pub mod service; diff --git a/node/src/main.rs b/node/src/main.rs index a92ad8a84e..83a92d074b 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -11,6 +11,7 @@ mod service; mod cli; mod client; mod command; +mod instant_finalize; fn main() -> sc_cli::Result<()> { command::run() diff --git a/node/src/service.rs b/node/src/service.rs index e63f2557a1..7233bcb238 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -8,7 +8,7 @@ use cumulus_client_service::{ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; use cumulus_primitives_core::ParaId; - +use sc_consensus_aura::StartAuraParams; // Substrate Imports use cumulus_primitives_parachain_inherent::MockValidationDataInherentDataProvider; use sc_chain_spec::ChainSpec; @@ -19,7 +19,6 @@ use sc_executor::NativeElseWasmExecutor; use sc_network::NetworkService; use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, Role, TFullBackend, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; -use sc_transaction_pool::BasicPool; use sp_api::ConstructRuntimeApi; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; @@ -30,8 +29,6 @@ use substrate_prometheus_endpoint::Registry; use std::sync::Arc; -use crate::instant_finalize; - use crate::client::*; // Runtime type overrides @@ -58,7 +55,7 @@ impl sc_executor::NativeExecutionDispatch for DevExecutorDispatch { } #[cfg(feature = "with-kusama-runtime")] -mod karura_executor { +mod kusama_executor { pub use pint_runtime_kusama; pub struct KusamaExecutorDispatch; @@ -119,10 +116,11 @@ impl IdentifyVariant for Box { } /// PINT's full backend. -type FullBackend = TFullBackend; +pub type FullBackend = TFullBackend; /// PINT's full client. -type FullClient = TFullClient; +pub type FullClient = + sc_service::TFullClient>; /// Maybe PINT Dev full select chain. type MaybeFullSelectChain = Option>; @@ -228,7 +226,7 @@ where } else { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - cumulus_client_consensus_aura::import_queue::( + cumulus_client_consensus_aura::import_queue::( cumulus_client_consensus_aura::ImportQueueParams { block_import: client.clone(), client: client.clone(), @@ -512,7 +510,7 @@ where pub const KUSAMA_RUNTIME_NOT_AVAILABLE: &str = "pint-kusama runtime is not available. Please compile the node with `--features kusama` to enable it."; #[allow(dead_code)] -pub const pint_runtime_polkadot_NOT_AVAILABLE: &str = +pub const POLKADOT_RUNTIME_NOT_AVAILABLE: &str = "pint-polkadot runtime is not available. Please compile the node with `--features polkadot` to enable it."; /// Builds a new object suitable for chain operations. @@ -547,7 +545,7 @@ pub fn new_chain_ops( } #[cfg(not(feature = "polkadot"))] - Err(pint_runtime_polkadot_NOT_AVAILABLE.into()) + Err(POLKADOT_RUNTIME_NOT_AVAILABLE.into()) } else { let PartialComponents { client, backend, import_queue, task_manager, .. } = new_partial(config, config.chain_spec.is_dev(), false)?; @@ -639,7 +637,7 @@ fn inner_pint_dev(config: Configuration, instant_sealing: bool) -> Result; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -120,7 +122,7 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; @@ -170,10 +172,10 @@ impl OneSessionHandler for OtherSessionHandler { SESSION.with(|x| *x.borrow_mut() = (validators.map(|x| x.0.clone()).collect(), HashSet::new())); } - fn on_disabled(validator_index: usize) { + fn on_disabled(validator_index: u32) { SESSION.with(|d| { let mut d = d.borrow_mut(); - let value = d.0[validator_index].clone(); + let value = d.0[validator_index as usize].clone(); d.1.insert(value); }) } @@ -272,6 +274,7 @@ parameter_types! { pub const BondingDuration: EraIndex = 3; pub const RewardCurve: &'static PiecewiseLinear<'static> = &I_NPOS; pub const MaxNominatorRewardedPerValidator: u32 = 64; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(75); } thread_local! { @@ -289,13 +292,24 @@ impl OnUnbalanced> for RewardRemainderMock { } } +const THRESHOLDS: [sp_npos_elections::VoteWeight; 9] = [10, 20, 30, 40, 50, 60, 1_000, 2_000, 10_000]; + +parameter_types! { + pub static BagThresholds: &'static [sp_npos_elections::VoteWeight] = &THRESHOLDS; +} + +impl pallet_bags_list::Config for Runtime { + type Event = Event; + type WeightInfo = (); + type VoteWeightProvider = Staking; + type BagThresholds = BagThresholds; +} + impl onchain::Config for Runtime { - type AccountId = AccountId; - type BlockNumber = BlockNumber; - type BlockWeights = BlockWeights; type Accuracy = Perbill; type DataProvider = Staking; } + impl staking::Config for Runtime { const MAX_NOMINATIONS: u32 = 16; type Currency = Balances; @@ -316,6 +330,8 @@ impl staking::Config for Runtime { type ElectionProvider = onchain::OnChainSequentialPhragmen; type GenesisElectionProvider = Self::ElectionProvider; type WeightInfo = (); + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; + type SortedListProvider = BagsList; } parameter_types! { @@ -328,7 +344,7 @@ parameter_types! { } /// The type used to represent the kinds of proxying allowed. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen, scale_info::TypeInfo)] pub enum ProxyType { Any = 0, NonTransfer = 1, @@ -411,7 +427,7 @@ construct_runtime!( Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, ParasUmp: ump::{Pallet, Call, Storage, Event}, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event}, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, // use polkadot index 7 Staking: staking::{Pallet, Call, Storage, Event} = 7, @@ -423,5 +439,7 @@ construct_runtime!( // use statemint index 50 Assets: pallet_assets::{Pallet, Call, Storage, Event} = 50, + + BagsList: pallet_bags_list::{Pallet, Call, Storage, Event}, } ); From 8e169f298b06188f949a4d4e199a177bd7b654ec Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 2 Nov 2021 00:47:51 +0100 Subject: [PATCH 14/29] fix: update calls --- Cargo.lock | 7 ++-- pallets/asset-index/src/benchmarking.rs | 44 +++++++++++------------ pallets/committee/Cargo.toml | 5 ++- pallets/committee/src/benchmarking.rs | 10 +++--- pallets/local-treasury/Cargo.toml | 11 +++--- pallets/price-feed/src/benchmarking.rs | 14 ++++---- pallets/remote-asset-manager/Cargo.toml | 7 ++-- pallets/remote-treasury/Cargo.toml | 11 +++--- pallets/saft-registry/src/benchmarking.rs | 36 +++++++++---------- 9 files changed, 78 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05247d0fe4..c75fb813ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5303,7 +5303,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-api", "sp-core", + "sp-io", ] [[package]] @@ -5530,9 +5532,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-api", "sp-core", "sp-io", - "sp-runtime", ] [[package]] @@ -5789,6 +5791,7 @@ dependencies = [ "primitives", "scale-info", "serde", + "sp-api", "sp-core", "sp-io", "sp-runtime", @@ -5816,9 +5819,9 @@ dependencies = [ "primitives", "scale-info", "serde", + "sp-api", "sp-core", "sp-io", - "sp-runtime", "xcm", "xcm-executor", ] diff --git a/pallets/asset-index/src/benchmarking.rs b/pallets/asset-index/src/benchmarking.rs index 62830ec4c0..7c06b72ccc 100644 --- a/pallets/asset-index/src/benchmarking.rs +++ b/pallets/asset-index/src/benchmarking.rs @@ -31,7 +31,7 @@ benchmarks! { add_asset { let asset_id :T::AssetId = T::try_convert(2u8).unwrap(); let origin = T::AdminOrigin::successful_origin(); - let origin_account_id = T::AdminOrigin::ensure_origin(origin.clone())?; + let origin_account_id = T::AdminOrigin::ensure_origin(origin.clone()).unwrap(); let million = 1_000_000u32.into(); let location = MultiLocation::default(); @@ -45,11 +45,11 @@ benchmarks! { T::Currency::deposit(asset_id, &origin_account_id, million)?; - let call = Call::::add_asset( - asset_id, - million, - million - ); + let call = Call::::add_asset{ + asset_id: asset_id, + units: million, + amount: million + }; let balance = T::Currency::total_balance(asset_id, &T::TreasuryPalletId::get().into_account()); }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( @@ -104,7 +104,7 @@ benchmarks! { origin.clone(), tokens, )); - let call = Call::::complete_withdraw(); + let call = Call::::complete_withdraw{}; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!(pallet::PendingWithdrawals::::get(&origin_account_id), None); } @@ -135,7 +135,7 @@ benchmarks! { assert_ok!(T::Currency::deposit(asset_id, &origin_account_id, units)); // construct call - let call = Call::::deposit(asset_id, units); + let call = Call::::deposit{asset_id: asset_id, units: units}; }: { call.dispatch_bypass_filter(origin)? } verify { let nav = AssetIndex::::nav().unwrap(); let deposit_value = T::PriceFeed::get_price(asset_id).unwrap().checked_mul_int(units.into()).unwrap(); @@ -186,10 +186,10 @@ benchmarks! { let asset_id :T::AssetId = T::try_convert(2u8).unwrap(); let origin = T::AdminOrigin::successful_origin(); let availability = AssetAvailability::Saft; - let call = Call::::register_asset( + let call = Call::::register_asset { asset_id, availability, - ); + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( AssetIndex::::assets(asset_id), @@ -203,12 +203,12 @@ benchmarks! { let symbol = b"pint".to_vec(); let decimals = 8_u8; let origin = T::AdminOrigin::successful_origin(); - let call = Call::::set_metadata( - asset_id, - name.clone(), - symbol.clone(), + let call = Call::::set_metadata { + id: asset_id, + name: name.clone(), + symbol: symbol.clone(), decimals - ); + }; }: { call.dispatch_bypass_filter(origin)? } verify { let metadata = Metadata::::get(asset_id); assert_eq!(metadata.name.as_slice(), name.as_slice()); @@ -219,9 +219,9 @@ benchmarks! { set_deposit_range { let origin = T::AdminOrigin::successful_origin(); let range = DepositRange {minimum : T::Balance::one(), maximum: T::Balance::max_value()}; - let call = Call::::set_deposit_range( - range.clone() - ); + let call = Call::::set_deposit_range{ + new_range: range.clone() + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!(range, IndexTokenDepositRange::::get()); } @@ -262,7 +262,7 @@ benchmarks! { + 1_u32.into(), ); - let call = Call::::withdraw(tokens); + let call = Call::::withdraw { amount: tokens }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!(pallet::PendingWithdrawals::::get(&origin_account_id).expect("pending withdrawals should be present").len(), 1); } @@ -292,7 +292,7 @@ benchmarks! { assert_ok!(T::Currency::deposit(asset_id, &origin_account_id, units)); assert_ok!(AssetIndex::::deposit(origin.clone(), asset_id, units)); - let call = Call::::unlock(); + let call = Call::::unlock{}; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!(pallet::IndexTokenLocks::::get(&origin_account_id), vec![types::IndexTokenLock{ locked: AssetIndex::::index_token_equivalent(asset_id, units).unwrap(), @@ -302,7 +302,7 @@ benchmarks! { set_lockup_period { let week: T::BlockNumber = (10u32 * 60 * 24 * 7).into(); - let call = Call::::set_lockup_period(week); + let call = Call::::set_lockup_period{ lockup_period: week} ; }: { call.dispatch_bypass_filter(T::AdminOrigin::successful_origin())? } verify { @@ -315,7 +315,7 @@ benchmarks! { range: [(week, FeeRate { numerator: 1, denominator: 10 }), (week * 4u32.into(), FeeRate { numerator: 1, denominator: 20 })], default_fee: FeeRate { numerator: 1, denominator: 100 }, }; - let call = Call::::update_redemption_fees(range.clone()); + let call = Call::::update_redemption_fees { new_range: range.clone()}; }: { call.dispatch_bypass_filter(T::AdminOrigin::successful_origin())? } verify { diff --git a/pallets/committee/Cargo.toml b/pallets/committee/Cargo.toml index 1269667d50..e1c661f934 100644 --- a/pallets/committee/Cargo.toml +++ b/pallets/committee/Cargo.toml @@ -19,7 +19,10 @@ frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polk frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] default = ['std'] diff --git a/pallets/committee/src/benchmarking.rs b/pallets/committee/src/benchmarking.rs index f33b3746fc..dfcca72a5b 100644 --- a/pallets/committee/src/benchmarking.rs +++ b/pallets/committee/src/benchmarking.rs @@ -9,7 +9,7 @@ use frame_support::{ use frame_system::{ensure_signed, Call as SystemCall, Pallet as System, RawOrigin as SystemOrigin}; fn submit_proposal(origin: ::Origin) -> pallet::Proposal { - let action: T::Action = >::remark(vec![0; 0]).into(); + let action: T::Action = SystemCall::::remark { remark: vec![0; 0] }.into(); let expected_nonce = pallet::ProposalCount::::get(); let account_id = ensure_signed(origin.clone()).unwrap(); @@ -21,7 +21,7 @@ fn submit_proposal(origin: ::Origin) -> pa 1_u32.into(), ); - let call = >::propose(Box::new(action.clone())); + let call = Call::::propose { action: Box::new(action.clone()) }; assert_ok!(call.dispatch_bypass_filter(origin)); pallet::Proposal::::new(action, account_id, expected_nonce, ProposalStatus::Active) @@ -38,7 +38,7 @@ benchmarks! { propose { let origin = T::ProposalSubmissionOrigin::successful_origin(); let proposal = submit_proposal::(origin.clone()); - let call = >::propose(Box::new(>::remark(vec![0; 0]).into())); + let call = Call::::propose{action: Box::new(SystemCall::::remark{remark:vec![0; 0]}.into())}; }: { call.dispatch_bypass_filter(origin)? } verify { @@ -57,7 +57,7 @@ benchmarks! { ); // construct call - let call = >::vote(proposal.hash(), VoteKind::Abstain); + let call = Call::::vote{ proposal_hash: proposal.hash(), vote: VoteKind::Abstain}; }: { call.dispatch_bypass_filter(origin)? } verify { @@ -94,7 +94,7 @@ benchmarks! { ); // construct call - let call = >::close(proposal.hash()); + let call = Call::::close{proposal_hash: proposal.hash()}; }: { call.dispatch_bypass_filter(T::ProposalExecutionOrigin::successful_origin())? } verify { diff --git a/pallets/local-treasury/Cargo.toml b/pallets/local-treasury/Cargo.toml index d104e3bef7..1411bb224c 100644 --- a/pallets/local-treasury/Cargo.toml +++ b/pallets/local-treasury/Cargo.toml @@ -19,12 +19,13 @@ frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = [dev-dependencies] serde = { version = "1.0.101" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } - -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] default = ['std'] diff --git a/pallets/price-feed/src/benchmarking.rs b/pallets/price-feed/src/benchmarking.rs index 7b859ddad3..ef14280cce 100644 --- a/pallets/price-feed/src/benchmarking.rs +++ b/pallets/price-feed/src/benchmarking.rs @@ -14,10 +14,10 @@ benchmarks! { let asset_id :T::AssetId = T::try_convert(2u8).unwrap(); let origin = T::AdminOrigin::successful_origin(); let feed_id = 0u32.try_into().ok().unwrap(); - let call = Call::::map_asset_price_feed( - asset_id.clone(), - feed_id - ); + let call = Call::::map_asset_price_feed { + asset_id: asset_id.clone(), + feed_id: feed_id + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( PriceFeed::::asset_feed(asset_id), @@ -30,9 +30,9 @@ benchmarks! { let origin = T::AdminOrigin::successful_origin(); let feed_id = 0u32.try_into().ok().unwrap(); assert_ok!(PriceFeed::::map_asset_price_feed(origin.clone(), asset_id.clone(), feed_id)); - let call = Call::::unmap_asset_price_feed( - asset_id.clone(), - ); + let call = Call::::unmap_asset_price_feed { + asset_id: asset_id.clone(), + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( PriceFeed::::asset_feed(asset_id), diff --git a/pallets/remote-asset-manager/Cargo.toml b/pallets/remote-asset-manager/Cargo.toml index f21fa3514f..99b348534c 100644 --- a/pallets/remote-asset-manager/Cargo.toml +++ b/pallets/remote-asset-manager/Cargo.toml @@ -38,9 +38,12 @@ orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-l [dev-dependencies] serde = { version = "1.0.101", features = ["derive"] } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } diff --git a/pallets/remote-treasury/Cargo.toml b/pallets/remote-treasury/Cargo.toml index 091606c4a3..8bb4f250bb 100644 --- a/pallets/remote-treasury/Cargo.toml +++ b/pallets/remote-treasury/Cargo.toml @@ -32,12 +32,13 @@ orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-l [dev-dependencies] serde = { version = "1.0.101" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } - -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } [features] default = ['std'] diff --git a/pallets/saft-registry/src/benchmarking.rs b/pallets/saft-registry/src/benchmarking.rs index 944795a091..51f577f792 100644 --- a/pallets/saft-registry/src/benchmarking.rs +++ b/pallets/saft-registry/src/benchmarking.rs @@ -26,11 +26,11 @@ benchmarks! { 1000u32.into() )); - let call = Call::::add_saft( - asset, - 100u32.into(), - 20u32.into() - ); + let call = Call::::add_saft { + asset_id: asset, + nav: 100u32.into(), + units: 20u32.into() + }; }: { call.dispatch_bypass_filter(origin)? } verify { let id = SaftRegistry::::saft_counter(asset) - 1; @@ -56,10 +56,10 @@ benchmarks! { assert_ok!(T::AssetRecorderBenchmarks::deposit_saft_equivalent(nav)); assert_ok!(SaftRegistry::::add_saft(origin.clone(), asset, nav, units)); - let call = Call::::remove_saft( - asset, - 0u32 - ); + let call = Call::::remove_saft { + asset_id: asset, + saft_id: 0u32 + } ; }: { call.dispatch_bypass_filter(origin)? } verify { assert!( @@ -85,11 +85,11 @@ benchmarks! { 20_u32.into(), )); - let call = Call::::report_nav( - asset, - 0, - 1000_u32.into() - ); + let call = Call::::report_nav { + asset_id: asset, + saft_id: 0, + latest_nav: 1000_u32.into() + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( @@ -125,10 +125,10 @@ benchmarks! { Ok(()) })); - let call = Call::::convert_to_liquid( - asset, - (Junction::Parachain(100)).into() - ); + let call = Call::::convert_to_liquid { + asset_id: asset, + location: (Junction::Parachain(100)).into() + }; }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!( SaftRegistry::::saft_counter(asset), From 4cf378714fc0be4c31853d65efb5f3db2379a8cb Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 2 Nov 2021 01:23:49 +0100 Subject: [PATCH 15/29] fix: features --- node/src/service.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/src/service.rs b/node/src/service.rs index 7233bcb238..c26d445e88 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -54,7 +54,7 @@ impl sc_executor::NativeExecutionDispatch for DevExecutorDispatch { } } -#[cfg(feature = "with-kusama-runtime")] +#[cfg(feature = "pint-kusama-runtime")] mod kusama_executor { pub use pint_runtime_kusama; @@ -72,7 +72,7 @@ mod kusama_executor { } } -#[cfg(feature = "with-polkadot-runtime")] +#[cfg(feature = "pint-runtime-polkadot")] mod polkadot_executor { pub use pint_runtime_polkadot; @@ -90,9 +90,9 @@ mod polkadot_executor { } } -#[cfg(feature = "with-kusama-runtime")] +#[cfg(feature = "pint-kusama-runtime")] pub use kusama_executor::*; -#[cfg(feature = "with-polkadot-runtime")] +#[cfg(feature = "pint-polkadot-runtime")] pub use polkadot_executor::*; pub trait IdentifyVariant { From bd5ca464c7f66e837ae0d86ccaa4449f2a4fa470 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 2 Nov 2021 02:05:04 +0100 Subject: [PATCH 16/29] fix: tests --- pallets/committee/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/committee/src/tests.rs b/pallets/committee/src/tests.rs index f9bcb52415..da25de57e0 100644 --- a/pallets/committee/src/tests.rs +++ b/pallets/committee/src/tests.rs @@ -28,7 +28,7 @@ const CONSTITUENT: u64 = 42; /// value is used to make unique actions fn make_action(value: u64) -> Call { - Call::System(system::Call::remark(value.encode())) + Call::System(system::Call::remark { remark: value.encode() }) } fn submit_proposal(action_value: u64) -> pallet::Proposal { @@ -507,7 +507,7 @@ fn propose_constituent_works() { // propose a new constituent assert_ok!(Committee::propose( Origin::signed(PROPOSER_ACCOUNT_ID), - Box::new(Call::Committee(crate::Call::add_constituent(CONSTITUENT))) + Box::new(Call::Committee(crate::Call::add_constituent { constituent: CONSTITUENT })) )); // test if proposal submitted with event From 91b2f288e93525c04f2c35de8a8f722ed67586a9 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 2 Nov 2021 02:44:24 +0100 Subject: [PATCH 17/29] make everything compile --- Cargo.lock | 3 ++ node/src/service.rs | 8 ++-- pallets/local-treasury/Cargo.toml | 1 + primitives/xcm-calls/Cargo.toml | 2 + primitives/xcm-calls/src/lib.rs | 58 +++++++++++++++++--------- runtime/integration-tests/src/tests.rs | 1 - 6 files changed, 48 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c75fb813ea..96d651d1ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5535,6 +5535,7 @@ dependencies = [ "sp-api", "sp-core", "sp-io", + "sp-runtime", ] [[package]] @@ -12350,6 +12351,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-assets", + "pallet-bags-list", "pallet-balances", "pallet-proxy", "pallet-session", @@ -12360,6 +12362,7 @@ dependencies = [ "scale-info", "serde", "sp-core", + "sp-npos-elections", "sp-runtime", "sp-staking", "xcm", diff --git a/node/src/service.rs b/node/src/service.rs index c26d445e88..7194b6f042 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -54,7 +54,7 @@ impl sc_executor::NativeExecutionDispatch for DevExecutorDispatch { } } -#[cfg(feature = "pint-kusama-runtime")] +#[cfg(feature = "kusama")] mod kusama_executor { pub use pint_runtime_kusama; @@ -72,7 +72,7 @@ mod kusama_executor { } } -#[cfg(feature = "pint-runtime-polkadot")] +#[cfg(feature = "polkadot")] mod polkadot_executor { pub use pint_runtime_polkadot; @@ -90,9 +90,9 @@ mod polkadot_executor { } } -#[cfg(feature = "pint-kusama-runtime")] +#[cfg(feature = "kusama")] pub use kusama_executor::*; -#[cfg(feature = "pint-polkadot-runtime")] +#[cfg(feature = "polkadot")] pub use polkadot_executor::*; pub trait IdentifyVariant { diff --git a/pallets/local-treasury/Cargo.toml b/pallets/local-treasury/Cargo.toml index 1411bb224c..7cd88dc60d 100644 --- a/pallets/local-treasury/Cargo.toml +++ b/pallets/local-treasury/Cargo.toml @@ -24,6 +24,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0 sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } diff --git a/primitives/xcm-calls/Cargo.toml b/primitives/xcm-calls/Cargo.toml index 3ae4acccf4..4a90ef0ce8 100644 --- a/primitives/xcm-calls/Cargo.toml +++ b/primitives/xcm-calls/Cargo.toml @@ -30,6 +30,8 @@ pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'p pallet-staking-reward-curve = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +pallet-bags-list = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } +sp-npos-elections = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } # Polkadot Dependencies xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12' } diff --git a/primitives/xcm-calls/src/lib.rs b/primitives/xcm-calls/src/lib.rs index ab2e356b0c..c87d86c37f 100644 --- a/primitives/xcm-calls/src/lib.rs +++ b/primitives/xcm-calls/src/lib.rs @@ -151,10 +151,10 @@ mod tests { SESSION.with(|x| *x.borrow_mut() = (validators.map(|x| x.0.clone()).collect(), HashSet::new())); } - fn on_disabled(validator_index: usize) { + fn on_disabled(validator_index: u32) { SESSION.with(|d| { let mut d = d.borrow_mut(); - let value = d.0[validator_index]; + let value = d.0[validator_index as usize]; d.1.insert(value); }) } @@ -188,9 +188,23 @@ mod tests { // use statemint index 50 Assets: pallet_assets::{Pallet, Call, Storage, Event} = 50, + BagsList: pallet_bags_list::{Pallet, Call, Storage, Event}, } ); + const THRESHOLDS: [sp_npos_elections::VoteWeight; 9] = [10, 20, 30, 40, 50, 60, 1_000, 2_000, 10_000]; + + parameter_types! { + pub static BagThresholds: &'static [sp_npos_elections::VoteWeight] = &THRESHOLDS; + } + + impl pallet_bags_list::Config for Test { + type Event = Event; + type WeightInfo = (); + type VoteWeightProvider = Staking; + type BagThresholds = BagThresholds; + } + /// Author of block is always 11 pub struct Author11; impl FindAuthor for Author11 { @@ -269,7 +283,6 @@ mod tests { type Event = Event; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type NextSessionRotation = pallet_session::PeriodicSessions; type WeightInfo = (); } @@ -301,6 +314,7 @@ mod tests { pub const BondingDuration: EraIndex = 3; pub const RewardCurve: &'static PiecewiseLinear<'static> = &I_NPOS; pub const MaxNominatorRewardedPerValidator: u32 = 64; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(75); } thread_local! { @@ -342,6 +356,8 @@ mod tests { type ElectionProvider = onchain::OnChainSequentialPhragmen; type GenesisElectionProvider = Self::ElectionProvider; type WeightInfo = (); + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; + type SortedListProvider = BagsList; } parameter_types! { @@ -354,7 +370,9 @@ mod tests { } /// The type used to represent the kinds of proxying allowed. - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen)] + #[derive( + Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen, scale_info::TypeInfo, + )] pub enum ProxyType { Any = 0, NonTransfer = 1, @@ -496,7 +514,7 @@ mod tests { #[test] fn test_pallet_staking_call_codec() { - let bond_extra = PalletStakingCall::bond_extra(100); + let bond_extra = PalletStakingCall::bond_extra { max_additional: 100 }; let call: Call = bond_extra.into(); let mut encoded: DoubleEncoded = call.encode().into(); assert!(encoded.ensure_decoded().is_ok()); @@ -506,7 +524,7 @@ mod tests { #[test] fn can_encode_decode_bond_extra() { let xcm_bond_extra = XcmStakingCall::BondExtra(100); - let call = PalletStakingCall::bond_extra(100); + let call = PalletStakingCall::bond_extra { max_additional: 100 }; let xcm_encoder = xcm_bond_extra.encoder::(&0); encode_decode_call!(PalletStakingCall, call, xcm_encoder, POLKADOT_PALLET_STAKING_INDEX); @@ -519,7 +537,7 @@ mod tests { let xcm_bond = XcmStakingCall::Bond(Bond { controller, value, payee: super::staking::RewardDestination::Stash }); - let call = PalletStakingCall::bond(controller, value, pallet_staking::RewardDestination::Stash); + let call = PalletStakingCall::bond { controller, value, payee: pallet_staking::RewardDestination::Stash }; let xcm_encoder = xcm_bond.encoder::(&0); @@ -529,7 +547,7 @@ mod tests { #[test] fn can_encode_decode_unbond() { let xcm_unbond = XcmStakingCall::Unbond(100); - let call = PalletStakingCall::unbond(100); + let call = PalletStakingCall::unbond { value: 100 }; let xcm_encoder = xcm_unbond.encoder::(&0); encode_decode_call!(PalletStakingCall, call, xcm_encoder, POLKADOT_PALLET_STAKING_INDEX); @@ -539,7 +557,7 @@ mod tests { fn can_encode_decode_add_proxy() { let delegate = 1337; let xcm_add_proxy = XcmProxyCall::AddProxy(ProxyParams { delegate, proxy_type: ProxyType::Staking, delay: 0 }); - let call = PalletProxyCall::add_proxy(delegate, ProxyType::Staking, 0); + let call = PalletProxyCall::add_proxy { delegate, proxy_type: ProxyType::Staking, delay: 0 }; let xcm_encoder = xcm_add_proxy.encoder::(&0); encode_decode_call!(PalletProxyCall, call, xcm_encoder, POLKADOT_PALLET_PROXY_INDEX); @@ -551,7 +569,7 @@ mod tests { let xcm_remove_proxy = XcmProxyCall::RemoveProxy(ProxyParams { delegate, proxy_type: ProxyType::Any, delay: 0 }); - let call = PalletProxyCall::remove_proxy(delegate, ProxyType::Any, 0); + let call = PalletProxyCall::remove_proxy { delegate, proxy_type: ProxyType::Any, delay: 0 }; let xcm_encoder = xcm_remove_proxy.encoder::(&0); encode_decode_call!(PalletProxyCall, call, xcm_encoder, POLKADOT_PALLET_PROXY_INDEX); @@ -564,7 +582,7 @@ mod tests { let amount = 99; let xmc_call = XcmAssetsCall::Mint(AssetParams { id, beneficiary, amount }); - let call = PalletAssetsCall::mint(id, beneficiary, amount); + let call = PalletAssetsCall::mint { id, beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); @@ -578,7 +596,7 @@ mod tests { let amount = 4572934273; let xmc_call = XcmAssetsCall::Burn(AssetParams { id, beneficiary, amount }); - let call = PalletAssetsCall::burn(id, beneficiary, amount); + let call = PalletAssetsCall::burn { id, who: beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); @@ -592,7 +610,7 @@ mod tests { let amount = 4572934273; let xmc_call = XcmAssetsCall::Transfer(AssetParams { id, beneficiary, amount }); - let call = PalletAssetsCall::transfer(id, beneficiary, amount); + let call = PalletAssetsCall::transfer { id, target: beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); @@ -607,7 +625,7 @@ mod tests { let amount = 4572934273; let xmc_call = XcmAssetsCall::ForceTransfer(id, source, beneficiary, amount); - let call = PalletAssetsCall::force_transfer(id, source, beneficiary, amount); + let call = PalletAssetsCall::force_transfer { id, source, dest: beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); @@ -620,7 +638,7 @@ mod tests { let source = 3249234342; let xmc_call = XcmAssetsCall::Freeze(id, source); - let call = PalletAssetsCall::freeze(id, source); + let call = PalletAssetsCall::freeze { id, who: source }; let xcm_encoder = xmc_call.encoder::(&0); @@ -633,7 +651,7 @@ mod tests { let source = 3249234342; let xmc_call = XcmAssetsCall::Thaw(id, source); - let call = PalletAssetsCall::thaw(id, source); + let call = PalletAssetsCall::thaw { id, who: source }; let xcm_encoder = xmc_call.encoder::(&0); @@ -645,7 +663,7 @@ mod tests { let id = 2342; let xmc_call = XcmAssetsCall::FreezeAsset(id); - let call = PalletAssetsCall::freeze_asset(id); + let call = PalletAssetsCall::freeze_asset { id }; let xcm_encoder = xmc_call.encoder::(&0); @@ -657,7 +675,7 @@ mod tests { let id = 2342; let xmc_call = XcmAssetsCall::ThawAsset(id); - let call = PalletAssetsCall::thaw_asset(id); + let call = PalletAssetsCall::thaw_asset { id }; let xcm_encoder = xmc_call.encoder::(&0); @@ -671,7 +689,7 @@ mod tests { let amount = 4572934273; let xmc_call = XcmAssetsCall::ApproveTransfer(AssetParams { id, beneficiary, amount }); - let call = PalletAssetsCall::approve_transfer(id, beneficiary, amount); + let call = PalletAssetsCall::approve_transfer { id, delegate: beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); @@ -686,7 +704,7 @@ mod tests { let amount = 4572934273; let xmc_call = XcmAssetsCall::TransferApproved(id, source, beneficiary, amount); - let call = PalletAssetsCall::transfer_approved(id, source, beneficiary, amount); + let call = PalletAssetsCall::transfer_approved { id, owner: source, destination: beneficiary, amount }; let xcm_encoder = xmc_call.encoder::(&0); diff --git a/runtime/integration-tests/src/tests.rs b/runtime/integration-tests/src/tests.rs index d8145d06cd..5e0c1f6c8c 100644 --- a/runtime/integration-tests/src/tests.rs +++ b/runtime/integration-tests/src/tests.rs @@ -84,7 +84,6 @@ fn transfer_to_para(relay_deposit_amount: Balance, who: AccountId) { )), Box::new(VersionedMultiAssets::V1((Junctions::Here, relay_deposit_amount).into())), 0, - 600_000_000, )); }); Pint::execute_with(|| { From 5451ed765e14c1876d861a565ff08d420633f474 Mon Sep 17 00:00:00 2001 From: clearloop Date: Tue, 2 Nov 2021 22:31:51 +0800 Subject: [PATCH 18/29] feat(pallets): remove forced runtime-benchmarks features in pallets --- pallets/local-treasury/Cargo.toml | 3 ++- pallets/remote-asset-manager/Cargo.toml | 2 +- pallets/remote-treasury/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pallets/local-treasury/Cargo.toml b/pallets/local-treasury/Cargo.toml index 7cd88dc60d..8c90bc9274 100644 --- a/pallets/local-treasury/Cargo.toml +++ b/pallets/local-treasury/Cargo.toml @@ -22,7 +22,7 @@ serde = { version = "1.0.101" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } @@ -37,6 +37,7 @@ std = [ ] runtime-benchmarks = [ 'frame-benchmarking', + 'frame-system/runtime-benchmarks', 'frame-support/runtime-benchmarks', ] diff --git a/pallets/remote-asset-manager/Cargo.toml b/pallets/remote-asset-manager/Cargo.toml index 99b348534c..1cb58d7718 100644 --- a/pallets/remote-asset-manager/Cargo.toml +++ b/pallets/remote-asset-manager/Cargo.toml @@ -41,7 +41,7 @@ serde = { version = "1.0.101", features = ["derive"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } diff --git a/pallets/remote-treasury/Cargo.toml b/pallets/remote-treasury/Cargo.toml index 8bb4f250bb..2149f54bae 100644 --- a/pallets/remote-treasury/Cargo.toml +++ b/pallets/remote-treasury/Cargo.toml @@ -35,7 +35,7 @@ serde = { version = "1.0.101" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', features = ["runtime-benchmarks"] } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12' } From bc0d278fcff880172510c1d8754c81cbec153dd3 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 10 Nov 2021 12:19:44 +0100 Subject: [PATCH 19/29] fix: failing tests --- Cargo.lock | 58 +++++++++++++------------- Cargo.toml | 48 ++++++++++----------- runtime/integration-tests/src/lib.rs | 5 ++- runtime/integration-tests/src/tests.rs | 13 ++++-- 4 files changed, 66 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96d651d1ce..014f719163 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "sc-cli", "sc-service", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1406,7 +1406,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1436,7 +1436,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "async-trait", "dyn-clone", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1480,7 +1480,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "derive_more 0.99.16", "futures 0.3.17", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "futures 0.3.17", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-common", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "frame-executive", "frame-support", @@ -1573,7 +1573,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", @@ -1620,7 +1620,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2 1.0.30", @@ -1631,7 +1631,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1648,7 +1648,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1666,7 +1666,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1683,11 +1683,11 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff)", + "cumulus-test-relay-sproof-builder 0.1.0 (git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5)", "parity-scale-codec", "polkadot-client", "sc-client-api", @@ -1705,7 +1705,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "sp-inherents", @@ -1716,7 +1716,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1746,7 +1746,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -4823,7 +4823,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "frame-system", @@ -4840,7 +4840,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "frame-system", @@ -4855,7 +4855,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -4873,7 +4873,7 @@ dependencies = [ [[package]] name = "orml-unknown-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "frame-system", @@ -4888,7 +4888,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "parity-scale-codec", @@ -4902,7 +4902,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "frame-support", "orml-traits", @@ -4916,7 +4916,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ee37b76a7a8cf159e6c41851942758746318bb84#ee37b76a7a8cf159e6c41851942758746318bb84" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=d69f226e332ae29b7b33d53d2f06f309d2986ea0#d69f226e332ae29b7b33d53d2f06f309d2986ea0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5259,7 +5259,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6174,7 +6174,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?rev=f5926c2f50df73bf36171b138241437131d76fff#f5926c2f50df73bf36171b138241437131d76fff" +source = "git+https://github.com/paritytech//cumulus?rev=935bac869a72baef17e46d2ae1abc8c0c650cef5#935bac869a72baef17e46d2ae1abc8c0c650cef5" dependencies = [ "cumulus-primitives-core", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index b0ec3a98ee..ea15d0fff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,29 +172,29 @@ polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", rev polkadot-client = { git = "https://github.com/paritytech//polkadot", rev = "5feed981cf0fe671447eabaa9c0d235a8dd0003e" } [patch."https://github.com/paritytech/cumulus"] -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -pallet-collator-selection = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", rev = "f5926c2f50df73bf36171b138241437131d76fff" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +pallet-collator-selection = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", rev = "935bac869a72baef17e46d2ae1abc8c0c650cef5" } [patch."https://github.com/open-web3-stack/open-runtime-module-library"] -orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } -orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } -orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } -orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } -orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } -orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ee37b76a7a8cf159e6c41851942758746318bb84" } +orml-currencies = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } +orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } +orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } +orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } +orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } +orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "d69f226e332ae29b7b33d53d2f06f309d2986ea0" } diff --git a/runtime/integration-tests/src/lib.rs b/runtime/integration-tests/src/lib.rs index 0a8209e70d..b2a2334b89 100644 --- a/runtime/integration-tests/src/lib.rs +++ b/runtime/integration-tests/src/lib.rs @@ -42,6 +42,7 @@ use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chai pub const ALICE: AccountId = AccountId::new([0u8; 32]); pub const ADMIN_ACCOUNT: AccountId = AccountId::new([1u8; 32]); +pub const EMPTY_ACCOUNT: AccountId = AccountId::new([2u8; 32]); pub const RELAY_CHAIN_ASSET: AssetId = 42; pub const PROXY_PALLET_INDEX: u8 = 29u8; pub const STAKING_PALLET_INDEX: u8 = 7u8; @@ -84,8 +85,8 @@ pub fn pint_ext(parachain_id: u32, balances: Vec<(AccountId, Balance)>) -> sp_io minimum_balance: 0, weights: StakingWeights { bond: 650_000_000, - bond_extra: 350_000_000, - unbond: 1000_u64, + bond_extra: 1_350_000_000u64, + unbond: 1_350_000_000u64, withdraw_unbonded: 1000_u64, }, bonding_duration: 1_000, diff --git a/runtime/integration-tests/src/tests.rs b/runtime/integration-tests/src/tests.rs index 5e0c1f6c8c..0483d497a1 100644 --- a/runtime/integration-tests/src/tests.rs +++ b/runtime/integration-tests/src/tests.rs @@ -6,7 +6,8 @@ use crate::{ relay::{self, ProxyType as RelayProxyType, Runtime as RelayRuntime}, relay_sovereign_account, sibling_sovereign_account, statemint, types::*, - Net, Pint, Relay, Statemint, ADMIN_ACCOUNT, ALICE, INITIAL_BALANCE, PARA_ID, RELAY_CHAIN_ASSET, STATEMINT_PARA_ID, + Net, Pint, Relay, Statemint, ADMIN_ACCOUNT, ALICE, EMPTY_ACCOUNT, INITIAL_BALANCE, PARA_ID, RELAY_CHAIN_ASSET, + STATEMINT_PARA_ID, }; use frame_support::{ assert_noop, assert_ok, @@ -172,7 +173,7 @@ fn can_transact_staking() { // `- 1` for avoiding dust account issue // // see also https://github.com/open-web3-stack/open-runtime-module-library/issues/427 - let bond = 1_000 - 1; + let bond = 10_000 - 1; Pint::execute_with(|| { register_relay(); @@ -273,6 +274,7 @@ fn can_transfer_to_statemint() { ), pallet_remote_asset_manager::Error::::StatemintDisabled ); + assert_ok!(pallet_remote_asset_manager::Pallet::::enable_statemint_xcm(pint::Origin::signed( ADMIN_ACCOUNT ))); @@ -286,7 +288,12 @@ fn can_transfer_to_statemint() { // pallet_balances::Error::::InsufficientBalance // ); // - // // transfer from pint -> statemint to mint SPINT + // pallet_remote_asset_manager::Pallet::::transfer_to_statemint( + // pint::Origin::signed(ALICE), + // transfer_amount + // ); + + // transfer from pint -> statemint to mint SPINT // assert_ok!(pallet_remote_asset_manager::Pallet::::transfer_to_statemint( // pint::Origin::signed(ALICE), // transfer_amount From 189ea4946399591ce8d92cef067f32725be6ce85 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 10 Nov 2021 13:51:49 +0100 Subject: [PATCH 20/29] use asset tx pallet --- Cargo.lock | 48 +++-- pallets/transaction-payment/Cargo.toml | 26 +-- pallets/transaction-payment/src/lib.rs | 257 ++++++++++++------------- runtime/dev/Cargo.toml | 3 + 4 files changed, 178 insertions(+), 156 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 74295537a0..4b7f013fa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -842,7 +842,7 @@ dependencies = [ "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", - "pallet-transaction-payment", + "pallet-transaction-payment 4.0.0-dev", "parity-scale-codec", "scale-info", "sp-core", @@ -3387,7 +3387,7 @@ dependencies = [ "pallet-staking-reward-fn", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -4641,7 +4641,7 @@ dependencies = [ "pallet-sudo", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-transaction-storage", "pallet-treasury", @@ -6011,6 +6011,30 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-transaction-payment" +version = "0.0.1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "orml-currencies", + "orml-tokens", + "orml-traits", + "pallet-balances", + "pallet-price-feed", + "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "primitives", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" @@ -6050,7 +6074,7 @@ name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "parity-scale-codec", "sp-api", "sp-runtime", @@ -6686,7 +6710,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -6761,7 +6785,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -6836,7 +6860,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -7663,7 +7687,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -7719,7 +7743,7 @@ dependencies = [ "pallet-session", "pallet-staking", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-treasury", "pallet-vesting", "parity-scale-codec", @@ -8574,7 +8598,7 @@ dependencies = [ "pallet-staking", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", @@ -12176,7 +12200,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 3.0.0", + "pallet-transaction-payment 4.0.0-dev", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -12331,7 +12355,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "pallet-transaction-payment", + "pallet-transaction-payment 4.0.0-dev", "parity-scale-codec", "polkadot-parachain", "scale-info", diff --git a/pallets/transaction-payment/Cargo.toml b/pallets/transaction-payment/Cargo.toml index cf1bdbb6ee..892f1cfe35 100644 --- a/pallets/transaction-payment/Cargo.toml +++ b/pallets/transaction-payment/Cargo.toml @@ -10,18 +10,18 @@ version = '0.0.1' [dependencies] serde = { version = "1.0.124", optional = true } -codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -sp-io= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +sp-io= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.8', default-features = false, optional = true } - -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false } # ORML Dependencies orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } @@ -31,8 +31,8 @@ pallet-price-feed = {path = "../price-feed", default-features = false } primitives = {path = "../../primitives/primitives", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } orml-tokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } @@ -44,6 +44,7 @@ default = ['std'] std = [ "serde", "codec/std", + "scale-info/std", "sp-runtime/std", "frame-support/std", "frame-system/std", @@ -61,3 +62,4 @@ runtime-benchmarks = [ 'frame-support/runtime-benchmarks', 'pallet-price-feed/runtime-benchmarks', ] +try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallets/transaction-payment/src/lib.rs b/pallets/transaction-payment/src/lib.rs index ce79492656..21e9203b13 100644 --- a/pallets/transaction-payment/src/lib.rs +++ b/pallets/transaction-payment/src/lib.rs @@ -25,6 +25,7 @@ use orml_traits::MultiCurrency; use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, InclusionFee}; use primitives::{Balance, AssetId, ReserveIdentifier}; +use scale_info::TypeInfo; use sp_runtime::{ traits::{ Bounded, CheckedSub, Convert, DispatchInfoOf, One, PostDispatchInfoOf, SaturatedConversion, Saturating, @@ -36,7 +37,7 @@ use sp_runtime::{ FixedPointNumber, FixedPointOperand, FixedU128, Perquintill, }; use sp_std::{convert::TryInto, prelude::*, vec}; -use support::{DEXManager, PriceProvider, Ratio, TransactionPayment}; +// use support::{DEXManager, PriceProvider, Ratio, TransactionPayment}; // mod mock; // mod tests; @@ -50,35 +51,32 @@ pub type Multiplier = FixedU128; type PalletBalanceOf = <::Currency as Currency<::AccountId>>::Balance; type NegativeImbalanceOf = -<::Currency as Currency<::AccountId>>::NegativeImbalance; + <::Currency as Currency<::AccountId>>::NegativeImbalance; -/// A struct to update the weight multiplier per block. It implements -/// `Convert`, meaning that it can convert the -/// previous multiplier to the next one. This should be called on -/// `on_finalize` of a block, prior to potentially cleaning the weight data -/// from the system module. +/// A struct to update the weight multiplier per block. It implements `Convert`, meaning that it can convert the previous multiplier to the next one. This should +/// be called on `on_finalize` of a block, prior to potentially cleaning the weight data from the +/// system pallet. /// /// given: -/// s = previous block weight -/// s'= ideal block weight -/// m = maximum block weight -/// diff = (s - s')/m -/// v = 0.00001 -/// t1 = (v * diff) -/// t2 = (v * diff)^2 / 2 -/// then: -/// next_multiplier = prev_multiplier * (1 + t1 + t2) +/// s = previous block weight +/// s'= ideal block weight +/// m = maximum block weight +/// diff = (s - s')/m +/// v = 0.00001 +/// t1 = (v * diff) +/// t2 = (v * diff)^2 / 2 +/// then: +/// next_multiplier = prev_multiplier * (1 + t1 + t2) /// -/// Where `(s', v)` must be given as the `Get` implementation of the `T` -/// generic type. Moreover, `M` must provide the minimum allowed value for -/// the multiplier. Note that a runtime should ensure with tests that the -/// combination of this `M` and `V` is not such that the multiplier can drop -/// to zero and never recover. +/// Where `(s', v)` must be given as the `Get` implementation of the `T` generic type. Moreover, `M` +/// must provide the minimum allowed value for the multiplier. Note that a runtime should ensure +/// with tests that the combination of this `M` and `V` is not such that the multiplier can drop to +/// zero and never recover. /// -/// note that `s'` is interpreted as a portion in the _normal transaction_ -/// capacity of the block. For example, given `s' == 0.25` and -/// `AvailableBlockRatio = 0.75`, then the target fullness is _0.25 of the -/// normal capacity_ and _0.1875 of the entire block_. +/// note that `s'` is interpreted as a portion in the _normal transaction_ capacity of the block. +/// For example, given `s' == 0.25` and `AvailableBlockRatio = 0.75`, then the target fullness is +/// _0.25 of the normal capacity_ and _0.1875 of the entire block_. /// /// This implementation implies the bound: /// - `v ≤ p / k * (s − s')` @@ -90,17 +88,16 @@ type NegativeImbalanceOf = /// - in a fully congested chain: `p >= v * k * (1 - s')`. /// - in an empty chain: `p >= v * k * (-s')`. /// -/// For example, when all blocks are full and there are 28800 blocks per day -/// (default in `substrate-node`) and v == 0.00001, s' == 0.1875, we'd have: +/// For example, when all blocks are full and there are 28800 blocks per day (default in +/// `substrate-node`) and v == 0.00001, s' == 0.1875, we'd have: /// /// p >= 0.00001 * 28800 * 0.8125 /// p >= 0.234 /// -/// Meaning that fees can change by around ~23% per day, given extreme -/// congestion. +/// Meaning that fees can change by around ~23% per day, given extreme congestion. /// /// More info can be found at: -/// https://w3f-research.readthedocs.io/en/latest/polkadot/Token%20Economics.html +/// pub struct TargetedFeeAdjustment(sp_std::marker::PhantomData<(T, S, V, M)>); /// Something that can convert the current multiplier to the next one. @@ -126,11 +123,11 @@ impl MultiplierUpdate for () { } impl MultiplierUpdate for TargetedFeeAdjustment - where - T: frame_system::Config, - S: Get, - V: Get, - M: Get, +where + T: frame_system::Config, + S: Get, + V: Get, + M: Get, { fn min() -> Multiplier { M::get() @@ -144,16 +141,16 @@ impl MultiplierUpdate for TargetedFeeAdjustment } impl Convert for TargetedFeeAdjustment - where - T: frame_system::Config, - S: Get, - V: Get, - M: Get, +where + T: frame_system::Config, + S: Get, + V: Get, + M: Get, { fn convert(previous: Multiplier) -> Multiplier { - // Defensive only. The multiplier in storage should always be at most positive. - // Nonetheless we recover here in case of errors, because any value below this - // would be stale and can never change. + // Defensive only. The multiplier in storage should always be at most positive. Nonetheless + // we recover here in case of errors, because any value below this would be stale and can + // never change. let min_multiplier = M::get(); let previous = previous.max(min_multiplier); @@ -162,9 +159,10 @@ impl Convert for TargetedFeeAdjustment>::block_weight(); - let normal_block_weight = *current_block_weight.get(DispatchClass::Normal).min(&normal_max_weight); + let normal_block_weight = + *current_block_weight.get(DispatchClass::Normal).min(&normal_max_weight); let s = S::get(); let v = V::get(); @@ -176,8 +174,8 @@ impl Convert for TargetedFeeAdjustment= target_weight; let diff_abs = block_weight.max(target_weight) - block_weight.min(target_weight); - // defensive only, a test case assures that the maximum weight diff can fit in - // Multiplier without any saturation. + // defensive only, a test case assures that the maximum weight diff can fit in Multiplier + // without any saturation. let diff = Multiplier::saturating_from_rational(diff_abs, normal_max_weight.max(1)); let diff_squared = diff.saturating_mul(diff); @@ -206,8 +204,8 @@ pub mod module { #[pallet::config] pub trait Config: frame_system::Config { - /// Native currency id, the actual received asset type as fee for - /// treasury. Should be PINT + /// Native currency id, the actual received currency type as fee for + /// treasury. Should be ACA #[pallet::constant] type NativeAssetId: Get; @@ -217,9 +215,9 @@ pub mod module { /// The currency type in which fees will be paid. type Currency: Currency - + NamedReservableCurrency - + Send - + Sync; + + NamedReservableCurrency + + Send + + Sync; /// Currency to transfer, reserve/unreserve, lock/unlock assets type MultiCurrency: MultiCurrency; @@ -244,16 +242,16 @@ pub mod module { /// DEX to exchange currencies. type DEX: DEXManager; - // /// When swap with DEX, the acceptable max slippage for the price from oracle. - // #[pallet::constant] - // type MaxSwapSlippageCompareToOracle: Get; + /// When swap with DEX, the acceptable max slippage for the price from oracle. + #[pallet::constant] + type MaxSwapSlippageCompareToOracle: Get; - // /// The limit for length of trading path - // #[pallet::constant] - // type TradingPathLimit: Get; + /// The limit for length of trading path + #[pallet::constant] + type TradingPathLimit: Get; /// The price source to provider external market price. - type NavProvider: NavProvider; + type PriceSource: PriceProvider; /// Weight information for the extrinsics in this module. type WeightInfo: WeightInfo; @@ -276,6 +274,8 @@ pub mod module { #[pallet::error] pub enum Error { + /// The swap path is invalid + InvalidSwapPath, } /// The next fee multiplier. @@ -304,9 +304,9 @@ pub mod module { #[cfg(feature = "std")] fn integrity_test() { - // given weight == u64, we build multipliers from `diff` of two weight values, - // which can at most be MaximumBlockWeight. Make sure that this can fit in a - // multiplier without loss. + // given weight == u64, we build multipliers from `diff` of two weight values, which can + // at most be maximum block weight. Make sure that this can fit in a multiplier without + // loss. use sp_std::convert::TryInto; assert!( ::max_value() @@ -352,43 +352,37 @@ pub mod module { } impl Pallet - where - PalletBalanceOf: FixedPointOperand, +where + PalletBalanceOf: FixedPointOperand, { /// Query the data that we know about the fee of a given `call`. /// - /// This module is not and cannot be aware of the internals of a signed - /// extension, for example a tip. It only interprets the extrinsic as - /// some encoded value and accounts for its weight and length, the - /// runtime's extrinsic base weight, and the current fee multiplier. + /// This pallet is not and cannot be aware of the internals of a signed extension, for example + /// a tip. It only interprets the extrinsic as some encoded value and accounts for its weight + /// and length, the runtime's extrinsic base weight, and the current fee multiplier. /// - /// All dispatchables must be annotated with weight and will have some - /// fee info. This function always returns. + /// All dispatchables must be annotated with weight and will have some fee info. This function + /// always returns. pub fn query_info( unchecked_extrinsic: Extrinsic, len: u32, ) -> RuntimeDispatchInfo> - where - T: Send + Sync, - PalletBalanceOf: Send + Sync, - ::Call: Dispatchable, + where + T: Send + Sync, + PalletBalanceOf: Send + Sync, + ::Call: Dispatchable, { - // NOTE: we can actually make it understand `ChargeTransactionPayment`, but - // would be some hassle for sure. We have to make it aware of the index of - // `ChargeTransactionPayment` in `Extra`. Alternatively, we could actually - // execute the tx's per-dispatch and record the balance of the sender before and - // after the pipeline.. but this is way too much hassle for a very very little - // potential gain in the future. + // NOTE: we can actually make it understand `ChargeTransactionPayment`, but would be some + // hassle for sure. We have to make it aware of the index of `ChargeTransactionPayment` in + // `Extra`. Alternatively, we could actually execute the tx's per-dispatch and record the + // balance of the sender before and after the pipeline.. but this is way too much hassle for + // a very very little potential gain in the future. let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); let partial_fee = Self::compute_fee(len, &dispatch_info, 0u32.into()); let DispatchInfo { weight, class, .. } = dispatch_info; - RuntimeDispatchInfo { - weight, - class, - partial_fee, - } + RuntimeDispatchInfo { weight, class, partial_fee } } /// Query the detailed fee of a given `call`. @@ -396,13 +390,25 @@ impl Pallet unchecked_extrinsic: Extrinsic, len: u32, ) -> FeeDetails> - where - T::Call: Dispatchable, + where + T::Call: Dispatchable, { let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); Self::compute_fee_details(len, &dispatch_info, 0u32.into()) } + /// Compute the fee details for a particular transaction. + pub fn compute_fee_details( + len: u32, + info: &DispatchInfoOf, + tip: PalletBalanceOf, + ) -> FeeDetails> + where + T::Call: Dispatchable, + { + Self::compute_fee_raw(len, info.weight, tip, info.pays_fee, info.class) + } + /// Compute the final fee value for a particular transaction. /// /// The final fee is composed of: @@ -430,24 +436,12 @@ impl Pallet info: &DispatchInfoOf<::Call>, tip: PalletBalanceOf, ) -> PalletBalanceOf - where - ::Call: Dispatchable, + where + ::Call: Dispatchable, { Self::compute_fee_details(len, info, tip).final_fee() } - /// Compute the fee details for a particular transaction. - pub fn compute_fee_details( - len: u32, - info: &DispatchInfoOf, - tip: PalletBalanceOf, - ) -> FeeDetails> - where - T::Call: Dispatchable, - { - Self::compute_fee_raw(len, info.weight, tip, info.pays_fee, info.class) - } - /// Compute the actual post dispatch fee details for a particular /// transaction. pub fn compute_actual_fee_details( @@ -456,8 +450,8 @@ impl Pallet post_info: &PostDispatchInfoOf, tip: PalletBalanceOf, ) -> FeeDetails> - where - T::Call: Dispatchable, + where + T::Call: Dispatchable, { Self::compute_fee_raw( len, @@ -478,8 +472,8 @@ impl Pallet post_info: &PostDispatchInfoOf<::Call>, tip: PalletBalanceOf, ) -> PalletBalanceOf - where - ::Call: Dispatchable, + where + ::Call: Dispatchable, { Self::compute_actual_fee_details(len, info, post_info, tip).final_fee() } @@ -535,10 +529,10 @@ impl Pallet // check native balance if is enough let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native && ::Currency::free_balance(who) - .checked_sub(&fee) - .map_or(false, |new_free_balance| { - ::Currency::ensure_can_withdraw(who, fee, reason, new_free_balance).is_ok() - }); + .checked_sub(&fee) + .map_or(false, |new_free_balance| { + ::Currency::ensure_can_withdraw(who, fee, reason, new_free_balance).is_ok() + }); // native is not enough, try swap native to pay fee and gap if !native_is_enough { @@ -560,7 +554,7 @@ impl Pallet // calculate the supply limit according to oracle price and the slippage limit, // if oracle price is not avalible, do not limit let max_supply_limit = if let Some(target_price) = - T::PriceSource::get_relative_price(*target_currency_id, supply_currency_id) + T::PriceSource::get_relative_price(*target_currency_id, supply_currency_id) { Ratio::one() .saturating_sub(T::MaxSwapSlippageCompareToOracle::get()) @@ -578,7 +572,7 @@ impl Pallet ::MultiCurrency::free_balance(supply_currency_id, who) .min(max_supply_limit.unique_saturated_into()), ) - .is_ok() + .is_ok() { // successfully swap, break iteration break; @@ -592,9 +586,9 @@ impl Pallet } impl Convert> for Pallet - where - T: Config, - PalletBalanceOf: FixedPointOperand, +where + T: Config, + PalletBalanceOf: FixedPointOperand, { /// Compute the fee for the specified weight. /// @@ -609,8 +603,9 @@ impl Convert> for Pallet /// Require the transactor pay for themselves and maybe include a tip to /// gain additional priority in the queue. -#[derive(Encode, Decode, Clone, Eq, PartialEq)] -pub struct ChargeTransactionPayment(#[codec(compact)] PalletBalanceOf); +#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] +#[scale_info(skip_type_params(T))] +pub struct ChargeTransactionPayment(#[codec(compact)] pub PalletBalanceOf); impl sp_std::fmt::Debug for ChargeTransactionPayment { #[cfg(feature = "std")] @@ -624,9 +619,9 @@ impl sp_std::fmt::Debug for ChargeTransactionPayment } impl ChargeTransactionPayment - where - ::Call: Dispatchable, - PalletBalanceOf: Send + Sync + FixedPointOperand, +where + ::Call: Dispatchable, + PalletBalanceOf: Send + Sync + FixedPointOperand, { /// utility constructor. Used only in client/factory code. pub fn from(fee: PalletBalanceOf) -> Self { @@ -647,7 +642,6 @@ impl ChargeTransactionPayment if fee.is_zero() { return Ok((fee, None)); } - // TODO let reason = if tip.is_zero() { WithdrawReasons::TRANSACTION_PAYMENT @@ -694,9 +688,9 @@ impl ChargeTransactionPayment } impl SignedExtension for ChargeTransactionPayment - where - PalletBalanceOf: Send + Sync + From + FixedPointOperand, - ::Call: Dispatchable, +where + PalletBalanceOf: Send + Sync + From + FixedPointOperand, + ::Call: Dispatchable, { const IDENTIFIER: &'static str = "ChargeTransactionPayment"; type AccountId = T::AccountId; @@ -745,7 +739,6 @@ impl SignedExtension for ChargeTransactionPayment len: usize, _result: &DispatchResult, ) -> Result<(), TransactionValidityError> { - // TODO let (tip, who, imbalance, fee) = pre; if let Some(payed) = imbalance { let actual_fee = Pallet::::compute_actual_fee(len as u32, info, post_info, tip); @@ -774,19 +767,19 @@ impl SignedExtension for ChargeTransactionPayment } impl TransactionPayment, NegativeImbalanceOf> -for ChargeTransactionPayment - where - PalletBalanceOf: Send + Sync + FixedPointOperand, + for ChargeTransactionPayment +where + PalletBalanceOf: Send + Sync + FixedPointOperand, { fn reserve_fee(who: &T::AccountId, weight: Weight) -> Result, DispatchError> { let fee = Pallet::::weight_to_fee(weight); Pallet::::ensure_can_charge_fee(who, fee, WithdrawReasons::TRANSACTION_PAYMENT); - ::Currency::reserve_named(&RESERVE_ID, &who, fee)?; + ::Currency::reserve_named(&RESERVE_ID, who, fee)?; Ok(fee) } fn unreserve_fee(who: &T::AccountId, fee: PalletBalanceOf) { - ::Currency::unreserve_named(&RESERVE_ID, &who, fee); + ::Currency::unreserve_named(&RESERVE_ID, who, fee); } fn unreserve_and_charge_fee( @@ -794,7 +787,7 @@ for ChargeTransactionPayment weight: Weight, ) -> Result<(PalletBalanceOf, NegativeImbalanceOf), TransactionValidityError> { let fee = Pallet::::weight_to_fee(weight); - ::Currency::unreserve_named(&RESERVE_ID, &who, fee); + ::Currency::unreserve_named(&RESERVE_ID, who, fee); match ::Currency::withdraw( who, @@ -813,7 +806,7 @@ for ChargeTransactionPayment payed: NegativeImbalanceOf, ) -> Result<(), TransactionValidityError> { let refund = Pallet::::weight_to_fee(refund_weight); - let actual_payment = match ::Currency::deposit_into_existing(&who, refund) { + let actual_payment = match ::Currency::deposit_into_existing(who, refund) { Ok(refund_imbalance) => { // The refund cannot be larger than the up front payed max weight. match payed.offset(refund_imbalance) { @@ -852,7 +845,7 @@ for ChargeTransactionPayment WithdrawReasons::TRANSACTION_PAYMENT, ExistenceRequirement::KeepAlive, ) - .map_err(|_| InvalidTransaction::Payment)?; + .map_err(|_| InvalidTransaction::Payment)?; // distribute fee ::OnTransactionPayment::on_unbalanced(actual_payment); diff --git a/runtime/dev/Cargo.toml b/runtime/dev/Cargo.toml index d3dfce57cc..f7fc269318 100644 --- a/runtime/dev/Cargo.toml +++ b/runtime/dev/Cargo.toml @@ -68,6 +68,8 @@ cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branc cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.12", default-features = false } parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } +pallet-asset-tx-payment = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.12', default-features = false } + # Polkadot Dependencies polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } @@ -164,6 +166,7 @@ std = [ 'pallet-session/std', 'pallet-transaction-payment/std', 'pallet-xcm/std', + 'pallet-asset-tx-payment/std', 'parachain-info/std', 'cumulus-pallet-aura-ext/std', From 68508f408e446bf774912a15b4388894f6093e69 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 10 Nov 2021 17:39:45 +0100 Subject: [PATCH 21/29] use asset tx pallet --- Cargo.lock | 70 +- pallets/transaction-payment/Cargo.toml | 65 -- pallets/transaction-payment/README.md | 1 - pallets/transaction-payment/src/lib.rs | 854 ------------------------- runtime/common/Cargo.toml | 6 +- runtime/common/src/lib.rs | 1 + runtime/common/src/payment.rs | 42 ++ runtime/dev/src/lib.rs | 9 +- runtime/kusama/Cargo.toml | 1 + runtime/kusama/src/lib.rs | 9 +- runtime/polkadot/Cargo.toml | 2 + runtime/polkadot/src/lib.rs | 9 +- 12 files changed, 109 insertions(+), 960 deletions(-) delete mode 100644 pallets/transaction-payment/Cargo.toml delete mode 100644 pallets/transaction-payment/README.md delete mode 100644 pallets/transaction-payment/src/lib.rs create mode 100644 runtime/common/src/payment.rs diff --git a/Cargo.lock b/Cargo.lock index 4b7f013fa4..19cf8a6627 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -842,7 +842,7 @@ dependencies = [ "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", "sp-core", @@ -3387,7 +3387,7 @@ dependencies = [ "pallet-staking-reward-fn", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -4641,7 +4641,7 @@ dependencies = [ "pallet-sudo", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-transaction-storage", "pallet-treasury", @@ -4999,6 +4999,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-asset-tx-payment" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.12#935bac869a72baef17e46d2ae1abc8c0c650cef5" +dependencies = [ + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -6011,30 +6028,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-transaction-payment" -version = "0.0.1" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "orml-currencies", - "orml-tokens", - "orml-traits", - "pallet-balances", - "pallet-price-feed", - "pallet-transaction-payment 4.0.0-dev", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "primitives", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" @@ -6074,7 +6067,7 @@ name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" source = "git+https://github.com/paritytech//substrate?rev=d76f39995315ec36980908e4b99709bd14927044#d76f39995315ec36980908e4b99709bd14927044" dependencies = [ - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "parity-scale-codec", "sp-api", "sp-runtime", @@ -6658,7 +6651,9 @@ dependencies = [ "pallet-price-feed", "pallet-remote-asset-manager", "pallet-saft-registry", + "parity-scale-codec", "primitives", + "scale-info", "sp-std", "xcm", "xcm-calls", @@ -6694,6 +6689,7 @@ dependencies = [ "orml-xtokens", "pallet-asset-index", "pallet-asset-index-rpc-runtime-api", + "pallet-asset-tx-payment", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -6710,7 +6706,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -6769,6 +6765,7 @@ dependencies = [ "orml-xtokens", "pallet-asset-index", "pallet-asset-index-rpc-runtime-api", + "pallet-asset-tx-payment", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -6785,7 +6782,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -6844,6 +6841,7 @@ dependencies = [ "orml-xtokens", "pallet-asset-index", "pallet-asset-index-rpc-runtime-api", + "pallet-asset-tx-payment", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -6860,7 +6858,7 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachain-info", @@ -7687,7 +7685,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -7743,7 +7741,7 @@ dependencies = [ "pallet-session", "pallet-staking", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", "parity-scale-codec", @@ -8598,7 +8596,7 @@ dependencies = [ "pallet-staking", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", @@ -12200,7 +12198,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", @@ -12355,7 +12353,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "pallet-transaction-payment 4.0.0-dev", + "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain", "scale-info", diff --git a/pallets/transaction-payment/Cargo.toml b/pallets/transaction-payment/Cargo.toml deleted file mode 100644 index 892f1cfe35..0000000000 --- a/pallets/transaction-payment/Cargo.toml +++ /dev/null @@ -1,65 +0,0 @@ -[package] -authors = ['ChainSafe Systems'] -description = 'FRAME pallet to charge fees in different currencies.' -edition = '2018' -license = 'LGPL-3.0-only' -name = 'pallet-transaction-payment' -readme = 'README.md' -repository = 'https://github.com/ChainSafe/PINT/' -version = '0.0.1' - -[dependencies] -serde = { version = "1.0.124", optional = true } -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } - -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -sp-io= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false, optional = true } - - -# ORML Dependencies -orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master', default-features = false } - -# PINT dependencies -pallet-price-feed = {path = "../price-feed", default-features = false } -primitives = {path = "../../primitives/primitives", default-features = false } - -[dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -orml-tokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } -orml-currencies = { git = 'https://github.com/open-web3-stack/open-runtime-module-library', branch = 'master' } - -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] - -[features] -default = ['std'] -std = [ - "serde", - "codec/std", - "scale-info/std", - "sp-runtime/std", - "frame-support/std", - "frame-system/std", - "sp-io/std", - "sp-std/std", - "pallet-transaction-payment/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "orml-traits/std", - - "primitives/std", - "pallet-price-feed/std" -] -runtime-benchmarks = [ - 'frame-benchmarking', - 'frame-support/runtime-benchmarks', - 'pallet-price-feed/runtime-benchmarks', -] -try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallets/transaction-payment/README.md b/pallets/transaction-payment/README.md deleted file mode 100644 index e850d9c23f..0000000000 --- a/pallets/transaction-payment/README.md +++ /dev/null @@ -1 +0,0 @@ -License: LGPL-3.0-only \ No newline at end of file diff --git a/pallets/transaction-payment/src/lib.rs b/pallets/transaction-payment/src/lib.rs deleted file mode 100644 index 21e9203b13..0000000000 --- a/pallets/transaction-payment/src/lib.rs +++ /dev/null @@ -1,854 +0,0 @@ -// Copyright 2021 ChainSafe Systems -// SPDX-License-Identifier: LGPL-3.0-only - -//! # Transaction Payment Pallet -//! -//! ## Overview -//! -//! Transaction payment pallet is responsible for charge fee and tip in -//! different assets - -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::unused_unit)] - -use frame_support::{ - dispatch::{DispatchResult, Dispatchable}, - pallet_prelude::*, - traits::{ - Currency, ExistenceRequirement, Imbalance, NamedReservableCurrency, OnUnbalanced, SameOrOther, WithdrawReasons, - }, - weights::{DispatchInfo, GetDispatchInfo, Pays, PostDispatchInfo, WeightToFeeCoefficient, WeightToFeePolynomial}, - BoundedVec, -}; -use frame_system::pallet_prelude::*; -use orml_traits::MultiCurrency; -use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; -use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, InclusionFee}; -use primitives::{Balance, AssetId, ReserveIdentifier}; -use scale_info::TypeInfo; -use sp_runtime::{ - traits::{ - Bounded, CheckedSub, Convert, DispatchInfoOf, One, PostDispatchInfoOf, SaturatedConversion, Saturating, - SignedExtension, UniqueSaturatedInto, Zero, - }, - transaction_validity::{ - InvalidTransaction, TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransaction, - }, - FixedPointNumber, FixedPointOperand, FixedU128, Perquintill, -}; -use sp_std::{convert::TryInto, prelude::*, vec}; -// use support::{DEXManager, PriceProvider, Ratio, TransactionPayment}; - -// mod mock; -// mod tests; -// pub mod weights; - -pub use module::*; -pub use weights::WeightInfo; - -/// Fee multiplier. -pub type Multiplier = FixedU128; - -type PalletBalanceOf = <::Currency as Currency<::AccountId>>::Balance; -type NegativeImbalanceOf = - <::Currency as Currency<::AccountId>>::NegativeImbalance; - -/// A struct to update the weight multiplier per block. It implements `Convert`, meaning that it can convert the previous multiplier to the next one. This should -/// be called on `on_finalize` of a block, prior to potentially cleaning the weight data from the -/// system pallet. -/// -/// given: -/// s = previous block weight -/// s'= ideal block weight -/// m = maximum block weight -/// diff = (s - s')/m -/// v = 0.00001 -/// t1 = (v * diff) -/// t2 = (v * diff)^2 / 2 -/// then: -/// next_multiplier = prev_multiplier * (1 + t1 + t2) -/// -/// Where `(s', v)` must be given as the `Get` implementation of the `T` generic type. Moreover, `M` -/// must provide the minimum allowed value for the multiplier. Note that a runtime should ensure -/// with tests that the combination of this `M` and `V` is not such that the multiplier can drop to -/// zero and never recover. -/// -/// note that `s'` is interpreted as a portion in the _normal transaction_ capacity of the block. -/// For example, given `s' == 0.25` and `AvailableBlockRatio = 0.75`, then the target fullness is -/// _0.25 of the normal capacity_ and _0.1875 of the entire block_. -/// -/// This implementation implies the bound: -/// - `v ≤ p / k * (s − s')` -/// - or, solving for `p`: `p >= v * k * (s - s')` -/// -/// where `p` is the amount of change over `k` blocks. -/// -/// Hence: -/// - in a fully congested chain: `p >= v * k * (1 - s')`. -/// - in an empty chain: `p >= v * k * (-s')`. -/// -/// For example, when all blocks are full and there are 28800 blocks per day (default in -/// `substrate-node`) and v == 0.00001, s' == 0.1875, we'd have: -/// -/// p >= 0.00001 * 28800 * 0.8125 -/// p >= 0.234 -/// -/// Meaning that fees can change by around ~23% per day, given extreme congestion. -/// -/// More info can be found at: -/// -pub struct TargetedFeeAdjustment(sp_std::marker::PhantomData<(T, S, V, M)>); - -/// Something that can convert the current multiplier to the next one. -pub trait MultiplierUpdate: Convert { - /// Minimum multiplier - fn min() -> Multiplier; - /// Target block saturation level - fn target() -> Perquintill; - /// Variability factor - fn variability() -> Multiplier; -} - -impl MultiplierUpdate for () { - fn min() -> Multiplier { - Default::default() - } - fn target() -> Perquintill { - Default::default() - } - fn variability() -> Multiplier { - Default::default() - } -} - -impl MultiplierUpdate for TargetedFeeAdjustment -where - T: frame_system::Config, - S: Get, - V: Get, - M: Get, -{ - fn min() -> Multiplier { - M::get() - } - fn target() -> Perquintill { - S::get() - } - fn variability() -> Multiplier { - V::get() - } -} - -impl Convert for TargetedFeeAdjustment -where - T: frame_system::Config, - S: Get, - V: Get, - M: Get, -{ - fn convert(previous: Multiplier) -> Multiplier { - // Defensive only. The multiplier in storage should always be at most positive. Nonetheless - // we recover here in case of errors, because any value below this would be stale and can - // never change. - let min_multiplier = M::get(); - let previous = previous.max(min_multiplier); - - let weights = T::BlockWeights::get(); - // the computed ratio is only among the normal class. - let normal_max_weight = weights - .get(DispatchClass::Normal) - .max_total - .unwrap_or_else(|| weights.max_block); - let current_block_weight = >::block_weight(); - let normal_block_weight = - *current_block_weight.get(DispatchClass::Normal).min(&normal_max_weight); - - let s = S::get(); - let v = V::get(); - - let target_weight = (s * normal_max_weight) as u128; - let block_weight = normal_block_weight as u128; - - // determines if the first_term is positive - let positive = block_weight >= target_weight; - let diff_abs = block_weight.max(target_weight) - block_weight.min(target_weight); - - // defensive only, a test case assures that the maximum weight diff can fit in Multiplier - // without any saturation. - let diff = Multiplier::saturating_from_rational(diff_abs, normal_max_weight.max(1)); - let diff_squared = diff.saturating_mul(diff); - - let v_squared_2 = v.saturating_mul(v) / Multiplier::saturating_from_integer(2); - - let first_term = v.saturating_mul(diff); - let second_term = v_squared_2.saturating_mul(diff_squared); - - if positive { - let excess = first_term.saturating_add(second_term).saturating_mul(previous); - previous.saturating_add(excess).max(min_multiplier) - } else { - // Defensive-only: first_term > second_term. Safe subtraction. - let negative = first_term.saturating_sub(second_term).saturating_mul(previous); - previous.saturating_sub(negative).max(min_multiplier) - } - } -} - -#[frame_support::pallet] -pub mod module { - use super::*; - use primitives::traits::NavProvider; - - pub const RESERVE_ID: ReserveIdentifier = ReserveIdentifier::TransactionPayment; - - #[pallet::config] - pub trait Config: frame_system::Config { - /// Native currency id, the actual received currency type as fee for - /// treasury. Should be ACA - #[pallet::constant] - type NativeAssetId: Get; - - /// Default fee swap path list - #[pallet::constant] - type DefaultFeeSwapPathList: Get>>; - - /// The currency type in which fees will be paid. - type Currency: Currency - + NamedReservableCurrency - + Send - + Sync; - - /// Currency to transfer, reserve/unreserve, lock/unlock assets - type MultiCurrency: MultiCurrency; - - /// Handler for the unbalanced reduction when taking transaction fees. - /// This is either one or two separate imbalances, the first is the - /// transaction fee paid, the second is the tip paid, if any. - type OnTransactionPayment: OnUnbalanced>; - - /// The fee to be paid for making a transaction; the per-byte portion. - #[pallet::constant] - type TransactionByteFee: Get>; - - /// Convert a weight value into a deductible fee based on the currency - /// type. - type WeightToFee: WeightToFeePolynomial>; - - /// Update the multiplier of the next block, based on the previous - /// block's weight. - type FeeMultiplierUpdate: MultiplierUpdate; - - /// DEX to exchange currencies. - type DEX: DEXManager; - - /// When swap with DEX, the acceptable max slippage for the price from oracle. - #[pallet::constant] - type MaxSwapSlippageCompareToOracle: Get; - - /// The limit for length of trading path - #[pallet::constant] - type TradingPathLimit: Get; - - /// The price source to provider external market price. - type PriceSource: PriceProvider; - - /// Weight information for the extrinsics in this module. - type WeightInfo: WeightInfo; - } - - #[pallet::extra_constants] - impl Pallet { - //TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. - #[allow(non_snake_case)] - /// The polynomial that is applied in order to derive fee from weight. - fn WeightToFee() -> Vec>> { - T::WeightToFee::polynomial().to_vec() - } - } - - #[pallet::type_value] - pub fn DefaultFeeMultiplier() -> Multiplier { - Multiplier::saturating_from_integer(1) - } - - #[pallet::error] - pub enum Error { - /// The swap path is invalid - InvalidSwapPath, - } - - /// The next fee multiplier. - /// - /// NextFeeMultiplier: Multiplier - #[pallet::storage] - #[pallet::getter(fn next_fee_multiplier)] - pub type NextFeeMultiplier = StorageValue<_, Multiplier, ValueQuery, DefaultFeeMultiplier>; - - - #[pallet::pallet] - pub struct Pallet(_); - - #[pallet::hooks] - impl Hooks for Pallet { - /// `on_initialize` to return the weight used in `on_finalize`. - fn on_initialize(_: T::BlockNumber) -> Weight { - ::WeightInfo::on_finalize() - } - - fn on_finalize(_: T::BlockNumber) { - NextFeeMultiplier::::mutate(|fm| { - *fm = T::FeeMultiplierUpdate::convert(*fm); - }); - } - - #[cfg(feature = "std")] - fn integrity_test() { - // given weight == u64, we build multipliers from `diff` of two weight values, which can - // at most be maximum block weight. Make sure that this can fit in a multiplier without - // loss. - use sp_std::convert::TryInto; - assert!( - ::max_value() - >= Multiplier::checked_from_integer(T::BlockWeights::get().max_block.try_into().unwrap()).unwrap(), - ); - - // This is the minimum value of the multiplier. Make sure that if we collapse to - // this value, we can recover with a reasonable amount of traffic. For this test - // we assert that if we collapse to minimum, the trend will be positive with a - // weight value which is 1% more than the target. - let min_value = T::FeeMultiplierUpdate::min(); - let mut target = T::FeeMultiplierUpdate::target() - * T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect( - "Setting `max_total` for `Normal` dispatch class is not compatible with \ - `transaction-payment` pallet.", - ); - - // add 1 percent; - let addition = target / 100; - if addition == 0 { - // this is most likely because in a test setup we set everything to (). - return; - } - target += addition; - - #[cfg(any(feature = "std", test))] - sp_io::TestExternalities::new_empty().execute_with(|| { - >::set_block_consumed_resources(target, 0); - let next = T::FeeMultiplierUpdate::convert(min_value); - assert!( - next > min_value, - "The minimum bound of the multiplier is too low. When \ - block saturation is more than target by 1% and multiplier is minimal then \ - the multiplier doesn't increase." - ); - }) - } - } - - #[pallet::call] - impl Pallet { - } -} - -impl Pallet -where - PalletBalanceOf: FixedPointOperand, -{ - /// Query the data that we know about the fee of a given `call`. - /// - /// This pallet is not and cannot be aware of the internals of a signed extension, for example - /// a tip. It only interprets the extrinsic as some encoded value and accounts for its weight - /// and length, the runtime's extrinsic base weight, and the current fee multiplier. - /// - /// All dispatchables must be annotated with weight and will have some fee info. This function - /// always returns. - pub fn query_info( - unchecked_extrinsic: Extrinsic, - len: u32, - ) -> RuntimeDispatchInfo> - where - T: Send + Sync, - PalletBalanceOf: Send + Sync, - ::Call: Dispatchable, - { - // NOTE: we can actually make it understand `ChargeTransactionPayment`, but would be some - // hassle for sure. We have to make it aware of the index of `ChargeTransactionPayment` in - // `Extra`. Alternatively, we could actually execute the tx's per-dispatch and record the - // balance of the sender before and after the pipeline.. but this is way too much hassle for - // a very very little potential gain in the future. - let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); - - let partial_fee = Self::compute_fee(len, &dispatch_info, 0u32.into()); - let DispatchInfo { weight, class, .. } = dispatch_info; - - RuntimeDispatchInfo { weight, class, partial_fee } - } - - /// Query the detailed fee of a given `call`. - pub fn query_fee_details( - unchecked_extrinsic: Extrinsic, - len: u32, - ) -> FeeDetails> - where - T::Call: Dispatchable, - { - let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); - Self::compute_fee_details(len, &dispatch_info, 0u32.into()) - } - - /// Compute the fee details for a particular transaction. - pub fn compute_fee_details( - len: u32, - info: &DispatchInfoOf, - tip: PalletBalanceOf, - ) -> FeeDetails> - where - T::Call: Dispatchable, - { - Self::compute_fee_raw(len, info.weight, tip, info.pays_fee, info.class) - } - - /// Compute the final fee value for a particular transaction. - /// - /// The final fee is composed of: - /// - `base_fee`: This is the minimum amount a user pays for a transaction. It is declared as - /// a base _weight_ in the runtime and converted to a fee using `WeightToFee`. - /// - `len_fee`: The length fee, the amount paid for the encoded length (in bytes) of the - /// transaction. - /// - `weight_fee`: This amount is computed based on the weight of the transaction. Weight - /// accounts for the execution time of a transaction. - /// - `targeted_fee_adjustment`: This is a multiplier that can tune the final fee based on the - /// congestion of the network. - /// - (Optional) `tip`: If included in the transaction, the tip will be added on top. Only - /// signed transactions can have a tip. - /// - /// The base fee and adjusted weight and length fees constitute the - /// _inclusion fee,_ which is the minimum fee for a transaction to be - /// included in a block. - /// - /// ```ignore - /// inclusion_fee = base_fee + len_fee + [targeted_fee_adjustment * weight_fee]; - /// final_fee = inclusion_fee + tip; - /// ``` - pub fn compute_fee( - len: u32, - info: &DispatchInfoOf<::Call>, - tip: PalletBalanceOf, - ) -> PalletBalanceOf - where - ::Call: Dispatchable, - { - Self::compute_fee_details(len, info, tip).final_fee() - } - - /// Compute the actual post dispatch fee details for a particular - /// transaction. - pub fn compute_actual_fee_details( - len: u32, - info: &DispatchInfoOf, - post_info: &PostDispatchInfoOf, - tip: PalletBalanceOf, - ) -> FeeDetails> - where - T::Call: Dispatchable, - { - Self::compute_fee_raw( - len, - post_info.calc_actual_weight(info), - tip, - post_info.pays_fee(info), - info.class, - ) - } - - /// Compute the actual post dispatch fee for a particular transaction. - /// - /// Identical to `compute_fee` with the only difference that the post - /// dispatch corrected weight is used for the weight fee calculation. - pub fn compute_actual_fee( - len: u32, - info: &DispatchInfoOf<::Call>, - post_info: &PostDispatchInfoOf<::Call>, - tip: PalletBalanceOf, - ) -> PalletBalanceOf - where - ::Call: Dispatchable, - { - Self::compute_actual_fee_details(len, info, post_info, tip).final_fee() - } - - fn compute_fee_raw( - len: u32, - weight: Weight, - tip: PalletBalanceOf, - pays_fee: Pays, - class: DispatchClass, - ) -> FeeDetails> { - if pays_fee == Pays::Yes { - let len = >::from(len); - let per_byte = T::TransactionByteFee::get(); - - // length fee. this is not adjusted. - let fixed_len_fee = per_byte.saturating_mul(len); - - // the adjustable part of the fee. - let unadjusted_weight_fee = Self::weight_to_fee(weight); - let multiplier = Self::next_fee_multiplier(); - // final adjusted weight fee. - let adjusted_weight_fee = multiplier.saturating_mul_int(unadjusted_weight_fee); - - let base_fee = Self::weight_to_fee(T::BlockWeights::get().get(class).base_extrinsic); - FeeDetails { - inclusion_fee: Some(InclusionFee { - base_fee, - len_fee: fixed_len_fee, - adjusted_weight_fee, - }), - tip, - } - } else { - FeeDetails { - inclusion_fee: None, - tip, - } - } - } - - fn weight_to_fee(weight: Weight) -> PalletBalanceOf { - // cap the weight to the maximum defined in runtime, otherwise it will be the - // `Bounded` maximum of its data type, which is not desired. - let capped_weight = weight.min(T::BlockWeights::get().max_block); - T::WeightToFee::calc(&capped_weight) - } - - pub fn ensure_can_charge_fee(who: &T::AccountId, fee: PalletBalanceOf, reason: WithdrawReasons) { - let native_existential_deposit = ::Currency::minimum_balance(); - let total_native = ::Currency::total_balance(who); - - // check native balance if is enough - let native_is_enough = fee.saturating_add(native_existential_deposit) <= total_native - && ::Currency::free_balance(who) - .checked_sub(&fee) - .map_or(false, |new_free_balance| { - ::Currency::ensure_can_withdraw(who, fee, reason, new_free_balance).is_ok() - }); - - // native is not enough, try swap native to pay fee and gap - if !native_is_enough { - // add extra gap to keep alive after swap - let amount = fee.saturating_add(native_existential_deposit.saturating_sub(total_native)); - let native_currency_id = T::NativeAssetId::get(); - let default_fee_swap_path_list = T::DefaultFeeSwapPathList::get(); - let fee_swap_path_list: Vec> = - if let Some(trading_path) = AlternativeFeeSwapPath::::get(who) { - vec![vec![trading_path.into_inner()], default_fee_swap_path_list].concat() - } else { - default_fee_swap_path_list - }; - - for trading_path in fee_swap_path_list { - match trading_path.last() { - Some(target_currency_id) if *target_currency_id == native_currency_id => { - let supply_currency_id = *trading_path.first().expect("these's first guaranteed by match"); - // calculate the supply limit according to oracle price and the slippage limit, - // if oracle price is not avalible, do not limit - let max_supply_limit = if let Some(target_price) = - T::PriceSource::get_relative_price(*target_currency_id, supply_currency_id) - { - Ratio::one() - .saturating_sub(T::MaxSwapSlippageCompareToOracle::get()) - .reciprocal() - .unwrap_or_else(Ratio::max_value) - .saturating_mul_int(target_price.saturating_mul_int(amount)) - } else { - PalletBalanceOf::::max_value() - }; - - if T::DEX::swap_with_exact_target( - who, - &trading_path, - amount.unique_saturated_into(), - ::MultiCurrency::free_balance(supply_currency_id, who) - .min(max_supply_limit.unique_saturated_into()), - ) - .is_ok() - { - // successfully swap, break iteration - break; - } - } - _ => {} - } - } - } - } -} - -impl Convert> for Pallet -where - T: Config, - PalletBalanceOf: FixedPointOperand, -{ - /// Compute the fee for the specified weight. - /// - /// This fee is already adjusted by the per block fee adjustment factor - /// and is therefore the share that the weight contributes to the - /// overall fee of a transaction. It is mainly for informational - /// purposes and not used in the actual fee calculation. - fn convert(weight: Weight) -> PalletBalanceOf { - NextFeeMultiplier::::get().saturating_mul_int(Self::weight_to_fee(weight)) - } -} - -/// Require the transactor pay for themselves and maybe include a tip to -/// gain additional priority in the queue. -#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] -#[scale_info(skip_type_params(T))] -pub struct ChargeTransactionPayment(#[codec(compact)] pub PalletBalanceOf); - -impl sp_std::fmt::Debug for ChargeTransactionPayment { - #[cfg(feature = "std")] - fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { - write!(f, "ChargeTransactionPayment<{:?}>", self.0) - } - #[cfg(not(feature = "std"))] - fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { - Ok(()) - } -} - -impl ChargeTransactionPayment -where - ::Call: Dispatchable, - PalletBalanceOf: Send + Sync + FixedPointOperand, -{ - /// utility constructor. Used only in client/factory code. - pub fn from(fee: PalletBalanceOf) -> Self { - Self(fee) - } - - fn withdraw_fee( - &self, - who: &T::AccountId, - _call: &::Call, - info: &DispatchInfoOf<::Call>, - len: usize, - ) -> Result<(PalletBalanceOf, Option>), TransactionValidityError> { - let tip = self.0; - let fee = Pallet::::compute_fee(len as u32, info, tip); - - // Only mess with balances if fee is not zero. - if fee.is_zero() { - return Ok((fee, None)); - } - - let reason = if tip.is_zero() { - WithdrawReasons::TRANSACTION_PAYMENT - } else { - WithdrawReasons::TRANSACTION_PAYMENT | WithdrawReasons::TIP - }; - - Pallet::::ensure_can_charge_fee(who, fee, reason); - - // withdraw native currency as fee - match ::Currency::withdraw(who, fee, reason, ExistenceRequirement::KeepAlive) { - Ok(imbalance) => Ok((fee, Some(imbalance))), - Err(_) => Err(InvalidTransaction::Payment.into()), - } - } - - /// Get an appropriate priority for a transaction with the given length - /// and info. - /// - /// This will try and optimise the `fee/weight` `fee/length`, whichever - /// is consuming more of the maximum corresponding limit. - /// - /// For example, if a transaction consumed 1/4th of the block length and - /// half of the weight, its final priority is `fee * min(2, 4) = fee * - /// 2`. If it consumed `1/4th` of the block length and the entire block - /// weight `(1/1)`, its priority is `fee * min(1, 4) = fee * 1`. This - /// means that the transaction which consumes more resources (either - /// length or weight) with the same `fee` ends up having lower priority. - fn get_priority( - len: usize, - info: &DispatchInfoOf<::Call>, - final_fee: PalletBalanceOf, - ) -> TransactionPriority { - let weight_saturation = T::BlockWeights::get().max_block / info.weight.max(1); - let max_block_length = *T::BlockLength::get().max.get(DispatchClass::Normal); - let len_saturation = max_block_length as u64 / (len as u64).max(1); - let coefficient: PalletBalanceOf = weight_saturation - .min(len_saturation) - .saturated_into::>(); - final_fee - .saturating_mul(coefficient) - .saturated_into::() - } -} - -impl SignedExtension for ChargeTransactionPayment -where - PalletBalanceOf: Send + Sync + From + FixedPointOperand, - ::Call: Dispatchable, -{ - const IDENTIFIER: &'static str = "ChargeTransactionPayment"; - type AccountId = T::AccountId; - type Call = ::Call; - type AdditionalSigned = (); - type Pre = ( - PalletBalanceOf, - Self::AccountId, - Option>, - PalletBalanceOf, - ); - - fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { - Ok(()) - } - - fn validate( - &self, - who: &Self::AccountId, - call: &Self::Call, - info: &DispatchInfoOf, - len: usize, - ) -> TransactionValidity { - let (fee, _) = self.withdraw_fee(who, call, info, len)?; - Ok(ValidTransaction { - priority: Self::get_priority(len, info, fee), - ..Default::default() - }) - } - - fn pre_dispatch( - self, - who: &Self::AccountId, - call: &Self::Call, - info: &DispatchInfoOf, - len: usize, - ) -> Result { - let (fee, imbalance) = self.withdraw_fee(who, call, info, len)?; - Ok((self.0, who.clone(), imbalance, fee)) - } - - fn post_dispatch( - pre: Self::Pre, - info: &DispatchInfoOf, - post_info: &PostDispatchInfoOf, - len: usize, - _result: &DispatchResult, - ) -> Result<(), TransactionValidityError> { - let (tip, who, imbalance, fee) = pre; - if let Some(payed) = imbalance { - let actual_fee = Pallet::::compute_actual_fee(len as u32, info, post_info, tip); - let refund = fee.saturating_sub(actual_fee); - let actual_payment = match ::Currency::deposit_into_existing(&who, refund) { - Ok(refund_imbalance) => { - // The refund cannot be larger than the up front payed max weight. - // `PostDispatchInfo::calc_unspent` guards against such a case. - match payed.offset(refund_imbalance) { - SameOrOther::Same(actual_payment) => actual_payment, - SameOrOther::None => Default::default(), - _ => return Err(InvalidTransaction::Payment.into()), - } - } - // We do not recreate the account using the refund. The up front payment - // is gone in that case. - Err(_) => payed, - }; - let (tip, fee) = actual_payment.split(tip); - - // distribute fee - ::OnTransactionPayment::on_unbalanceds(Some(fee).into_iter().chain(Some(tip))); - } - Ok(()) - } -} - -impl TransactionPayment, NegativeImbalanceOf> - for ChargeTransactionPayment -where - PalletBalanceOf: Send + Sync + FixedPointOperand, -{ - fn reserve_fee(who: &T::AccountId, weight: Weight) -> Result, DispatchError> { - let fee = Pallet::::weight_to_fee(weight); - Pallet::::ensure_can_charge_fee(who, fee, WithdrawReasons::TRANSACTION_PAYMENT); - ::Currency::reserve_named(&RESERVE_ID, who, fee)?; - Ok(fee) - } - - fn unreserve_fee(who: &T::AccountId, fee: PalletBalanceOf) { - ::Currency::unreserve_named(&RESERVE_ID, who, fee); - } - - fn unreserve_and_charge_fee( - who: &T::AccountId, - weight: Weight, - ) -> Result<(PalletBalanceOf, NegativeImbalanceOf), TransactionValidityError> { - let fee = Pallet::::weight_to_fee(weight); - ::Currency::unreserve_named(&RESERVE_ID, who, fee); - - match ::Currency::withdraw( - who, - fee, - WithdrawReasons::TRANSACTION_PAYMENT, - ExistenceRequirement::KeepAlive, - ) { - Ok(imbalance) => Ok((fee, imbalance)), - Err(_) => Err(InvalidTransaction::Payment.into()), - } - } - - fn refund_fee( - who: &T::AccountId, - refund_weight: Weight, - payed: NegativeImbalanceOf, - ) -> Result<(), TransactionValidityError> { - let refund = Pallet::::weight_to_fee(refund_weight); - let actual_payment = match ::Currency::deposit_into_existing(who, refund) { - Ok(refund_imbalance) => { - // The refund cannot be larger than the up front payed max weight. - match payed.offset(refund_imbalance) { - SameOrOther::Same(actual_payment) => actual_payment, - SameOrOther::None => Default::default(), - _ => return Err(InvalidTransaction::Payment.into()), - } - } - // We do not recreate the account using the refund. The up front payment - // is gone in that case. - Err(_) => payed, - }; - - // distribute fee - ::OnTransactionPayment::on_unbalanced(actual_payment); - - Ok(()) - } - - fn charge_fee( - who: &T::AccountId, - len: u32, - weight: Weight, - tip: PalletBalanceOf, - pays_fee: Pays, - class: DispatchClass, - ) -> Result<(), TransactionValidityError> { - let fee = Pallet::::compute_fee_raw(len, weight, tip, pays_fee, class).final_fee(); - - Pallet::::ensure_can_charge_fee(who, fee, WithdrawReasons::TRANSACTION_PAYMENT); - - // withdraw native currency as fee - let actual_payment = ::Currency::withdraw( - who, - fee, - WithdrawReasons::TRANSACTION_PAYMENT, - ExistenceRequirement::KeepAlive, - ) - .map_err(|_| InvalidTransaction::Payment)?; - - // distribute fee - ::OnTransactionPayment::on_unbalanced(actual_payment); - Ok(()) - } -} diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index ce330dae26..0715577197 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -8,9 +8,11 @@ repository = 'https://github.com/substrate-developer-hub/substrate-parachain-tem version = '0.0.1' [dependencies] +codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive']} frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.12', default-features = false } +scale-info = { version = "1.0", default-features = false, features = ["derive"] } # xcm xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.12', default-features = false } @@ -36,10 +38,12 @@ pallet-remote-asset-manager = { path = '../../pallets/remote-asset-manager', def [features] default = ['std'] std = [ + 'codec/std', "frame-support/std", 'frame-system/std', 'sp-std/std', - + 'scale-info/std', + "xcm/std", "xcm-calls/std", "cumulus-pallet-xcm/std", diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 5937bee8db..7062ca5154 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -4,6 +4,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod constants; +pub mod payment; pub mod traits; pub mod types; pub mod weights; diff --git a/runtime/common/src/payment.rs b/runtime/common/src/payment.rs new file mode 100644 index 0000000000..8eb822e6ab --- /dev/null +++ b/runtime/common/src/payment.rs @@ -0,0 +1,42 @@ +// Copyright 2021 ChainSafe Systems +// SPDX-License-Identifier: LGPL-3.0-only + +//! Multiasset related fungibles adapter to allow payments in multiple assets + +use codec::{Decode, Encode}; +use frame_support::{ + sp_runtime::{DispatchError, RuntimeDebug}, + traits::tokens::BalanceConversion, +}; +use sp_std::marker::PhantomData; + +use primitives::{traits::NavProvider, AssetId, Balance}; + +/// Possible errors when converting between external and asset balances. +#[derive(Eq, PartialEq, Copy, Clone, RuntimeDebug, Encode, Decode, scale_info::TypeInfo)] +pub enum ConversionError { + /// The external minimum balance must not be zero. + MinBalanceZero, + /// The asset is not present in storage. + AssetMissing, + /// The asset is not sufficient and thus does not have a reliable `min_balance` so it cannot be + /// converted. + AssetNotSufficient, +} + +/// Converts a balance value into an asset balance based on the current index token NAV. +pub struct BalanceToAssetBalance