git.delta.rocks / unique-network / refs/commits / 26807f273789

difftreelog

feature: add benchmarks for scheduler v2

Daniel Shiposha2022-10-19parent: #21043d5.patch.diff
in: master

3 files changed

addedpallets/scheduler-v2/src/benchmarking.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/scheduler-v2/src/benchmarking.rs
@@ -0,0 +1,315 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license:
+// This file is part of Substrate.
+
+// Copyright (C) 2020-2022 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Scheduler pallet benchmarking.
+
+use super::*;
+use frame_benchmarking::{account, benchmarks};
+use frame_support::{
+	ensure,
+	traits::{schedule::Priority, PreimageRecipient},
+};
+use frame_system::RawOrigin;
+use sp_std::{prelude::*, vec};
+
+use crate::{Pallet as Scheduler, ScheduledCall, EncodedCall};
+use frame_system::Call as SystemCall;
+
+const SEED: u32 = 0;
+
+const BLOCK_NUMBER: u32 = 2;
+
+type SystemOrigin<T> = <T as frame_system::Config>::Origin;
+
+/// Add `n` items to the schedule.
+///
+/// For `resolved`:
+/// - `
+/// - `None`: aborted (hash without preimage)
+/// - `Some(true)`: hash resolves into call if possible, plain call otherwise
+/// - `Some(false)`: plain call
+fn fill_schedule<T: Config>(when: T::BlockNumber, n: u32) -> Result<(), &'static str> {
+	let t = DispatchTime::At(when);
+	let origin: <T as Config>::PalletsOrigin = frame_system::RawOrigin::Root.into();
+	for i in 0..n {
+		let call = make_call::<T>(None);
+		let period = Some(((i + 100).into(), 100));
+		let name = u32_to_name(i);
+		Scheduler::<T>::do_schedule_named(name, t, period, 0, origin.clone(), call)?;
+	}
+	ensure!(Agenda::<T>::get(when).len() == n as usize, "didn't fill schedule");
+	Ok(())
+}
+
+fn u32_to_name(i: u32) -> TaskName {
+	i.using_encoded(blake2_256)
+}
+
+fn make_task<T: Config>(
+	periodic: bool,
+	named: bool,
+	signed: bool,
+	maybe_lookup_len: Option<u32>,
+	priority: Priority,
+) -> ScheduledOf<T> {
+	let call = make_call::<T>(maybe_lookup_len);
+	let maybe_periodic = match periodic {
+		true => Some((100u32.into(), 100)),
+		false => None,
+	};
+	let maybe_id = match named {
+		true => Some(u32_to_name(0)),
+		false => None,
+	};
+	let origin = make_origin::<T>(signed);
+	Scheduled { maybe_id, priority, call, maybe_periodic, origin, _phantom: PhantomData }
+}
+
+fn bounded<T: Config>(len: u32) -> Option<ScheduledCall<T>> {
+	let call =
+		<<T as Config>::Call>::from(SystemCall::remark { remark: vec![0; len as usize] });
+    ScheduledCall::new(call).ok()
+}
+
+fn make_call<T: Config>(maybe_lookup_len: Option<u32>) -> ScheduledCall<T> {
+	let bound = EncodedCall::bound() as u32;
+	let mut len = match maybe_lookup_len {
+		Some(len) => len.min(<T::Preimages as PreimageRecipient<T::Hash>>::MaxSize::get() - 2).max(bound) - 3,
+		None => bound.saturating_sub(4),
+	};
+
+	loop {
+		let c = match bounded::<T>(len) {
+			Some(x) => x,
+			None => {
+				len -= 1;
+				continue
+			},
+		};
+		if c.lookup_needed() == maybe_lookup_len.is_some() {
+			break c
+		}
+		if maybe_lookup_len.is_some() {
+			len += 1;
+		} else {
+			if len > 0 {
+				len -= 1;
+			} else {
+				break c
+			}
+		}
+	}
+}
+
+fn make_origin<T: Config>(signed: bool) -> <T as Config>::PalletsOrigin {
+	match signed {
+		true => frame_system::RawOrigin::Signed(account("origin", 0, SEED)).into(),
+		false => frame_system::RawOrigin::Root.into(),
+	}
+}
+
+fn dummy_counter() -> WeightCounter {
+	WeightCounter { used: Weight::zero(), limit: Weight::MAX }
+}
+
+benchmarks! {
+    // `service_agendas` when no work is done.
+	service_agendas_base {
+		let now = T::BlockNumber::from(BLOCK_NUMBER);
+		IncompleteSince::<T>::put(now - One::one());
+	}: {
+		Scheduler::<T>::service_agendas(&mut dummy_counter(), now, 0);
+	} verify {
+		assert_eq!(IncompleteSince::<T>::get(), Some(now - One::one()));
+	}
+
+    // `service_agenda` when no work is done.
+	service_agenda_base {
+		let now = BLOCK_NUMBER.into();
+		let s in 0 .. T::MaxScheduledPerBlock::get();
+		fill_schedule::<T>(now, s)?;
+		let mut executed = 0;
+	}: {
+		Scheduler::<T>::service_agenda(&mut dummy_counter(), &mut executed, now, now, 0);
+	} verify {
+		assert_eq!(executed, 0);
+	}
+
+    // `service_task` when the task is a non-periodic, non-named, non-fetched call which is not
+	// dispatched (e.g. due to being overweight).
+	service_task_base {
+		let now = BLOCK_NUMBER.into();
+		let task = make_task::<T>(false, false, false, None, 0);
+		// prevent any tasks from actually being executed as we only want the surrounding weight.
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
+	}: {
+		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
+	} verify {
+		//assert_eq!(result, Ok(()));
+	}
+
+    // `service_task` when the task is a non-periodic, non-named, fetched call (with a known
+	// preimage length) and which is not dispatched (e.g. due to being overweight).
+	service_task_fetched {
+		let s in (EncodedCall::bound() as u32) .. (<T::Preimages as PreimageRecipient<T::Hash>>::MaxSize::get());
+		let now = BLOCK_NUMBER.into();
+		let task = make_task::<T>(false, false, false, Some(s), 0);
+		// prevent any tasks from actually being executed as we only want the surrounding weight.
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
+	}: {
+		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
+	} verify {
+	}
+
+    // `service_task` when the task is a non-periodic, named, non-fetched call which is not
+	// dispatched (e.g. due to being overweight).
+	service_task_named {
+		let now = BLOCK_NUMBER.into();
+		let task = make_task::<T>(false, true, false, None, 0);
+		// prevent any tasks from actually being executed as we only want the surrounding weight.
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
+	}: {
+		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
+	} verify {
+	}
+
+    // `service_task` when the task is a periodic, non-named, non-fetched call which is not
+	// dispatched (e.g. due to being overweight).
+	service_task_periodic {
+		let now = BLOCK_NUMBER.into();
+		let task = make_task::<T>(true, false, false, None, 0);
+		// prevent any tasks from actually being executed as we only want the surrounding weight.
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
+	}: {
+		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
+	} verify {
+	}
+
+    // `execute_dispatch` when the origin is `Signed`, not counting the dispatable's weight.
+	execute_dispatch_signed {
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::MAX };
+		let origin = make_origin::<T>(true);
+		let call = T::Preimages::realize(&make_call::<T>(None)).unwrap().0;
+	}: {
+		assert!(Scheduler::<T>::execute_dispatch(&mut counter, origin, call).is_ok());
+	}
+	verify {
+	}
+
+    // `execute_dispatch` when the origin is not `Signed`, not counting the dispatable's weight.
+	execute_dispatch_unsigned {
+		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::MAX };
+		let origin = make_origin::<T>(false);
+		let call = T::Preimages::realize(&make_call::<T>(None)).unwrap().0;
+	}: {
+		assert!(Scheduler::<T>::execute_dispatch(&mut counter, origin, call).is_ok());
+	}
+	verify {
+	}
+
+    schedule {
+		let s in 0 .. (T::MaxScheduledPerBlock::get() - 1);
+		let when = BLOCK_NUMBER.into();
+		let periodic = Some((T::BlockNumber::one(), 100));
+		let priority = 0;
+		// Essentially a no-op call.
+		let call = Box::new(SystemCall::set_storage { items: vec![] }.into());
+
+		fill_schedule::<T>(when, s)?;
+	}: _(RawOrigin::Root, when, periodic, priority, call)
+	verify {
+		ensure!(
+			Agenda::<T>::get(when).len() == (s + 1) as usize,
+			"didn't add to schedule"
+		);
+	}
+
+    cancel {
+		let s in 1 .. T::MaxScheduledPerBlock::get();
+		let when = BLOCK_NUMBER.into();
+
+		fill_schedule::<T>(when, s)?;
+		assert_eq!(Agenda::<T>::get(when).len(), s as usize);
+		let schedule_origin = T::ScheduleOrigin::successful_origin();
+	}: _<SystemOrigin<T>>(schedule_origin, when, 0)
+	verify {
+		ensure!(
+			Lookup::<T>::get(u32_to_name(0)).is_none(),
+			"didn't remove from lookup"
+		);
+		// Removed schedule is NONE
+		ensure!(
+			Agenda::<T>::get(when)[0].is_none(),
+			"didn't remove from schedule"
+		);
+	}
+
+    schedule_named {
+		let s in 0 .. (T::MaxScheduledPerBlock::get() - 1);
+		let id = u32_to_name(s);
+		let when = BLOCK_NUMBER.into();
+		let periodic = Some((T::BlockNumber::one(), 100));
+		let priority = 0;
+		// Essentially a no-op call.
+		let call = Box::new(SystemCall::set_storage { items: vec![] }.into());
+
+		fill_schedule::<T>(when, s)?;
+	}: _(RawOrigin::Root, id, when, periodic, priority, call)
+	verify {
+		ensure!(
+			Agenda::<T>::get(when).len() == (s + 1) as usize,
+			"didn't add to schedule"
+		);
+	}
+
+    cancel_named {
+		let s in 1 .. T::MaxScheduledPerBlock::get();
+		let when = BLOCK_NUMBER.into();
+
+		fill_schedule::<T>(when, s)?;
+	}: _(RawOrigin::Root, u32_to_name(0))
+	verify {
+		ensure!(
+			Lookup::<T>::get(u32_to_name(0)).is_none(),
+			"didn't remove from lookup"
+		);
+		// Removed schedule is NONE
+		ensure!(
+			Agenda::<T>::get(when)[0].is_none(),
+			"didn't remove from schedule"
+		);
+	}
+
+    // impl_benchmark_test_suite!(Scheduler, crate::mock::new_test_ext(), crate::mock::Test);
+}
modifiedpallets/scheduler-v2/src/lib.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/lib.rs
+++ b/pallets/scheduler-v2/src/lib.rs
@@ -143,6 +143,14 @@
 		}
 	}
 
+	/// Returns whether the image will require a lookup to be peeked.
+	pub fn lookup_needed(&self) -> bool {
+		match self {
+			Self::Inline(_) => false,
+			Self::PreimageLookup { .. } => true,
+		}
+	}
+
 	fn decode(mut data: &[u8]) -> Result<<T as Config>::Call, DispatchError> {
 		<T as Config>::Call::decode(&mut data)
 				.map_err(|_| <Error<T>>::ScheduledCallCorrupted.into())
@@ -153,6 +161,11 @@
     fn drop(call: &ScheduledCall<T>);
 
 	fn peek(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError>;
+
+	/// Convert the given scheduled `call` value back into its original instance. If successful,
+	/// `drop` any data backing it. This will not break the realisability of independently
+	/// created instances of `ScheduledCall` which happen to have identical data.
+	fn realize(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError>;
 }
 
 impl<T: Config, PP: PreimageRecipient<T::Hash>> SchedulerPreimages<T> for PP {
@@ -175,6 +188,12 @@
 			},
 		}
 	}
+
+	fn realize(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError> {
+		let r = Self::peek(call)?;
+		Self::drop(call);
+		Ok(r)
+	}
 }
 
 pub type TaskName = [u8; 32];
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
before · runtime/opal/Cargo.toml
1################################################################################2# Package34cargo-features = ["workspace-inheritance"]56[package]7authors = ['Unique Network <support@uniquenetwork.io>']8build = 'build.rs'9description = 'Opal Runtime'10edition = '2021'11homepage = 'https://unique.network'12license = 'GPLv3'13name = 'opal-runtime'14repository = 'https://github.com/UniqueNetwork/unique-chain'15version = "0.9.30"1617[package.metadata.docs.rs]18targets = ['x86_64-unknown-linux-gnu']1920[features]21default = ['std', 'opal-runtime']22runtime-benchmarks = [23    'hex-literal',24    'frame-benchmarking',25    'frame-support/runtime-benchmarks',26    'frame-system-benchmarking',27    'frame-system/runtime-benchmarks',28    'pallet-ethereum/runtime-benchmarks',29    'pallet-evm-migration/runtime-benchmarks',30    'pallet-evm-coder-substrate/runtime-benchmarks',31    'pallet-balances/runtime-benchmarks',32    'pallet-timestamp/runtime-benchmarks',33    'pallet-common/runtime-benchmarks',34    'pallet-structure/runtime-benchmarks',35    'pallet-fungible/runtime-benchmarks',36    'pallet-refungible/runtime-benchmarks',37    'pallet-nonfungible/runtime-benchmarks',38    'pallet-proxy-rmrk-core/runtime-benchmarks',39    'pallet-proxy-rmrk-equip/runtime-benchmarks',40    'pallet-foreign-assets/runtime-benchmarks',41    'pallet-unique/runtime-benchmarks',42    'pallet-inflation/runtime-benchmarks',43    'pallet-app-promotion/runtime-benchmarks',44    'pallet-unique-scheduler/runtime-benchmarks',45    'pallet-xcm/runtime-benchmarks',46    'sp-runtime/runtime-benchmarks',47    'xcm-builder/runtime-benchmarks',48]49try-runtime = [50    'frame-try-runtime',51    'frame-executive/try-runtime',52    'frame-support/try-runtime',53    'frame-system/try-runtime',54    'cumulus-pallet-parachain-system/try-runtime',55    'parachain-info/try-runtime',56    'pallet-aura/try-runtime',57    'cumulus-pallet-aura-ext/try-runtime',58    'pallet-balances/try-runtime',59    'pallet-randomness-collective-flip/try-runtime',60    'pallet-timestamp/try-runtime',61    'pallet-transaction-payment/try-runtime',62    'pallet-treasury/try-runtime',63    'pallet-sudo/try-runtime',64    'orml-vesting/try-runtime',65    'orml-xtokens/try-runtime',66    'orml-tokens/try-runtime',67    'cumulus-pallet-xcmp-queue/try-runtime',68    'pallet-xcm/try-runtime',69    'cumulus-pallet-xcm/try-runtime',70    'cumulus-pallet-dmp-queue/try-runtime',71    'pallet-inflation/try-runtime',72    'pallet-unique/try-runtime',73    'pallet-unique-scheduler/try-runtime',74    'pallet-configuration/try-runtime',75    'pallet-charge-transaction/try-runtime',76    'pallet-common/try-runtime',77    'pallet-fungible/try-runtime',78    'pallet-refungible/try-runtime',79    'pallet-nonfungible/try-runtime',80    'pallet-structure/try-runtime',81    'pallet-proxy-rmrk-core/try-runtime',82    'pallet-proxy-rmrk-equip/try-runtime',83    'pallet-app-promotion/try-runtime',84    'pallet-foreign-assets/try-runtime',85    'pallet-evm/try-runtime',86    'pallet-ethereum/try-runtime',87    'pallet-evm-coder-substrate/try-runtime',88    'pallet-evm-contract-helpers/try-runtime',89    'pallet-evm-transaction-payment/try-runtime',90    'pallet-evm-migration/try-runtime',91]92std = [93    'codec/std',94    'cumulus-pallet-aura-ext/std',95    'cumulus-pallet-parachain-system/std',96    'cumulus-pallet-xcm/std',97    'cumulus-pallet-xcmp-queue/std',98    'cumulus-primitives-core/std',99    'cumulus-primitives-utility/std',100    'frame-try-runtime/std',101    'frame-executive/std',102    'frame-support/std',103    'frame-system/std',104    'frame-system-rpc-runtime-api/std',105    'pallet-aura/std',106    'pallet-balances/std',107    # 'pallet-contracts/std',108    # 'pallet-contracts-primitives/std',109    # 'pallet-contracts-rpc-runtime-api/std',110    # 'pallet-contract-helpers/std',111    'pallet-randomness-collective-flip/std',112    'pallet-sudo/std',113    'pallet-timestamp/std',114    'pallet-transaction-payment/std',115    'pallet-transaction-payment-rpc-runtime-api/std',116    'pallet-treasury/std',117    'pallet-evm/std',118    'pallet-evm-migration/std',119    'pallet-evm-contract-helpers/std',120    'pallet-evm-transaction-payment/std',121    'pallet-evm-coder-substrate/std',122    'pallet-ethereum/std',123    'pallet-base-fee/std',124    'fp-rpc/std',125    'up-rpc/std',126    'app-promotion-rpc/std',127    'fp-evm-mapping/std',128    'fp-self-contained/std',129    'parachain-info/std',130    'serde',131    'pallet-inflation/std',132    'pallet-configuration/std',133    'pallet-app-promotion/std',134    'pallet-common/std',135    'pallet-structure/std',136    'pallet-fungible/std',137    'pallet-refungible/std',138    'pallet-nonfungible/std',139    'pallet-proxy-rmrk-core/std',140    'pallet-proxy-rmrk-equip/std',141    'pallet-unique/std',142    'pallet-unique-scheduler/std',143    'pallet-unique-scheduler-v2/std',144    'pallet-charge-transaction/std',145    'up-data-structs/std',146    'sp-api/std',147    'sp-block-builder/std',148    "sp-consensus-aura/std",149    'sp-core/std',150    'sp-inherents/std',151    'sp-io/std',152    'sp-offchain/std',153    'sp-runtime/std',154    'sp-session/std',155    'sp-std/std',156    'sp-transaction-pool/std',157    'sp-version/std',158    'xcm/std',159    'xcm-builder/std',160    'xcm-executor/std',161    'up-common/std',162    'rmrk-rpc/std',163    'evm-coder/std',164    'up-sponsorship/std',165166    "orml-vesting/std",167    "orml-tokens/std",168    "orml-xtokens/std",169    "orml-traits/std",170    "pallet-foreign-assets/std",171172    'pallet-test-utils?/std',173]174limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']175opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion', 'foreign-assets', 'pallet-test-utils']176177refungible = []178scheduler = []179rmrk = []180foreign-assets = []181app-promotion = []182183################################################################################184# Substrate Dependencies185186[dependencies.codec]187default-features = false188features = ['derive']189package = 'parity-scale-codec'190version = '3.1.2'191192[dependencies.frame-benchmarking]193default-features = false194git = "https://github.com/paritytech/substrate"195optional = true196branch = "polkadot-v0.9.30"197198[dependencies.frame-try-runtime]199default-features = false200git = "https://github.com/paritytech/substrate"201optional = true202branch = "polkadot-v0.9.30"203204[dependencies.frame-executive]205default-features = false206git = "https://github.com/paritytech/substrate"207branch = "polkadot-v0.9.30"208209[dependencies.frame-support]210default-features = false211git = "https://github.com/paritytech/substrate"212branch = "polkadot-v0.9.30"213214[dependencies.frame-system]215default-features = false216git = "https://github.com/paritytech/substrate"217branch = "polkadot-v0.9.30"218219[dependencies.frame-system-benchmarking]220default-features = false221git = "https://github.com/paritytech/substrate"222optional = true223branch = "polkadot-v0.9.30"224225[dependencies.frame-system-rpc-runtime-api]226default-features = false227git = "https://github.com/paritytech/substrate"228branch = "polkadot-v0.9.30"229230[dependencies.hex-literal]231optional = true232version = '0.3.3'233234[dependencies.serde]235default-features = false236features = ['derive']237optional = true238version = '1.0.130'239240[dependencies.pallet-aura]241default-features = false242git = "https://github.com/paritytech/substrate"243branch = "polkadot-v0.9.30"244245[dependencies.pallet-balances]246default-features = false247git = "https://github.com/paritytech/substrate"248branch = "polkadot-v0.9.30"249250# Contracts specific packages251# [dependencies.pallet-contracts]252# git = 'https://github.com/paritytech/substrate'253# default-features = false254# branch = 'master'255# version = '4.0.0-dev'256257# [dependencies.pallet-contracts-primitives]258# git = 'https://github.com/paritytech/substrate'259# default-features = false260# branch = 'master'261# version = '4.0.0-dev'262263# [dependencies.pallet-contracts-rpc-runtime-api]264# git = 'https://github.com/paritytech/substrate'265# default-features = false266# branch = 'master'267# version = '4.0.0-dev'268269[dependencies.pallet-randomness-collective-flip]270default-features = false271git = "https://github.com/paritytech/substrate"272branch = "polkadot-v0.9.30"273274[dependencies.pallet-sudo]275default-features = false276git = "https://github.com/paritytech/substrate"277branch = "polkadot-v0.9.30"278279[dependencies.pallet-timestamp]280default-features = false281git = "https://github.com/paritytech/substrate"282branch = "polkadot-v0.9.30"283284[dependencies.pallet-transaction-payment]285default-features = false286git = "https://github.com/paritytech/substrate"287branch = "polkadot-v0.9.30"288289[dependencies.pallet-transaction-payment-rpc-runtime-api]290default-features = false291git = "https://github.com/paritytech/substrate"292branch = "polkadot-v0.9.30"293294[dependencies.pallet-treasury]295default-features = false296git = "https://github.com/paritytech/substrate"297branch = "polkadot-v0.9.30"298299[dependencies.sp-arithmetic]300default-features = false301git = "https://github.com/paritytech/substrate"302branch = "polkadot-v0.9.30"303304[dependencies.sp-api]305default-features = false306git = "https://github.com/paritytech/substrate"307branch = "polkadot-v0.9.30"308309[dependencies.sp-block-builder]310default-features = false311git = "https://github.com/paritytech/substrate"312branch = "polkadot-v0.9.30"313314[dependencies.sp-core]315default-features = false316git = "https://github.com/paritytech/substrate"317branch = "polkadot-v0.9.30"318319[dependencies.sp-consensus-aura]320default-features = false321git = "https://github.com/paritytech/substrate"322branch = "polkadot-v0.9.30"323324[dependencies.sp-inherents]325default-features = false326git = "https://github.com/paritytech/substrate"327branch = "polkadot-v0.9.30"328329[dependencies.sp-io]330default-features = false331git = "https://github.com/paritytech/substrate"332branch = "polkadot-v0.9.30"333334[dependencies.sp-offchain]335default-features = false336git = "https://github.com/paritytech/substrate"337branch = "polkadot-v0.9.30"338339[dependencies.sp-runtime]340default-features = false341git = "https://github.com/paritytech/substrate"342branch = "polkadot-v0.9.30"343344[dependencies.sp-session]345default-features = false346git = "https://github.com/paritytech/substrate"347branch = "polkadot-v0.9.30"348349[dependencies.sp-std]350default-features = false351git = "https://github.com/paritytech/substrate"352branch = "polkadot-v0.9.30"353354[dependencies.sp-transaction-pool]355default-features = false356git = "https://github.com/paritytech/substrate"357branch = "polkadot-v0.9.30"358359[dependencies.sp-version]360default-features = false361git = "https://github.com/paritytech/substrate"362branch = "polkadot-v0.9.30"363364[dependencies.smallvec]365version = '1.6.1'366367################################################################################368# Cumulus dependencies369370[dependencies.parachain-info]371default-features = false372git = "https://github.com/paritytech/cumulus"373branch = "polkadot-v0.9.30"374375[dependencies.cumulus-pallet-aura-ext]376git = "https://github.com/paritytech/cumulus"377branch = "polkadot-v0.9.30"378default-features = false379380[dependencies.cumulus-pallet-parachain-system]381git = "https://github.com/paritytech/cumulus"382branch = "polkadot-v0.9.30"383default-features = false384385[dependencies.cumulus-primitives-core]386git = "https://github.com/paritytech/cumulus"387branch = "polkadot-v0.9.30"388default-features = false389390[dependencies.cumulus-pallet-xcm]391git = "https://github.com/paritytech/cumulus"392branch = "polkadot-v0.9.30"393default-features = false394395[dependencies.cumulus-pallet-dmp-queue]396git = "https://github.com/paritytech/cumulus"397branch = "polkadot-v0.9.30"398default-features = false399400[dependencies.cumulus-pallet-xcmp-queue]401git = "https://github.com/paritytech/cumulus"402branch = "polkadot-v0.9.30"403default-features = false404405[dependencies.cumulus-primitives-utility]406git = "https://github.com/paritytech/cumulus"407branch = "polkadot-v0.9.30"408default-features = false409410[dependencies.cumulus-primitives-timestamp]411git = "https://github.com/paritytech/cumulus"412branch = "polkadot-v0.9.30"413default-features = false414415################################################################################416# Polkadot dependencies417418[dependencies.polkadot-parachain]419git = "https://github.com/paritytech/polkadot"420branch = "release-v0.9.30"421default-features = false422423[dependencies.xcm]424git = "https://github.com/paritytech/polkadot"425branch = "release-v0.9.30"426default-features = false427428[dependencies.xcm-builder]429git = "https://github.com/paritytech/polkadot"430branch = "release-v0.9.30"431default-features = false432433[dependencies.xcm-executor]434git = "https://github.com/paritytech/polkadot"435branch = "release-v0.9.30"436default-features = false437438[dependencies.pallet-xcm]439git = "https://github.com/paritytech/polkadot"440branch = "release-v0.9.30"441default-features = false442443################################################################################444# local dependencies445446[dependencies]447orml-vesting.workspace = true448orml-xtokens.workspace = true449orml-tokens.workspace = true450orml-traits.workspace = true451452log = { version = "0.4.16", default-features = false }453up-common = { path = "../../primitives/common", default-features = false }454scale-info = { version = "2.0.1", default-features = false, features = [455    "derive",456] }457derivative = "2.2.0"458pallet-unique = { path = '../../pallets/unique', default-features = false }459up-rpc = { path = "../../primitives/rpc", default-features = false }460app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }461rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }462fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }463pallet-inflation = { path = '../../pallets/inflation', default-features = false }464pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }465up-data-structs = { path = '../../primitives/data-structs', default-features = false }466pallet-configuration = { default-features = false, path = "../../pallets/configuration" }467pallet-common = { default-features = false, path = "../../pallets/common" }468pallet-structure = { default-features = false, path = "../../pallets/structure" }469pallet-fungible = { default-features = false, path = "../../pallets/fungible" }470pallet-refungible = { default-features = false, path = "../../pallets/refungible" }471pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }472pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }473pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }474pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }475pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.30", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }476pallet-unique-scheduler-v2 = { path = '../../pallets/scheduler-v2', default-features = false }477pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }478pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }479pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }480pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }481pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }482pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }483pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }484fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }485fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }486evm-coder = { default-features = false, path = '../../crates/evm-coder' }487up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }488pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }489490################################################################################491# Test dependencies492493pallet-test-utils = { optional = true, default-features = false, path = "../../test-pallets/utils" }494495################################################################################496# Other Dependencies497498impl-trait-for-tuples = "0.2.2"499500################################################################################501# Dev Dependencies502503[dev-dependencies.logtest]504version = "2.0.0"505506################################################################################507# Build Dependencies508509[build-dependencies.substrate-wasm-builder]510git = "https://github.com/paritytech/substrate"511branch = "polkadot-v0.9.30"