difftreelog
chore remove unique-scheduler leftovers
in: master
10 files changed
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,5 @@
[workspace]
default-members = ['client/*', 'node/*', 'runtime/opal']
-exclude = ['pallets/scheduler-v2']
members = [
'client/*',
'crates/*',
@@ -54,7 +53,6 @@
pallet-structure = { default-features = false, path = "pallets/structure" }
pallet-test-utils = { default-features = false, path = "test-pallets/utils" }
pallet-unique = { path = "pallets/unique", default-features = false }
-# pallet-unique-scheduler-v2 = { path = "pallets/scheduler-v2", default-features = false }
precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }
struct-versioning = { path = "crates/struct-versioning" }
uc-rpc = { path = "client/rpc" }
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -128,10 +128,6 @@
bench-structure:
make _bench PALLET=structure
-.PHONY: bench-scheduler
-bench-scheduler:
- make _bench PALLET=unique-scheduler-v2 PALLET_DIR=scheduler-v2
-
.PHONY: bench-foreign-assets
bench-foreign-assets:
make _bench PALLET=foreign-assets
@@ -157,7 +153,6 @@
make _bench PALLET=xcm OUTPUT=./runtime/common/weights/xcm.rs TEMPLATE="--template=.maintain/external-weight-template.hbs"
.PHONY: bench
-# Disabled: bench-scheduler
bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity
.PHONY: check
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -40,9 +40,6 @@
Balances, Runtime, RuntimeCall, RuntimeEvent, DECIMALS, TOKEN_SYMBOL, VERSION,
};
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
-
#[cfg(feature = "foreign-assets")]
pub mod foreign_asset;
runtime/common/config/pallets/scheduler.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/scheduler.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// 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/>.
-
-use core::cmp::Ordering;
-
-use frame_support::{
- parameter_types,
- traits::{EnsureOrigin, PrivilegeCmp},
- weights::Weight,
-};
-use frame_system::{EnsureRoot, RawOrigin};
-use pallet_unique_scheduler_v2::ScheduledEnsureOriginSuccess;
-use parity_scale_codec::Decode;
-use sp_runtime::Perbill;
-use up_common::types::AccountId;
-
-use crate::{
- runtime_common::{config::substrate::RuntimeBlockWeights, scheduler::SchedulerPaymentExecutor},
- OriginCaller, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
-};
-
-parameter_types! {
- pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
- RuntimeBlockWeights::get().max_block;
- pub const MaxScheduledPerBlock: u32 = 50;
-
- pub const NoPreimagePostponement: Option<u32> = Some(10);
- pub const Preimage: Option<u32> = Some(10);
-}
-
-pub struct EnsureSignedOrRoot<AccountId>(sp_std::marker::PhantomData<AccountId>);
-impl<O: Into<Result<RawOrigin<AccountId>, O>> + From<RawOrigin<AccountId>>, AccountId: Decode>
- EnsureOrigin<O> for EnsureSignedOrRoot<AccountId>
-{
- type Success = ScheduledEnsureOriginSuccess<AccountId>;
- fn try_origin(o: O) -> Result<Self::Success, O> {
- o.into().and_then(|o| match o {
- RawOrigin::Root => Ok(ScheduledEnsureOriginSuccess::Root),
- RawOrigin::Signed(who) => Ok(ScheduledEnsureOriginSuccess::Signed(who)),
- r => Err(O::from(r)),
- })
- }
-}
-
-pub struct EqualOrRootOnly;
-impl PrivilegeCmp<OriginCaller> for EqualOrRootOnly {
- fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<Ordering> {
- use RawOrigin::*;
-
- let left = left.clone().try_into().ok()?;
- let right = right.clone().try_into().ok()?;
-
- match (left, right) {
- (Root, Root) => Some(Ordering::Equal),
- (Root, _) => Some(Ordering::Greater),
- (_, Root) => Some(Ordering::Less),
- lr @ _ => (lr.0 == lr.1).then(|| Ordering::Equal),
- }
- }
-}
-
-impl pallet_unique_scheduler_v2::Config for Runtime {
- type RuntimeEvent = RuntimeEvent;
- type RuntimeOrigin = RuntimeOrigin;
- type PalletsOrigin = OriginCaller;
- type RuntimeCall = RuntimeCall;
- type MaximumWeight = MaximumSchedulerWeight;
- type ScheduleOrigin = EnsureSignedOrRoot<AccountId>;
- type OriginPrivilegeCmp = EqualOrRootOnly;
- type MaxScheduledPerBlock = MaxScheduledPerBlock;
- type WeightInfo = ();
- type Preimages = ();
- type CallExecutor = SchedulerPaymentExecutor;
- type PrioritySetOrigin = EnsureRoot<AccountId>;
-}
runtime/common/maintenance.rsdiffbeforeafterboth--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -67,9 +67,6 @@
| RuntimeCall::Structure(_)
| RuntimeCall::Unique(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
- #[cfg(feature = "unique-scheduler")]
- RuntimeCall::Scheduler(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
-
#[cfg(feature = "app-promotion")]
RuntimeCall::AppPromotion(_) => {
Err(TransactionValidityError::Invalid(InvalidTransaction::Call))
runtime/common/mod.rsdiffbeforeafterboth--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -23,9 +23,6 @@
pub mod maintenance;
pub mod runtime_apis;
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
-
pub mod sponsoring;
#[allow(missing_docs)]
pub mod weights;
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -548,9 +548,6 @@
#[cfg(feature = "refungible")]
list_benchmark!(list, extra, pallet_refungible, Refungible);
- #[cfg(feature = "unique-scheduler")]
- list_benchmark!(list, extra, pallet_unique_scheduler_v2, Scheduler);
-
#[cfg(feature = "collator-selection")]
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
@@ -613,9 +610,6 @@
#[cfg(feature = "refungible")]
add_benchmark!(params, batches, pallet_refungible, Refungible);
-
- #[cfg(feature = "unique-scheduler")]
- add_benchmark!(params, batches, pallet_unique_scheduler_v2, Scheduler);
#[cfg(feature = "collator-selection")]
add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -229,7 +229,6 @@
preimage = []
refungible = []
session-test-timings = []
-unique-scheduler = []
################################################################################
# local dependencies
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -221,7 +221,6 @@
preimage = []
refungible = []
session-test-timings = []
-unique-scheduler = []
################################################################################
# local dependencies
runtime/unique/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'unique-runtime']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21pov-estimate = []22runtime-benchmarks = [23 "pallet-preimage/runtime-benchmarks",24 'frame-benchmarking',25 'frame-support/runtime-benchmarks',26 'frame-system-benchmarking',27 'frame-system/runtime-benchmarks',28 'pallet-app-promotion/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-collator-selection/runtime-benchmarks',31 'pallet-collective/runtime-benchmarks',32 'pallet-collective/runtime-benchmarks',33 'pallet-common/runtime-benchmarks',34 'pallet-configuration/runtime-benchmarks',35 'pallet-democracy/runtime-benchmarks',36 'pallet-democracy/runtime-benchmarks',37 'pallet-ethereum/runtime-benchmarks',38 'pallet-evm-coder-substrate/runtime-benchmarks',39 'pallet-evm-migration/runtime-benchmarks',40 'pallet-foreign-assets/runtime-benchmarks',41 'pallet-fungible/runtime-benchmarks',42 'pallet-identity/runtime-benchmarks',43 'pallet-inflation/runtime-benchmarks',44 'pallet-maintenance/runtime-benchmarks',45 'pallet-membership/runtime-benchmarks',46 'pallet-membership/runtime-benchmarks',47 'pallet-nonfungible/runtime-benchmarks',48 'pallet-ranked-collective/runtime-benchmarks',49 'pallet-referenda/runtime-benchmarks',50 'pallet-refungible/runtime-benchmarks',51 'pallet-scheduler/runtime-benchmarks',52 'pallet-scheduler/runtime-benchmarks',53 'pallet-structure/runtime-benchmarks',54 'pallet-timestamp/runtime-benchmarks',55 'pallet-unique/runtime-benchmarks',56 'pallet-utility/runtime-benchmarks',57 'pallet-xcm/runtime-benchmarks',58 'sp-runtime/runtime-benchmarks',59 'staging-xcm-builder/runtime-benchmarks',60 'up-data-structs/runtime-benchmarks',61]62std = [63 'cumulus-pallet-aura-ext/std',64 'cumulus-pallet-parachain-system/std',65 'cumulus-pallet-xcm/std',66 'cumulus-pallet-xcmp-queue/std',67 'cumulus-primitives-core/std',68 'cumulus-primitives-utility/std',69 'frame-executive/std',70 'frame-support/std',71 'frame-system-rpc-runtime-api/std',72 'frame-system/std',73 'frame-try-runtime/std',74 'pallet-aura/std',75 'pallet-balances/std',76 'pallet-collective/std',77 'pallet-democracy/std',78 'pallet-membership/std',79 'pallet-scheduler/std',80 'parity-scale-codec/std',81 # 'pallet-contracts/std',82 # 'pallet-contracts-primitives/std',83 # 'pallet-contracts-rpc-runtime-api/std',84 # 'pallet-contract-helpers/std',85 "pallet-authorship/std",86 "pallet-identity/std",87 "pallet-preimage/std",88 "pallet-session/std",89 "pallet-state-trie-migration/std",90 "sp-consensus-aura/std",91 'app-promotion-rpc/std',92 'evm-coder/std',93 'fp-rpc/std',94 'fp-self-contained/std',95 'pallet-app-promotion/std',96 'pallet-balances-adapter/std',97 'pallet-base-fee/std',98 'pallet-charge-transaction/std',99 'pallet-collator-selection/std',100 'pallet-collective/std',101 'pallet-common/std',102 'pallet-configuration/std',103 'pallet-democracy/std',104 'pallet-ethereum/std',105 'pallet-evm-coder-substrate/std',106 'pallet-evm-contract-helpers/std',107 'pallet-evm-migration/std',108 'pallet-evm-transaction-payment/std',109 'pallet-evm/std',110 'pallet-fungible/std',111 'pallet-gov-origins/std',112 'pallet-inflation/std',113 'pallet-membership/std',114 'pallet-nonfungible/std',115 'pallet-ranked-collective/std',116 'pallet-referenda/std',117 'pallet-refungible/std',118 'pallet-scheduler/std',119 'pallet-structure/std',120 'pallet-sudo/std',121 'pallet-timestamp/std',122 'pallet-transaction-payment-rpc-runtime-api/std',123 'pallet-transaction-payment/std',124 'pallet-treasury/std',125 'pallet-unique/std',126 'pallet-utility/std',127 'parachain-info/std',128 'sp-api/std',129 'sp-block-builder/std',130 'sp-core/std',131 'sp-inherents/std',132 'sp-io/std',133 'sp-offchain/std',134 'sp-runtime/std',135 'sp-session/std',136 'sp-std/std',137 'sp-transaction-pool/std',138 'sp-version/std',139 'staging-xcm-builder/std',140 'staging-xcm-executor/std',141 'staging-xcm/std',142 'up-common/std',143 'up-data-structs/std',144 'up-pov-estimate-rpc/std',145 'up-rpc/std',146 'up-sponsorship/std',147148 "orml-tokens/std",149 "orml-traits/std",150 "orml-vesting/std",151 "orml-xcm-support/std",152 "orml-xtokens/std",153 "pallet-foreign-assets/std",154 "pallet-maintenance/std",155]156stubgen = ["evm-coder/stubgen"]157try-runtime = [158 "pallet-authorship/try-runtime",159 "pallet-collator-selection/try-runtime",160 "pallet-identity/try-runtime",161 "pallet-preimage/try-runtime",162 "pallet-session/try-runtime",163 "pallet-state-trie-migration/try-runtime",164 'cumulus-pallet-aura-ext/try-runtime',165 'cumulus-pallet-dmp-queue/try-runtime',166 'cumulus-pallet-parachain-system/try-runtime',167 'cumulus-pallet-xcm/try-runtime',168 'cumulus-pallet-xcmp-queue/try-runtime',169 'fp-self-contained/try-runtime',170 'frame-executive/try-runtime',171 'frame-support/try-runtime',172 'frame-system/try-runtime',173 'frame-try-runtime',174 'orml-tokens/try-runtime',175 'orml-vesting/try-runtime',176 'orml-xtokens/try-runtime',177 'pallet-app-promotion/try-runtime',178 'pallet-aura/try-runtime',179 'pallet-balances-adapter/try-runtime',180 'pallet-balances/try-runtime',181 'pallet-charge-transaction/try-runtime',182 'pallet-collective/try-runtime',183 'pallet-collective/try-runtime',184 'pallet-common/try-runtime',185 'pallet-configuration/try-runtime',186 'pallet-democracy/try-runtime',187 'pallet-democracy/try-runtime',188 'pallet-ethereum/try-runtime',189 'pallet-evm-coder-substrate/try-runtime',190 'pallet-evm-contract-helpers/try-runtime',191 'pallet-evm-migration/try-runtime',192 'pallet-evm-transaction-payment/try-runtime',193 'pallet-evm/try-runtime',194 'pallet-foreign-assets/try-runtime',195 'pallet-fungible/try-runtime',196 'pallet-gov-origins/try-runtime',197 'pallet-inflation/try-runtime',198 'pallet-maintenance/try-runtime',199 'pallet-membership/try-runtime',200 'pallet-membership/try-runtime',201 'pallet-nonfungible/try-runtime',202 'pallet-ranked-collective/try-runtime',203 'pallet-referenda/try-runtime',204 'pallet-refungible/try-runtime',205 'pallet-scheduler/try-runtime',206 'pallet-scheduler/try-runtime',207 'pallet-structure/try-runtime',208 'pallet-sudo/try-runtime',209 'pallet-timestamp/try-runtime',210 'pallet-transaction-payment/try-runtime',211 'pallet-treasury/try-runtime',212 'pallet-unique/try-runtime',213 'pallet-utility/try-runtime',214 'pallet-xcm/try-runtime',215 'parachain-info/try-runtime',216]217unique-runtime = ['app-promotion', 'foreign-assets', 'refungible']218219app-promotion = []220collator-selection = []221foreign-assets = []222gov-test-timings = []223governance = []224preimage = []225refungible = []226session-test-timings = []227unique-scheduler = []228229################################################################################230# local dependencies231232[dependencies]233cumulus-pallet-aura-ext = { workspace = true }234cumulus-pallet-dmp-queue = { workspace = true }235cumulus-pallet-parachain-system = { workspace = true }236cumulus-pallet-xcm = { workspace = true }237cumulus-pallet-xcmp-queue = { workspace = true }238cumulus-primitives-core = { workspace = true }239cumulus-primitives-timestamp = { workspace = true }240cumulus-primitives-utility = { workspace = true }241frame-executive = { workspace = true }242frame-support = { workspace = true }243frame-system = { workspace = true }244frame-system-rpc-runtime-api = { workspace = true }245orml-tokens = { workspace = true }246orml-traits = { workspace = true }247orml-vesting = { workspace = true }248orml-xcm-support = { workspace = true }249orml-xtokens = { workspace = true }250pallet-aura = { workspace = true }251pallet-authorship = { workspace = true }252pallet-balances = { features = ["insecure_zero_ed"], workspace = true }253pallet-preimage = { workspace = true }254pallet-session = { workspace = true }255pallet-state-trie-migration = { workspace = true }256pallet-sudo = { workspace = true }257pallet-timestamp = { workspace = true }258pallet-transaction-payment = { workspace = true }259pallet-transaction-payment-rpc-runtime-api = { workspace = true }260pallet-treasury = { workspace = true }261pallet-utility = { workspace = true }262pallet-xcm = { workspace = true }263parachain-info = { workspace = true }264parity-scale-codec = { workspace = true }265polkadot-parachain-primitives = { workspace = true }266smallvec = { workspace = true }267sp-api = { workspace = true }268sp-arithmetic = { workspace = true }269sp-block-builder = { workspace = true }270sp-consensus-aura = { workspace = true }271sp-core = { workspace = true }272sp-inherents = { workspace = true }273sp-io = { workspace = true }274sp-offchain = { workspace = true }275sp-runtime = { workspace = true }276sp-session = { workspace = true }277sp-std = { workspace = true }278sp-transaction-pool = { workspace = true }279sp-version = { workspace = true }280staging-xcm = { workspace = true }281staging-xcm-builder = { workspace = true }282staging-xcm-executor = { workspace = true }283284app-promotion-rpc = { workspace = true }285derivative = { workspace = true }286log = { workspace = true }287pallet-app-promotion = { workspace = true }288pallet-balances-adapter = { workspace = true }289pallet-collator-selection = { workspace = true }290pallet-collective = { workspace = true }291pallet-common = { workspace = true }292pallet-configuration = { workspace = true }293pallet-democracy = { workspace = true }294pallet-fungible = { workspace = true }295pallet-gov-origins = { workspace = true }296pallet-identity = { workspace = true }297pallet-inflation = { workspace = true }298pallet-membership = { workspace = true }299pallet-nonfungible = { workspace = true }300pallet-ranked-collective = { workspace = true }301pallet-referenda = { workspace = true }302pallet-refungible = { workspace = true }303pallet-scheduler = { workspace = true }304pallet-structure = { workspace = true }305pallet-unique = { workspace = true }306scale-info = { workspace = true }307up-common = { workspace = true }308up-data-structs = { workspace = true }309up-pov-estimate-rpc = { workspace = true }310up-rpc = { workspace = true }311# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }312evm-coder = { workspace = true }313fp-evm = { workspace = true }314fp-rpc = { workspace = true }315fp-self-contained = { workspace = true }316num_enum = { workspace = true }317pallet-base-fee = { workspace = true }318pallet-charge-transaction = { workspace = true }319pallet-ethereum = { workspace = true }320pallet-evm = { workspace = true }321pallet-evm-coder-substrate = { workspace = true }322pallet-evm-contract-helpers = { workspace = true }323pallet-evm-migration = { workspace = true }324pallet-evm-precompile-simple = { workspace = true }325pallet-evm-transaction-payment = { workspace = true }326pallet-foreign-assets = { workspace = true }327pallet-maintenance = { workspace = true }328precompile-utils-macro = { workspace = true }329up-sponsorship = { workspace = true }330331################################################################################332# Optional dependencies333334frame-benchmarking = { workspace = true, optional = true }335frame-system-benchmarking = { workspace = true, optional = true }336frame-try-runtime = { workspace = true, optional = true }337serde = { workspace = true, optional = true }338339################################################################################340# Test dependencies341342pallet-test-utils = { workspace = true }343344################################################################################345# Other Dependencies346347hex-literal = { workspace = true }348impl-trait-for-tuples = { workspace = true }349350[build-dependencies]351substrate-wasm-builder = { workspace = true }