difftreelog
Missed tests was added. Scheduler pallet renamed.
in: master
13 files changed
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -103,7 +103,7 @@
.PHONY: bench-scheduler
bench-scheduler:
- make _bench2 PALLET=unq-scheduler PALLET_DIR=scheduler
+ make _bench2 PALLET=unique-scheduler PALLET_DIR=scheduler
.PHONY: bench
bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler
pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "pallet-unq-scheduler"
+name = "pallet-unique-scheduler"
version = "0.1.0"
authors = ["Unique Network <support@uniquenetwork.io>"]
edition = "2021"
pallets/scheduler/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/scheduler/src/benchmarking.rs
+++ b/pallets/scheduler/src/benchmarking.rs
@@ -123,6 +123,18 @@
assert!(Agenda::<T>::iter().count() == 0);
}
+ on_initialize_periodic {
+ let s in 1 .. T::MaxScheduledPerBlock::get();
+ let when = BLOCK_NUMBER.into();
+ fill_schedule::<T>(when, s, true, Some(false))?;
+ }: { Scheduler::<T>::on_initialize(when); }
+ verify {
+ assert_eq!(System::<T>::event_count(), s);
+ for i in 0..s {
+ assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);
+ }
+ }
+
on_initialize_periodic_resolved {
let s in 1 .. T::MaxScheduledPerBlock::get();
let when = BLOCK_NUMBER.into();
@@ -135,6 +147,42 @@
}
}
+ on_initialize_aborted {
+ let s in 1 .. T::MaxScheduledPerBlock::get();
+ let when = BLOCK_NUMBER.into();
+ fill_schedule::<T>(when, s, false, None)?;
+ }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }
+ verify {
+ assert_eq!(System::<T>::event_count(), 0);
+ }
+
+ on_initialize_named_aborted {
+ let s in 1 .. T::MaxScheduledPerBlock::get();
+ let when = BLOCK_NUMBER.into();
+ fill_schedule::<T>(when, s, false, Some(false))?;
+ }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }
+ verify {
+ }
+
+ on_initialize_named {
+ let s in 1 .. T::MaxScheduledPerBlock::get();
+ let when = BLOCK_NUMBER.into();
+ fill_schedule::<T>(when, s, false, None)?;
+ }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }
+ verify {
+ assert_eq!(System::<T>::event_count(), 0);
+ }
+
+ on_initialize {
+ let s in 1 .. T::MaxScheduledPerBlock::get();
+ let when = BLOCK_NUMBER.into();
+ fill_schedule::<T>(when, s, false, Some(false))?;
+ }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }
+ verify {
+ assert_eq!(System::<T>::event_count(), s);
+ assert!(Agenda::<T>::iter().count() == 0);
+ }
+
on_initialize_resolved {
let s in 1 .. T::MaxScheduledPerBlock::get();
let when = BLOCK_NUMBER.into();
pallets/scheduler/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -158,11 +158,10 @@
Self::on_initialize_periodic(2) - Self::on_initialize_periodic(1)
}
(true, true, Some(false)) => {
- Self::on_initialize_periodic_named(2) - Self::on_initialize_periodic_named(1)
- }
- (false, false, Some(true)) => {
- Self::on_initialize_resolved(2) - Self::on_initialize_resolved(1)
+ Self::on_initialize_periodic_named_resolved(2)
+ - Self::on_initialize_periodic_named_resolved(1)
}
+ (false, false, Some(true)) => Self::on_initialize(2) - Self::on_initialize(1),
(false, true, Some(true)) => {
Self::on_initialize_named_resolved(2) - Self::on_initialize_named_resolved(1)
}
pallets/scheduler/src/weights.rsdiffbeforeafterboth1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs223//! Autogenerated weights for pallet_unq_scheduler3//! Autogenerated weights for pallet_unique_scheduler4//!4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-06-09, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2022-06-09, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`11// benchmark11// benchmark12// pallet12// pallet13// --pallet13// --pallet14// pallet-unq-scheduler14// pallet-unique-scheduler15// --wasm-execution15// --wasm-execution16// compiled16// compiled17// --extrinsic17// --extrinsic31use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;32use sp_std::marker::PhantomData;333334/// Weight functions needed for pallet_unq_scheduler.34/// Weight functions needed for pallet_unique_scheduler.35pub trait WeightInfo {35pub trait WeightInfo {36 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight;36 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight;37 fn on_initialize_named_resolved(s: u32, ) -> Weight;37 fn on_initialize_named_resolved(s: u32, ) -> Weight;38 fn on_initialize_periodic(s: u32, ) -> Weight;38 fn on_initialize_periodic_resolved(s: u32, ) -> Weight;39 fn on_initialize_periodic_resolved(s: u32, ) -> Weight;40 fn on_initialize_aborted(s: u32, ) -> Weight;41 fn on_initialize_named_aborted(s: u32, ) -> Weight;42 fn on_initialize_named(s: u32, ) -> Weight;43 fn on_initialize(s: u32, ) -> Weight;39 fn on_initialize_resolved(s: u32, ) -> Weight;44 fn on_initialize_resolved(s: u32, ) -> Weight;40 fn schedule_named(s: u32, ) -> Weight;45 fn schedule_named(s: u32, ) -> Weight;41 fn cancel_named(s: u32, ) -> Weight;46 fn cancel_named(s: u32, ) -> Weight;42}47}434844/// Weights for pallet_unq_scheduler using the Substrate node and recommended hardware.49/// Weights for pallet_unique_scheduler using the Substrate node and recommended hardware.45pub struct SubstrateWeight<T>(PhantomData<T>);50pub struct SubstrateWeight<T>(PhantomData<T>);46impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {47 // Storage: Scheduler Agenda (r:2 w:2)52 // Storage: Scheduler Agenda (r:2 w:2)50 // Storage: System BlockWeight (r:1 w:1)55 // Storage: System BlockWeight (r:1 w:1)51 // Storage: Scheduler Lookup (r:0 w:1)56 // Storage: Scheduler Lookup (r:0 w:1)52 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {57 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {53 (39_822_000 as Weight)58 (35_999_000 as Weight)54 // Standard Error: 4_00059 // Standard Error: 3_00055 .saturating_add((31_823_000 as Weight).saturating_mul(s as Weight))60 .saturating_add((32_234_000 as Weight).saturating_mul(s as Weight))56 .saturating_add(T::DbWeight::get().reads(4 as Weight))61 .saturating_add(T::DbWeight::get().reads(4 as Weight))57 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))62 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))58 .saturating_add(T::DbWeight::get().writes(4 as Weight))63 .saturating_add(T::DbWeight::get().writes(4 as Weight))64 // Storage: System BlockWeight (r:1 w:1)69 // Storage: System BlockWeight (r:1 w:1)65 // Storage: Scheduler Lookup (r:0 w:1)70 // Storage: Scheduler Lookup (r:0 w:1)66 fn on_initialize_named_resolved(s: u32, ) -> Weight {71 fn on_initialize_named_resolved(s: u32, ) -> Weight {67 (36_019_000 as Weight)72 (34_874_000 as Weight)68 // Standard Error: 3_00073 // Standard Error: 2_00069 .saturating_add((22_660_000 as Weight).saturating_mul(s as Weight))74 .saturating_add((23_114_000 as Weight).saturating_mul(s as Weight))70 .saturating_add(T::DbWeight::get().reads(4 as Weight))75 .saturating_add(T::DbWeight::get().reads(4 as Weight))71 .saturating_add(T::DbWeight::get().writes(4 as Weight))76 .saturating_add(T::DbWeight::get().writes(4 as Weight))72 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))77 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))76 // Storage: System AllExtrinsicsLen (r:1 w:1)81 // Storage: System AllExtrinsicsLen (r:1 w:1)77 // Storage: System BlockWeight (r:1 w:1)82 // Storage: System BlockWeight (r:1 w:1)78 // Storage: Scheduler Lookup (r:0 w:1)83 // Storage: Scheduler Lookup (r:0 w:1)84 fn on_initialize_periodic(s: u32, ) -> Weight {85 (36_469_000 as Weight)86 // Standard Error: 3_00087 .saturating_add((32_202_000 as Weight).saturating_mul(s as Weight))88 .saturating_add(T::DbWeight::get().reads(4 as Weight))89 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))90 .saturating_add(T::DbWeight::get().writes(4 as Weight))91 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))92 }93 // Storage: Scheduler Agenda (r:2 w:2)94 // Storage: System Account (r:1 w:1)95 // Storage: System AllExtrinsicsLen (r:1 w:1)96 // Storage: System BlockWeight (r:1 w:1)97 // Storage: Scheduler Lookup (r:0 w:1)79 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {98 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {80 (36_613_000 as Weight)99 (35_352_000 as Weight)81 // Standard Error: 3_000100 // Standard Error: 3_00082 .saturating_add((31_895_000 as Weight).saturating_mul(s as Weight))101 .saturating_add((32_309_000 as Weight).saturating_mul(s as Weight))83 .saturating_add(T::DbWeight::get().reads(4 as Weight))102 .saturating_add(T::DbWeight::get().reads(4 as Weight))84 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))103 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))85 .saturating_add(T::DbWeight::get().writes(4 as Weight))104 .saturating_add(T::DbWeight::get().writes(4 as Weight))86 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))105 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))87 }106 }107 // Storage: Scheduler Agenda (r:2 w:2)108 // Storage: Scheduler Lookup (r:0 w:1)109 fn on_initialize_aborted(s: u32, ) -> Weight {110 (11_267_000 as Weight)111 // Standard Error: 1_000112 .saturating_add((9_368_000 as Weight).saturating_mul(s as Weight))113 .saturating_add(T::DbWeight::get().reads(2 as Weight))114 .saturating_add(T::DbWeight::get().writes(2 as Weight))115 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))116 }88 // Storage: Scheduler Agenda (r:1 w:1)117 // Storage: Scheduler Agenda (r:1 w:1)89 // Storage: System Account (r:1 w:1)118 // Storage: System Account (r:1 w:1)90 // Storage: System AllExtrinsicsLen (r:1 w:1)119 // Storage: System AllExtrinsicsLen (r:1 w:1)91 // Storage: System BlockWeight (r:1 w:1)120 // Storage: System BlockWeight (r:1 w:1)92 // Storage: Scheduler Lookup (r:0 w:1)121 // Storage: Scheduler Lookup (r:0 w:1)93 fn on_initialize_resolved(s: u32, ) -> Weight {122 fn on_initialize_named_aborted(s: u32, ) -> Weight {94 (36_252_000 as Weight)123 (35_937_000 as Weight)95 // Standard Error: 3_000124 // Standard Error: 3_00096 .saturating_add((22_662_000 as Weight).saturating_mul(s as Weight))125 .saturating_add((23_037_000 as Weight).saturating_mul(s as Weight))97 .saturating_add(T::DbWeight::get().reads(4 as Weight))126 .saturating_add(T::DbWeight::get().reads(4 as Weight))98 .saturating_add(T::DbWeight::get().writes(4 as Weight))127 .saturating_add(T::DbWeight::get().writes(4 as Weight))99 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))128 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))100 }129 }130 // Storage: Scheduler Agenda (r:2 w:2)131 // Storage: Scheduler Lookup (r:0 w:1)132 fn on_initialize_named(s: u32, ) -> Weight {133 (10_338_000 as Weight)134 // Standard Error: 2_000135 .saturating_add((9_422_000 as Weight).saturating_mul(s as Weight))136 .saturating_add(T::DbWeight::get().reads(2 as Weight))137 .saturating_add(T::DbWeight::get().writes(2 as Weight))138 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))139 }140 // Storage: Scheduler Agenda (r:1 w:1)141 // Storage: System Account (r:1 w:1)142 // Storage: System AllExtrinsicsLen (r:1 w:1)143 // Storage: System BlockWeight (r:1 w:1)144 // Storage: Scheduler Lookup (r:0 w:1)145 fn on_initialize(s: u32, ) -> Weight {146 (37_448_000 as Weight)147 // Standard Error: 7_000148 .saturating_add((22_907_000 as Weight).saturating_mul(s as Weight))149 .saturating_add(T::DbWeight::get().reads(4 as Weight))150 .saturating_add(T::DbWeight::get().writes(4 as Weight))151 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))152 }153 // Storage: Scheduler Agenda (r:1 w:1)154 // Storage: System Account (r:1 w:1)155 // Storage: System AllExtrinsicsLen (r:1 w:1)156 // Storage: System BlockWeight (r:1 w:1)157 // Storage: Scheduler Lookup (r:0 w:1)158 fn on_initialize_resolved(s: u32, ) -> Weight {159 (34_841_000 as Weight)160 // Standard Error: 7_000161 .saturating_add((22_966_000 as Weight).saturating_mul(s as Weight))162 .saturating_add(T::DbWeight::get().reads(4 as Weight))163 .saturating_add(T::DbWeight::get().writes(4 as Weight))164 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))165 }101 // Storage: Scheduler Lookup (r:1 w:1)166 // Storage: Scheduler Lookup (r:1 w:1)102 // Storage: Scheduler Agenda (r:1 w:1)167 // Storage: Scheduler Agenda (r:1 w:1)103 fn schedule_named(s: u32, ) -> Weight {168 fn schedule_named(s: u32, ) -> Weight {104 (34_561_000 as Weight)169 (33_845_000 as Weight)105 // Standard Error: 0170 // Standard Error: 0106 .saturating_add((161_000 as Weight).saturating_mul(s as Weight))171 .saturating_add((168_000 as Weight).saturating_mul(s as Weight))107 .saturating_add(T::DbWeight::get().reads(2 as Weight))172 .saturating_add(T::DbWeight::get().reads(2 as Weight))108 .saturating_add(T::DbWeight::get().writes(2 as Weight))173 .saturating_add(T::DbWeight::get().writes(2 as Weight))109 }174 }110 // Storage: Scheduler Lookup (r:1 w:1)175 // Storage: Scheduler Lookup (r:1 w:1)111 // Storage: Scheduler Agenda (r:1 w:1)176 // Storage: Scheduler Agenda (r:1 w:1)112 fn cancel_named(s: u32, ) -> Weight {177 fn cancel_named(s: u32, ) -> Weight {113 (30_932_000 as Weight)178 (31_169_000 as Weight)114 // Standard Error: 1_000179 // Standard Error: 1_000115 .saturating_add((1_537_000 as Weight).saturating_mul(s as Weight))180 .saturating_add((1_565_000 as Weight).saturating_mul(s as Weight))116 .saturating_add(T::DbWeight::get().reads(2 as Weight))181 .saturating_add(T::DbWeight::get().reads(2 as Weight))117 .saturating_add(T::DbWeight::get().writes(2 as Weight))182 .saturating_add(T::DbWeight::get().writes(2 as Weight))118 }183 }126 // Storage: System BlockWeight (r:1 w:1)191 // Storage: System BlockWeight (r:1 w:1)127 // Storage: Scheduler Lookup (r:0 w:1)192 // Storage: Scheduler Lookup (r:0 w:1)128 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {193 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {129 (39_822_000 as Weight)194 (35_999_000 as Weight)130 // Standard Error: 4_000195 // Standard Error: 3_000131 .saturating_add((31_823_000 as Weight).saturating_mul(s as Weight))196 .saturating_add((32_234_000 as Weight).saturating_mul(s as Weight))132 .saturating_add(RocksDbWeight::get().reads(4 as Weight))197 .saturating_add(RocksDbWeight::get().reads(4 as Weight))133 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))198 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))134 .saturating_add(RocksDbWeight::get().writes(4 as Weight))199 .saturating_add(RocksDbWeight::get().writes(4 as Weight))140 // Storage: System BlockWeight (r:1 w:1)205 // Storage: System BlockWeight (r:1 w:1)141 // Storage: Scheduler Lookup (r:0 w:1)206 // Storage: Scheduler Lookup (r:0 w:1)142 fn on_initialize_named_resolved(s: u32, ) -> Weight {207 fn on_initialize_named_resolved(s: u32, ) -> Weight {143 (36_019_000 as Weight)208 (34_874_000 as Weight)144 // Standard Error: 3_000209 // Standard Error: 2_000145 .saturating_add((22_660_000 as Weight).saturating_mul(s as Weight))210 .saturating_add((23_114_000 as Weight).saturating_mul(s as Weight))146 .saturating_add(RocksDbWeight::get().reads(4 as Weight))211 .saturating_add(RocksDbWeight::get().reads(4 as Weight))147 .saturating_add(RocksDbWeight::get().writes(4 as Weight))212 .saturating_add(RocksDbWeight::get().writes(4 as Weight))148 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))213 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))152 // Storage: System AllExtrinsicsLen (r:1 w:1)217 // Storage: System AllExtrinsicsLen (r:1 w:1)153 // Storage: System BlockWeight (r:1 w:1)218 // Storage: System BlockWeight (r:1 w:1)154 // Storage: Scheduler Lookup (r:0 w:1)219 // Storage: Scheduler Lookup (r:0 w:1)220 fn on_initialize_periodic(s: u32, ) -> Weight {221 (36_469_000 as Weight)222 // Standard Error: 3_000223 .saturating_add((32_202_000 as Weight).saturating_mul(s as Weight))224 .saturating_add(RocksDbWeight::get().reads(4 as Weight))225 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))226 .saturating_add(RocksDbWeight::get().writes(4 as Weight))227 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))228 }229 // Storage: Scheduler Agenda (r:2 w:2)230 // Storage: System Account (r:1 w:1)231 // Storage: System AllExtrinsicsLen (r:1 w:1)232 // Storage: System BlockWeight (r:1 w:1)233 // Storage: Scheduler Lookup (r:0 w:1)155 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {234 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {156 (36_613_000 as Weight)235 (35_352_000 as Weight)157 // Standard Error: 3_000236 // Standard Error: 3_000158 .saturating_add((31_895_000 as Weight).saturating_mul(s as Weight))237 .saturating_add((32_309_000 as Weight).saturating_mul(s as Weight))159 .saturating_add(RocksDbWeight::get().reads(4 as Weight))238 .saturating_add(RocksDbWeight::get().reads(4 as Weight))160 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))239 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))161 .saturating_add(RocksDbWeight::get().writes(4 as Weight))240 .saturating_add(RocksDbWeight::get().writes(4 as Weight))162 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))241 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))163 }242 }243 // Storage: Scheduler Agenda (r:2 w:2)244 // Storage: Scheduler Lookup (r:0 w:1)245 fn on_initialize_aborted(s: u32, ) -> Weight {246 (11_267_000 as Weight)247 // Standard Error: 1_000248 .saturating_add((9_368_000 as Weight).saturating_mul(s as Weight))249 .saturating_add(RocksDbWeight::get().reads(2 as Weight))250 .saturating_add(RocksDbWeight::get().writes(2 as Weight))251 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))252 }164 // Storage: Scheduler Agenda (r:1 w:1)253 // Storage: Scheduler Agenda (r:1 w:1)165 // Storage: System Account (r:1 w:1)254 // Storage: System Account (r:1 w:1)166 // Storage: System AllExtrinsicsLen (r:1 w:1)255 // Storage: System AllExtrinsicsLen (r:1 w:1)167 // Storage: System BlockWeight (r:1 w:1)256 // Storage: System BlockWeight (r:1 w:1)168 // Storage: Scheduler Lookup (r:0 w:1)257 // Storage: Scheduler Lookup (r:0 w:1)258 fn on_initialize_named_aborted(s: u32, ) -> Weight {259 (35_937_000 as Weight)260 // Standard Error: 3_000261 .saturating_add((23_037_000 as Weight).saturating_mul(s as Weight))262 .saturating_add(RocksDbWeight::get().reads(4 as Weight))263 .saturating_add(RocksDbWeight::get().writes(4 as Weight))264 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))265 }266 // Storage: Scheduler Agenda (r:2 w:2)267 // Storage: Scheduler Lookup (r:0 w:1)268 fn on_initialize_named(s: u32, ) -> Weight {269 (10_338_000 as Weight)270 // Standard Error: 2_000271 .saturating_add((9_422_000 as Weight).saturating_mul(s as Weight))272 .saturating_add(RocksDbWeight::get().reads(2 as Weight))273 .saturating_add(RocksDbWeight::get().writes(2 as Weight))274 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))275 }276 // Storage: Scheduler Agenda (r:1 w:1)277 // Storage: System Account (r:1 w:1)278 // Storage: System AllExtrinsicsLen (r:1 w:1)279 // Storage: System BlockWeight (r:1 w:1)280 // Storage: Scheduler Lookup (r:0 w:1)281 fn on_initialize(s: u32, ) -> Weight {282 (37_448_000 as Weight)283 // Standard Error: 7_000284 .saturating_add((22_907_000 as Weight).saturating_mul(s as Weight))285 .saturating_add(RocksDbWeight::get().reads(4 as Weight))286 .saturating_add(RocksDbWeight::get().writes(4 as Weight))287 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))288 }289 // Storage: Scheduler Agenda (r:1 w:1)290 // Storage: System Account (r:1 w:1)291 // Storage: System AllExtrinsicsLen (r:1 w:1)292 // Storage: System BlockWeight (r:1 w:1)293 // Storage: Scheduler Lookup (r:0 w:1)169 fn on_initialize_resolved(s: u32, ) -> Weight {294 fn on_initialize_resolved(s: u32, ) -> Weight {170 (36_252_000 as Weight)295 (34_841_000 as Weight)171 // Standard Error: 3_000296 // Standard Error: 7_000172 .saturating_add((22_662_000 as Weight).saturating_mul(s as Weight))297 .saturating_add((22_966_000 as Weight).saturating_mul(s as Weight))173 .saturating_add(RocksDbWeight::get().reads(4 as Weight))298 .saturating_add(RocksDbWeight::get().reads(4 as Weight))174 .saturating_add(RocksDbWeight::get().writes(4 as Weight))299 .saturating_add(RocksDbWeight::get().writes(4 as Weight))175 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))300 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))176 }301 }177 // Storage: Scheduler Lookup (r:1 w:1)302 // Storage: Scheduler Lookup (r:1 w:1)178 // Storage: Scheduler Agenda (r:1 w:1)303 // Storage: Scheduler Agenda (r:1 w:1)179 fn schedule_named(s: u32, ) -> Weight {304 fn schedule_named(s: u32, ) -> Weight {180 (34_561_000 as Weight)305 (33_845_000 as Weight)181 // Standard Error: 0306 // Standard Error: 0182 .saturating_add((161_000 as Weight).saturating_mul(s as Weight))307 .saturating_add((168_000 as Weight).saturating_mul(s as Weight))183 .saturating_add(RocksDbWeight::get().reads(2 as Weight))308 .saturating_add(RocksDbWeight::get().reads(2 as Weight))184 .saturating_add(RocksDbWeight::get().writes(2 as Weight))309 .saturating_add(RocksDbWeight::get().writes(2 as Weight))185 }310 }186 // Storage: Scheduler Lookup (r:1 w:1)311 // Storage: Scheduler Lookup (r:1 w:1)187 // Storage: Scheduler Agenda (r:1 w:1)312 // Storage: Scheduler Agenda (r:1 w:1)188 fn cancel_named(s: u32, ) -> Weight {313 fn cancel_named(s: u32, ) -> Weight {189 (30_932_000 as Weight)314 (31_169_000 as Weight)190 // Standard Error: 1_000315 // Standard Error: 1_000191 .saturating_add((1_537_000 as Weight).saturating_mul(s as Weight))316 .saturating_add((1_565_000 as Weight).saturating_mul(s as Weight))192 .saturating_add(RocksDbWeight::get().reads(2 as Weight))317 .saturating_add(RocksDbWeight::get().reads(2 as Weight))193 .saturating_add(RocksDbWeight::get().writes(2 as Weight))318 .saturating_add(RocksDbWeight::get().writes(2 as Weight))194 }319 }runtime/common/Cargo.tomldiffbeforeafterboth--- a/runtime/common/Cargo.toml
+++ b/runtime/common/Cargo.toml
@@ -89,7 +89,7 @@
default-features = false
path = "../../pallets/refungible"
-[dependencies.pallet-unq-scheduler]
+[dependencies.pallet-unique-scheduler]
default-features = false
path = "../../pallets/scheduler"
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -774,7 +774,7 @@
list_benchmark!(list, extra, pallet_fungible, Fungible);
list_benchmark!(list, extra, pallet_refungible, Refungible);
list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
- list_benchmark!(list, extra, pallet_unq_scheduler, Scheduler);
+ list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);
// list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
let storage_info = AllPalletsReversedWithSystemFirst::storage_info();
@@ -818,7 +818,7 @@
add_benchmark!(params, batches, pallet_fungible, Fungible);
add_benchmark!(params, batches, pallet_refungible, Refungible);
add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
- add_benchmark!(params, batches, pallet_unq_scheduler, Scheduler);
+ add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);
// add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -36,7 +36,7 @@
'pallet-proxy-rmrk-core/runtime-benchmarks',
'pallet-unique/runtime-benchmarks',
'pallet-inflation/runtime-benchmarks',
- 'pallet-unq-scheduler/runtime-benchmarks',
+ 'pallet-unique-scheduler/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
@@ -94,7 +94,7 @@
'pallet-proxy-rmrk-core/std',
'pallet-proxy-rmrk-equip/std',
'pallet-unique/std',
- 'pallet-unq-scheduler/std',
+ 'pallet-unique-scheduler/std',
'pallet-charge-transaction/std',
'up-data-structs/std',
'sp-api/std',
@@ -413,7 +413,7 @@
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }
pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }
-pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
+pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.22", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -68,7 +68,7 @@
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,
},
};
-use pallet_unq_scheduler::DispatchCall;
+use pallet_unique_scheduler::DispatchCall;
use up_data_structs::{
CollectionId, TokenId, TokenData, Property, PropertyKeyPermission, CollectionLimits,
CollectionStats, RpcCollection,
@@ -966,7 +966,7 @@
}
pub struct SchedulerPaymentExecutor;
-impl<T: frame_system::Config + pallet_unq_scheduler::Config, SelfContainedSignedInfo>
+impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
where
<T as frame_system::Config>::Call: Member
@@ -976,13 +976,13 @@
+ From<frame_system::Call<Runtime>>,
SelfContainedSignedInfo: Send + Sync + 'static,
Call: From<<T as frame_system::Config>::Call>
- + From<<T as pallet_unq_scheduler::Config>::Call>
+ + From<<T as pallet_unique_scheduler::Config>::Call>
+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
{
fn dispatch_call(
signer: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<
Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
TransactionValidityError,
@@ -1008,7 +1008,7 @@
fn reserve_balance(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
count: u32,
) -> Result<(), DispatchError> {
let dispatch_info = call.get_dispatch_info();
@@ -1025,7 +1025,7 @@
fn pay_for_call(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<u128, DispatchError> {
let dispatch_info = call.get_dispatch_info();
let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
@@ -1066,7 +1066,7 @@
}
}
-impl pallet_unq_scheduler::Config for Runtime {
+impl pallet_unique_scheduler::Config for Runtime {
type Event = Event;
type Origin = Origin;
type Currency = Balances;
@@ -1155,7 +1155,7 @@
// Unique Pallets
Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
+ Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
// free = 63
Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -36,7 +36,7 @@
'pallet-proxy-rmrk-core/runtime-benchmarks',
'pallet-unique/runtime-benchmarks',
'pallet-inflation/runtime-benchmarks',
- 'pallet-unq-scheduler/runtime-benchmarks',
+ 'pallet-unique-scheduler/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
@@ -93,7 +93,7 @@
'pallet-nonfungible/std',
'pallet-proxy-rmrk-core/std',
'pallet-unique/std',
- 'pallet-unq-scheduler/std',
+ 'pallet-unique-scheduler/std',
'pallet-charge-transaction/std',
'up-data-structs/std',
'sp-api/std',
@@ -417,7 +417,7 @@
pallet-refungible = { default-features = false, path = "../../pallets/refungible" }
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }
-pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
+pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.22", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -68,7 +68,7 @@
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,
},
};
-use pallet_unq_scheduler::DispatchCall;
+use pallet_unique_scheduler::DispatchCall;
use up_data_structs::{
CollectionId, TokenId, TokenData, Property, PropertyKeyPermission, CollectionLimits,
CollectionStats, RpcCollection,
@@ -963,7 +963,7 @@
}
pub struct SchedulerPaymentExecutor;
-impl<T: frame_system::Config + pallet_unq_scheduler::Config, SelfContainedSignedInfo>
+impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
where
<T as frame_system::Config>::Call: Member
@@ -973,13 +973,13 @@
+ From<frame_system::Call<Runtime>>,
SelfContainedSignedInfo: Send + Sync + 'static,
Call: From<<T as frame_system::Config>::Call>
- + From<<T as pallet_unq_scheduler::Config>::Call>
+ + From<<T as pallet_unique_scheduler::Config>::Call>
+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
{
fn dispatch_call(
signer: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<
Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
TransactionValidityError,
@@ -1005,7 +1005,7 @@
fn reserve_balance(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
count: u32,
) -> Result<(), DispatchError> {
let dispatch_info = call.get_dispatch_info();
@@ -1022,7 +1022,7 @@
fn pay_for_call(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<u128, DispatchError> {
let dispatch_info = call.get_dispatch_info();
let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
@@ -1063,7 +1063,7 @@
}
}
-impl pallet_unq_scheduler::Config for Runtime {
+impl pallet_unique_scheduler::Config for Runtime {
type Event = Event;
type Origin = Origin;
type Currency = Balances;
@@ -1151,7 +1151,7 @@
// Unique Pallets
Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
+ Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
// free = 63
Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -36,7 +36,7 @@
'pallet-proxy-rmrk-core/runtime-benchmarks',
'pallet-unique/runtime-benchmarks',
'pallet-inflation/runtime-benchmarks',
- 'pallet-unq-scheduler/runtime-benchmarks',
+ 'pallet-unique-scheduler/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
@@ -94,7 +94,7 @@
'pallet-nonfungible/std',
'pallet-proxy-rmrk-core/std',
'pallet-unique/std',
- 'pallet-unq-scheduler/std',
+ 'pallet-unique-scheduler/std',
'pallet-charge-transaction/std',
'up-data-structs/std',
'sp-api/std',
@@ -410,7 +410,7 @@
pallet-refungible = { default-features = false, path = "../../pallets/refungible" }
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }
-pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
+pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.22", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -68,7 +68,7 @@
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier,
},
};
-use pallet_unq_scheduler::DispatchCall;
+use pallet_unique_scheduler::DispatchCall;
use up_data_structs::{
CollectionId, TokenId, TokenData, Property, PropertyKeyPermission, CollectionLimits,
CollectionStats, RpcCollection,
@@ -962,7 +962,7 @@
}
pub struct SchedulerPaymentExecutor;
-impl<T: frame_system::Config + pallet_unq_scheduler::Config, SelfContainedSignedInfo>
+impl<T: frame_system::Config + pallet_unique_scheduler::Config, SelfContainedSignedInfo>
DispatchCall<T, SelfContainedSignedInfo> for SchedulerPaymentExecutor
where
<T as frame_system::Config>::Call: Member
@@ -972,13 +972,13 @@
+ From<frame_system::Call<Runtime>>,
SelfContainedSignedInfo: Send + Sync + 'static,
Call: From<<T as frame_system::Config>::Call>
- + From<<T as pallet_unq_scheduler::Config>::Call>
+ + From<<T as pallet_unique_scheduler::Config>::Call>
+ SelfContainedCall<SignedInfo = SelfContainedSignedInfo>,
sp_runtime::AccountId32: From<<T as frame_system::Config>::AccountId>,
{
fn dispatch_call(
signer: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<
Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
TransactionValidityError,
@@ -1004,7 +1004,7 @@
fn reserve_balance(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
count: u32,
) -> Result<(), DispatchError> {
let dispatch_info = call.get_dispatch_info();
@@ -1021,7 +1021,7 @@
fn pay_for_call(
id: [u8; 16],
sponsor: <T as frame_system::Config>::AccountId,
- call: <T as pallet_unq_scheduler::Config>::Call,
+ call: <T as pallet_unique_scheduler::Config>::Call,
) -> Result<u128, DispatchError> {
let dispatch_info = call.get_dispatch_info();
let weight: Balance = ChargeTransactionPayment::traditional_fee(0, &dispatch_info, 0);
@@ -1062,7 +1062,7 @@
}
}
-impl pallet_unq_scheduler::Config for Runtime {
+impl pallet_unique_scheduler::Config for Runtime {
type Event = Event;
type Origin = Origin;
type Currency = Balances;
@@ -1150,7 +1150,7 @@
// Unique Pallets
Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
+ Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
// free = 63
Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,