git.delta.rocks / unique-network / refs/commits / 71fe9c7591f1

difftreelog

Merge pull request #810 from UniqueNetwork/fix/app-promotion-benchmarks

Yaroslav Bolyukin2022-12-26parents: #192d143 #e38b41f.patch.diff
in: master

8 files changed

modifiedCargo.lockdiffbeforeafterboth
55505550
5551[[package]]5551[[package]]
5552name = "pallet-app-promotion"5552name = "pallet-app-promotion"
5553version = "0.1.2"5553version = "0.1.3"
5554dependencies = [5554dependencies = [
5555 "frame-benchmarking",5555 "frame-benchmarking",
5556 "frame-support",5556 "frame-support",
modifiedpallets/app-promotion/CHANGELOG.mddiffbeforeafterboth
44
5<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->
66
7## [0.1.3] - 2022-12-25
8
9### Fixed
10
11- Benchmarks for `payoutStakers` and `unstake` extrinsics.
12
7## [0.1.2] - 2022-12-2013## [0.1.2] - 2022-12-20
814
9### Fixed15### Fixed
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
9license = 'GPLv3'9license = 'GPLv3'
10name = 'pallet-app-promotion'10name = 'pallet-app-promotion'
11repository = 'https://github.com/UniqueNetwork/unique-chain'11repository = 'https://github.com/UniqueNetwork/unique-chain'
12version = '0.1.2'12version = '0.1.3'
1313
14[package.metadata.docs.rs]14[package.metadata.docs.rs]
15targets = ['x86_64-unknown-linux-gnu']15targets = ['x86_64-unknown-linux-gnu']
modifiedpallets/app-promotion/src/benchmarking.rsdiffbeforeafterboth
77 } : _(RawOrigin::Root, T::CrossAccountId::from_sub(pallet_admin))77 } : _(RawOrigin::Root, T::CrossAccountId::from_sub(pallet_admin))
7878
79 payout_stakers{79 payout_stakers{
80 let b in 1..101;80 let b in 1..100;
8181
82 let pallet_admin = account::<T::AccountId>("admin", 1, SEED);82 let pallet_admin = account::<T::AccountId>("admin", 1, SEED);
83 let share = Perbill::from_rational(1u32, 20);83 let share = Perbill::from_rational(1u32, 20);
84 PromototionPallet::<T>::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?;84 PromototionPallet::<T>::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?;
85 <T as Config>::Currency::make_free_balance_be(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());85 <T as Config>::Currency::make_free_balance_be(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
86
87 let staker: T::AccountId = account("caller", 0, SEED);
88 <T as Config>::Currency::make_free_balance_be(&staker, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());86 <T as Config>::Currency::make_free_balance_be(&<T as pallet::Config>::TreasuryAccountId::get(), Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
87
89 let stakers: Vec<T::AccountId> = (0..b).map(|index| account("staker", index, SEED)).collect();88 let stakers: Vec<T::AccountId> = (0..b).map(|index| account("staker", index, SEED)).collect();
90 stakers.iter().for_each(|staker| {89 stakers.iter().for_each(|staker| {
91 <T as Config>::Currency::make_free_balance_be(&staker, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());90 <T as Config>::Currency::make_free_balance_be(&staker, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
92 });91 });
93 (0..10).try_for_each(|_| {92 (1..11).try_for_each(|i| {
93 <frame_system::Pallet<T>>::set_block_number(i.into());
94 T::RelayBlockNumberProvider::set_block_number((2*i).into());
95 assert_eq!(<frame_system::Pallet<T>>::block_number(), i.into());
96 assert_eq!(T::RelayBlockNumberProvider::current_block_number(), (2*i).into());
94 stakers.iter()97 stakers.iter()
95 .map(|staker| {98 .map(|staker| {
96 PromototionPallet::<T>::stake(RawOrigin::Signed(staker.clone()).into(), Into::<BalanceOf<T>>::into(100u128) * T::Nominal::get())99 PromototionPallet::<T>::stake(RawOrigin::Signed(staker.clone()).into(), Into::<BalanceOf<T>>::into(100u128) * T::Nominal::get())
97 }).collect::<Result<Vec<_>, _>>()?;100 }).collect::<Result<Vec<_>, _>>()?;
98 <frame_system::Pallet<T>>::finalize();101
99 Result::<(), sp_runtime::DispatchError>::Ok(())102 Result::<(), sp_runtime::DispatchError>::Ok(())
100 })?;103 })?;
104
105 let stakes = Staked::<T>::iter_prefix((&stakers[0],)).into_iter().collect::<Vec<_>>();
106 assert_eq!(stakes.len(), 10);
107
108 <frame_system::Pallet<T>>::set_block_number(15_000.into());
109 T::RelayBlockNumberProvider::set_block_number(30_000.into());
101 } : _(RawOrigin::Signed(pallet_admin.clone()), Some(b as u8))110 } : _(RawOrigin::Signed(pallet_admin.clone()), Some(b as u8))
102111
103 stake {112 stake {
110 let caller = account::<T::AccountId>("caller", 0, SEED);119 let caller = account::<T::AccountId>("caller", 0, SEED);
111 let share = Perbill::from_rational(1u32, 20);120 let share = Perbill::from_rational(1u32, 20);
112 let _ = <T as Config>::Currency::make_free_balance_be(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());121 let _ = <T as Config>::Currency::make_free_balance_be(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
113 (0..10).map(|_| {122 (1..11).map(|i| {
114 // used to change block number123 // used to change block number
115 <frame_system::Pallet<T>>::finalize();124 <frame_system::Pallet<T>>::set_block_number(i.into());
125 T::RelayBlockNumberProvider::set_block_number((2*i).into());
126 assert_eq!(<frame_system::Pallet<T>>::block_number(), i.into());
127 assert_eq!(T::RelayBlockNumberProvider::current_block_number(), (2*i).into());
116 PromototionPallet::<T>::stake(RawOrigin::Signed(caller.clone()).into(), share * <T as Config>::Currency::total_balance(&caller))128 PromototionPallet::<T>::stake(RawOrigin::Signed(caller.clone()).into(), share * <T as Config>::Currency::total_balance(&caller))
117 }).collect::<Result<Vec<_>, _>>()?;129 }).collect::<Result<Vec<_>, _>>()?;
118130
modifiedpallets/app-promotion/src/weights.rsdiffbeforeafterboth
3//! Autogenerated weights for pallet_app_promotion3//! Autogenerated weights for pallet_app_promotion
4//!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-dev
6//! DATE: 2022-09-07, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2022-12-25, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 10247//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
88
9// Executed Command:9// Executed Command:
51 // Storage: AppPromotion PendingUnstake (r:1 w:0)51 // Storage: AppPromotion PendingUnstake (r:1 w:0)
52 // Storage: System Account (r:1 w:1)52 // Storage: System Account (r:1 w:1)
53 fn on_initialize(b: u32, ) -> Weight {53 fn on_initialize(b: u32, ) -> Weight {
54 Weight::from_ref_time(2_651_000)54 Weight::from_ref_time(3_079_948 as u64)
55 // Standard Error: 103_00055 // Standard Error: 30_376
56 .saturating_add(Weight::from_ref_time(6_024_000).saturating_mul(b as u64))56 .saturating_add(Weight::from_ref_time(6_343_630 as u64).saturating_mul(b as u64))
57 .saturating_add(T::DbWeight::get().reads(1 as u64))57 .saturating_add(T::DbWeight::get().reads(1 as u64))
58 .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))58 .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
59 .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))59 .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))
60 }60 }
61 // Storage: AppPromotion Admin (r:0 w:1)61 // Storage: AppPromotion Admin (r:0 w:1)
62 fn set_admin_address() -> Weight {62 fn set_admin_address() -> Weight {
63 Weight::from_ref_time(7_117_000)63 Weight::from_ref_time(6_653_000 as u64)
64 .saturating_add(T::DbWeight::get().writes(1 as u64))64 .saturating_add(T::DbWeight::get().writes(1 as u64))
65 }65 }
66 // Storage: AppPromotion Admin (r:1 w:0)66 // Storage: AppPromotion Admin (r:1 w:0)
67 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
67 // Storage: ParachainSystem ValidationData (r:1 w:0)68 // Storage: ParachainSystem ValidationData (r:1 w:0)
68 // Storage: AppPromotion NextCalculatedRecord (r:1 w:1)69 // Storage: AppPromotion PreviousCalculatedRecord (r:1 w:1)
69 // Storage: AppPromotion Staked (r:2 w:0)70 // Storage: AppPromotion Staked (r:11 w:10)
71 // Storage: System Account (r:2 w:2)
72 // Storage: Balances Locks (r:1 w:1)
73 // Storage: AppPromotion TotalStaked (r:1 w:1)
70 fn payout_stakers(b: u32, ) -> Weight {74 fn payout_stakers(b: u32, ) -> Weight {
71 Weight::from_ref_time(9_958_000)75 Weight::from_ref_time(74_048_000 as u64)
72 // Standard Error: 8_00076 // Standard Error: 33_223
77 .saturating_add(Weight::from_ref_time(57_702_092 as u64).saturating_mul(b as u64))
73 .saturating_add(Weight::from_ref_time(4_406_000).saturating_mul(b as u64))78 .saturating_add(T::DbWeight::get().reads(7 as u64))
74 .saturating_add(T::DbWeight::get().reads(4 as u64))79 .saturating_add(T::DbWeight::get().reads((12 as u64).saturating_mul(b as u64)))
75 .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))80 .saturating_add(T::DbWeight::get().writes(3 as u64))
76 .saturating_add(T::DbWeight::get().writes(1 as u64))81 .saturating_add(T::DbWeight::get().writes((12 as u64).saturating_mul(b as u64)))
77 }82 }
78 // Storage: AppPromotion StakesPerAccount (r:1 w:1)83 // Storage: AppPromotion StakesPerAccount (r:1 w:1)
84 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
79 // Storage: System Account (r:1 w:1)85 // Storage: System Account (r:1 w:1)
80 // Storage: Balances Locks (r:1 w:1)86 // Storage: Balances Locks (r:1 w:1)
81 // Storage: ParachainSystem ValidationData (r:1 w:0)87 // Storage: ParachainSystem ValidationData (r:1 w:0)
82 // Storage: AppPromotion Staked (r:1 w:1)88 // Storage: AppPromotion Staked (r:1 w:1)
83 // Storage: AppPromotion TotalStaked (r:1 w:1)89 // Storage: AppPromotion TotalStaked (r:1 w:1)
84 fn stake() -> Weight {90 fn stake() -> Weight {
85 Weight::from_ref_time(20_574_000)91 Weight::from_ref_time(20_314_000 as u64)
86 .saturating_add(T::DbWeight::get().reads(6 as u64))92 .saturating_add(T::DbWeight::get().reads(7 as u64))
87 .saturating_add(T::DbWeight::get().writes(5 as u64))93 .saturating_add(T::DbWeight::get().writes(5 as u64))
88 }94 }
95 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
89 // Storage: AppPromotion PendingUnstake (r:1 w:1)96 // Storage: AppPromotion PendingUnstake (r:1 w:1)
90 // Storage: AppPromotion Staked (r:2 w:1)97 // Storage: AppPromotion Staked (r:11 w:10)
91 // Storage: Balances Locks (r:1 w:1)98 // Storage: Balances Locks (r:1 w:1)
92 // Storage: System Account (r:1 w:1)99 // Storage: System Account (r:1 w:1)
93 // Storage: AppPromotion TotalStaked (r:1 w:1)100 // Storage: AppPromotion TotalStaked (r:1 w:1)
94 // Storage: AppPromotion StakesPerAccount (r:0 w:1)101 // Storage: AppPromotion StakesPerAccount (r:0 w:1)
95 fn unstake() -> Weight {102 fn unstake() -> Weight {
96 Weight::from_ref_time(31_703_000)103 Weight::from_ref_time(64_582_000 as u64)
97 .saturating_add(T::DbWeight::get().reads(6 as u64))104 .saturating_add(T::DbWeight::get().reads(16 as u64))
98 .saturating_add(T::DbWeight::get().writes(6 as u64))105 .saturating_add(T::DbWeight::get().writes(15 as u64))
99 }106 }
100 // Storage: AppPromotion Admin (r:1 w:0)107 // Storage: AppPromotion Admin (r:1 w:0)
101 // Storage: Common CollectionById (r:1 w:1)108 // Storage: Common CollectionById (r:1 w:1)
102 fn sponsor_collection() -> Weight {109 fn sponsor_collection() -> Weight {
103 Weight::from_ref_time(12_932_000)110 Weight::from_ref_time(16_364_000 as u64)
104 .saturating_add(T::DbWeight::get().reads(2 as u64))111 .saturating_add(T::DbWeight::get().reads(2 as u64))
105 .saturating_add(T::DbWeight::get().writes(1 as u64))112 .saturating_add(T::DbWeight::get().writes(1 as u64))
106 }113 }
107 // Storage: AppPromotion Admin (r:1 w:0)114 // Storage: AppPromotion Admin (r:1 w:0)
108 // Storage: Common CollectionById (r:1 w:1)115 // Storage: Common CollectionById (r:1 w:1)
109 fn stop_sponsoring_collection() -> Weight {116 fn stop_sponsoring_collection() -> Weight {
110 Weight::from_ref_time(12_453_000)117 Weight::from_ref_time(15_710_000 as u64)
111 .saturating_add(T::DbWeight::get().reads(2 as u64))118 .saturating_add(T::DbWeight::get().reads(2 as u64))
112 .saturating_add(T::DbWeight::get().writes(1 as u64))119 .saturating_add(T::DbWeight::get().writes(1 as u64))
113 }120 }
114 // Storage: AppPromotion Admin (r:1 w:0)121 // Storage: AppPromotion Admin (r:1 w:0)
115 // Storage: EvmContractHelpers Sponsoring (r:0 w:1)122 // Storage: EvmContractHelpers Sponsoring (r:0 w:1)
116 fn sponsor_contract() -> Weight {123 fn sponsor_contract() -> Weight {
117 Weight::from_ref_time(11_952_000)124 Weight::from_ref_time(12_669_000 as u64)
118 .saturating_add(T::DbWeight::get().reads(1 as u64))125 .saturating_add(T::DbWeight::get().reads(1 as u64))
119 .saturating_add(T::DbWeight::get().writes(1 as u64))126 .saturating_add(T::DbWeight::get().writes(1 as u64))
120 }127 }
121 // Storage: AppPromotion Admin (r:1 w:0)128 // Storage: AppPromotion Admin (r:1 w:0)
122 // Storage: EvmContractHelpers Sponsoring (r:1 w:1)129 // Storage: EvmContractHelpers Sponsoring (r:1 w:1)
123 fn stop_sponsoring_contract() -> Weight {130 fn stop_sponsoring_contract() -> Weight {
124 Weight::from_ref_time(12_538_000)131 Weight::from_ref_time(14_406_000 as u64)
125 .saturating_add(T::DbWeight::get().reads(2 as u64))132 .saturating_add(T::DbWeight::get().reads(2 as u64))
126 .saturating_add(T::DbWeight::get().writes(1 as u64))133 .saturating_add(T::DbWeight::get().writes(1 as u64))
127 }134 }
132 // Storage: AppPromotion PendingUnstake (r:1 w:0)139 // Storage: AppPromotion PendingUnstake (r:1 w:0)
133 // Storage: System Account (r:1 w:1)140 // Storage: System Account (r:1 w:1)
134 fn on_initialize(b: u32, ) -> Weight {141 fn on_initialize(b: u32, ) -> Weight {
135 Weight::from_ref_time(2_651_000)142 Weight::from_ref_time(3_079_948 as u64)
136 // Standard Error: 103_000143 // Standard Error: 30_376
137 .saturating_add(Weight::from_ref_time(6_024_000).saturating_mul(b as u64))144 .saturating_add(Weight::from_ref_time(6_343_630 as u64).saturating_mul(b as u64))
138 .saturating_add(RocksDbWeight::get().reads(1 as u64))145 .saturating_add(RocksDbWeight::get().reads(1 as u64))
139 .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))146 .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
140 .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))147 .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))
141 }148 }
142 // Storage: AppPromotion Admin (r:0 w:1)149 // Storage: AppPromotion Admin (r:0 w:1)
143 fn set_admin_address() -> Weight {150 fn set_admin_address() -> Weight {
144 Weight::from_ref_time(7_117_000)151 Weight::from_ref_time(6_653_000 as u64)
145 .saturating_add(RocksDbWeight::get().writes(1 as u64))152 .saturating_add(RocksDbWeight::get().writes(1 as u64))
146 }153 }
147 // Storage: AppPromotion Admin (r:1 w:0)154 // Storage: AppPromotion Admin (r:1 w:0)
155 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
148 // Storage: ParachainSystem ValidationData (r:1 w:0)156 // Storage: ParachainSystem ValidationData (r:1 w:0)
149 // Storage: AppPromotion NextCalculatedRecord (r:1 w:1)157 // Storage: AppPromotion PreviousCalculatedRecord (r:1 w:1)
150 // Storage: AppPromotion Staked (r:2 w:0)158 // Storage: AppPromotion Staked (r:11 w:10)
159 // Storage: System Account (r:2 w:2)
160 // Storage: Balances Locks (r:1 w:1)
161 // Storage: AppPromotion TotalStaked (r:1 w:1)
151 fn payout_stakers(b: u32, ) -> Weight {162 fn payout_stakers(b: u32, ) -> Weight {
152 Weight::from_ref_time(9_958_000)163 Weight::from_ref_time(74_048_000 as u64)
153 // Standard Error: 8_000164 // Standard Error: 33_223
165 .saturating_add(Weight::from_ref_time(57_702_092 as u64).saturating_mul(b as u64))
154 .saturating_add(Weight::from_ref_time(4_406_000).saturating_mul(b as u64))166 .saturating_add(RocksDbWeight::get().reads(7 as u64))
155 .saturating_add(RocksDbWeight::get().reads(4 as u64))167 .saturating_add(RocksDbWeight::get().reads((12 as u64).saturating_mul(b as u64)))
156 .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))168 .saturating_add(RocksDbWeight::get().writes(3 as u64))
157 .saturating_add(RocksDbWeight::get().writes(1 as u64))169 .saturating_add(RocksDbWeight::get().writes((12 as u64).saturating_mul(b as u64)))
158 }170 }
159 // Storage: AppPromotion StakesPerAccount (r:1 w:1)171 // Storage: AppPromotion StakesPerAccount (r:1 w:1)
172 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
160 // Storage: System Account (r:1 w:1)173 // Storage: System Account (r:1 w:1)
161 // Storage: Balances Locks (r:1 w:1)174 // Storage: Balances Locks (r:1 w:1)
162 // Storage: ParachainSystem ValidationData (r:1 w:0)175 // Storage: ParachainSystem ValidationData (r:1 w:0)
163 // Storage: AppPromotion Staked (r:1 w:1)176 // Storage: AppPromotion Staked (r:1 w:1)
164 // Storage: AppPromotion TotalStaked (r:1 w:1)177 // Storage: AppPromotion TotalStaked (r:1 w:1)
165 fn stake() -> Weight {178 fn stake() -> Weight {
166 Weight::from_ref_time(20_574_000)179 Weight::from_ref_time(20_314_000 as u64)
167 .saturating_add(RocksDbWeight::get().reads(6 as u64))180 .saturating_add(RocksDbWeight::get().reads(7 as u64))
168 .saturating_add(RocksDbWeight::get().writes(5 as u64))181 .saturating_add(RocksDbWeight::get().writes(5 as u64))
169 }182 }
183 // Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)
170 // Storage: AppPromotion PendingUnstake (r:1 w:1)184 // Storage: AppPromotion PendingUnstake (r:1 w:1)
171 // Storage: AppPromotion Staked (r:2 w:1)185 // Storage: AppPromotion Staked (r:11 w:10)
172 // Storage: Balances Locks (r:1 w:1)186 // Storage: Balances Locks (r:1 w:1)
173 // Storage: System Account (r:1 w:1)187 // Storage: System Account (r:1 w:1)
174 // Storage: AppPromotion TotalStaked (r:1 w:1)188 // Storage: AppPromotion TotalStaked (r:1 w:1)
175 // Storage: AppPromotion StakesPerAccount (r:0 w:1)189 // Storage: AppPromotion StakesPerAccount (r:0 w:1)
176 fn unstake() -> Weight {190 fn unstake() -> Weight {
177 Weight::from_ref_time(31_703_000)191 Weight::from_ref_time(64_582_000 as u64)
178 .saturating_add(RocksDbWeight::get().reads(6 as u64))192 .saturating_add(RocksDbWeight::get().reads(16 as u64))
179 .saturating_add(RocksDbWeight::get().writes(6 as u64))193 .saturating_add(RocksDbWeight::get().writes(15 as u64))
180 }194 }
181 // Storage: AppPromotion Admin (r:1 w:0)195 // Storage: AppPromotion Admin (r:1 w:0)
182 // Storage: Common CollectionById (r:1 w:1)196 // Storage: Common CollectionById (r:1 w:1)
183 fn sponsor_collection() -> Weight {197 fn sponsor_collection() -> Weight {
184 Weight::from_ref_time(12_932_000)198 Weight::from_ref_time(16_364_000 as u64)
185 .saturating_add(RocksDbWeight::get().reads(2 as u64))199 .saturating_add(RocksDbWeight::get().reads(2 as u64))
186 .saturating_add(RocksDbWeight::get().writes(1 as u64))200 .saturating_add(RocksDbWeight::get().writes(1 as u64))
187 }201 }
188 // Storage: AppPromotion Admin (r:1 w:0)202 // Storage: AppPromotion Admin (r:1 w:0)
189 // Storage: Common CollectionById (r:1 w:1)203 // Storage: Common CollectionById (r:1 w:1)
190 fn stop_sponsoring_collection() -> Weight {204 fn stop_sponsoring_collection() -> Weight {
191 Weight::from_ref_time(12_453_000)205 Weight::from_ref_time(15_710_000 as u64)
192 .saturating_add(RocksDbWeight::get().reads(2 as u64))206 .saturating_add(RocksDbWeight::get().reads(2 as u64))
193 .saturating_add(RocksDbWeight::get().writes(1 as u64))207 .saturating_add(RocksDbWeight::get().writes(1 as u64))
194 }208 }
195 // Storage: AppPromotion Admin (r:1 w:0)209 // Storage: AppPromotion Admin (r:1 w:0)
196 // Storage: EvmContractHelpers Sponsoring (r:0 w:1)210 // Storage: EvmContractHelpers Sponsoring (r:0 w:1)
197 fn sponsor_contract() -> Weight {211 fn sponsor_contract() -> Weight {
198 Weight::from_ref_time(11_952_000)212 Weight::from_ref_time(12_669_000 as u64)
199 .saturating_add(RocksDbWeight::get().reads(1 as u64))213 .saturating_add(RocksDbWeight::get().reads(1 as u64))
200 .saturating_add(RocksDbWeight::get().writes(1 as u64))214 .saturating_add(RocksDbWeight::get().writes(1 as u64))
201 }215 }
202 // Storage: AppPromotion Admin (r:1 w:0)216 // Storage: AppPromotion Admin (r:1 w:0)
203 // Storage: EvmContractHelpers Sponsoring (r:1 w:1)217 // Storage: EvmContractHelpers Sponsoring (r:1 w:1)
204 fn stop_sponsoring_contract() -> Weight {218 fn stop_sponsoring_contract() -> Weight {
205 Weight::from_ref_time(12_538_000)219 Weight::from_ref_time(14_406_000 as u64)
206 .saturating_add(RocksDbWeight::get().reads(2 as u64))220 .saturating_add(RocksDbWeight::get().reads(2 as u64))
207 .saturating_add(RocksDbWeight::get().writes(1 as u64))221 .saturating_add(RocksDbWeight::get().writes(1 as u64))
208 }222 }
modifiedruntime/common/mod.rsdiffbeforeafterboth
145 .map(|d| d.relay_parent_number)145 .map(|d| d.relay_parent_number)
146 .unwrap_or_default()146 .unwrap_or_default()
147 }147 }
148 #[cfg(feature = "runtime-benchmarks")]
149 fn set_block_number(block: Self::BlockNumber) {
150 cumulus_pallet_parachain_system::RelaychainBlockNumberProvider::<T>::set_block_number(block)
151 }
148}152}
149153
150pub(crate) struct CheckInherents;154pub(crate) struct CheckInherents;
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
44 'sp-runtime/runtime-benchmarks',44 'sp-runtime/runtime-benchmarks',
45 'xcm-builder/runtime-benchmarks',45 'xcm-builder/runtime-benchmarks',
46 'pallet-maintenance/runtime-benchmarks',46 'pallet-maintenance/runtime-benchmarks',
47 'cumulus-pallet-parachain-system/runtime-benchmarks'
47]48]
48try-runtime = [49try-runtime = [
49 'frame-try-runtime',50 'frame-try-runtime',
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
43 'sp-runtime/runtime-benchmarks',43 'sp-runtime/runtime-benchmarks',
44 'xcm-builder/runtime-benchmarks',44 'xcm-builder/runtime-benchmarks',
45 'pallet-maintenance/runtime-benchmarks',45 'pallet-maintenance/runtime-benchmarks',
46 'cumulus-pallet-parachain-system/runtime-benchmarks',
46]47]
47try-runtime = [48try-runtime = [
48 'frame-try-runtime',49 'frame-try-runtime',