Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit d0540a7

Browse files
authored
Introduce sensible weight constants (#12868)
* Introduce sensible weight constants * cargo fmt * Remove unused import * Add missing import * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery Co-authored-by: command-bot <>
1 parent fae9e36 commit d0540a7

File tree

26 files changed

+140
-113
lines changed

26 files changed

+140
-113
lines changed

bin/node-template/runtime/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ pub use frame_support::{
3232
ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness, StorageInfo,
3333
},
3434
weights::{
35-
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
35+
constants::{
36+
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
37+
},
3638
IdentityFee, Weight,
3739
},
3840
StorageValue,
@@ -141,7 +143,7 @@ parameter_types! {
141143
/// We allow for 2 seconds of compute with a 6 second average block time.
142144
pub BlockWeights: frame_system::limits::BlockWeights =
143145
frame_system::limits::BlockWeights::with_sensible_defaults(
144-
(2u64 * WEIGHT_PER_SECOND).set_proof_size(u64::MAX),
146+
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
145147
NORMAL_DISPATCH_RATIO,
146148
);
147149
pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength

bin/node/runtime/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ use frame_support::{
3838
WithdrawReasons,
3939
},
4040
weights::{
41-
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
41+
constants::{
42+
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
43+
},
4244
ConstantMultiplier, IdentityFee, Weight,
4345
},
4446
PalletId, RuntimeDebug,
@@ -173,7 +175,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
173175
/// by Operational extrinsics.
174176
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
175177
/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.
176-
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX);
178+
const MAXIMUM_BLOCK_WEIGHT: Weight =
179+
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
177180

178181
parameter_types! {
179182
pub const BlockHashCount: BlockNumber = 2400;

docs/Upgrading-2.0-to-3.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ And update the overall definition for weights on frame and a few related types a
100100
+/// by Operational extrinsics.
101101
+const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
102102
+/// We allow for 2 seconds of compute with a 6 second average block time.
103-
+const MAXIMUM_BLOCK_WEIGHT: Weight = 2u64 * WEIGHT_PER_SECOND;
103+
+const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX);
104104
+
105105
parameter_types! {
106106
pub const BlockHashCount: BlockNumber = 2400;
107107
- /// We allow for 2 seconds of compute with a 6 second average block time.
108-
- pub const MaximumBlockWeight: Weight = 2u64 * WEIGHT_PER_SECOND;
108+
- pub const MaximumBlockWeight: Weight = Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX);
109109
- pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
110110
- /// Assume 10% of weight for average on_initialize calls.
111111
- pub MaximumExtrinsicWeight: Weight =

frame/babe/src/default_weights.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! This file was not auto-generated.
2020
2121
use frame_support::weights::{
22-
constants::{RocksDbWeight as DbWeight, WEIGHT_PER_MICROS, WEIGHT_PER_NANOS},
22+
constants::{RocksDbWeight as DbWeight, WEIGHT_REF_TIME_PER_MICROS, WEIGHT_REF_TIME_PER_NANOS},
2323
Weight,
2424
};
2525

@@ -38,17 +38,20 @@ impl crate::WeightInfo for () {
3838
const MAX_NOMINATORS: u64 = 200;
3939

4040
// checking membership proof
41-
let ref_time_weight = (35u64 * WEIGHT_PER_MICROS)
42-
.saturating_add((175u64 * WEIGHT_PER_NANOS).saturating_mul(validator_count))
41+
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
42+
.saturating_add(
43+
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
44+
.saturating_mul(validator_count),
45+
)
4346
.saturating_add(DbWeight::get().reads(5))
4447
// check equivocation proof
45-
.saturating_add(110u64 * WEIGHT_PER_MICROS)
48+
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
4649
// report offence
47-
.saturating_add(110u64 * WEIGHT_PER_MICROS)
48-
.saturating_add(25u64 * WEIGHT_PER_MICROS * MAX_NOMINATORS)
50+
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
51+
.saturating_add(Weight::from_ref_time(
52+
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
53+
))
4954
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
50-
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS));
51-
52-
ref_time_weight
55+
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
5356
}
5457
}

frame/contracts/src/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use frame_support::{
4040
fungibles::Lockable, BalanceStatus, ConstU32, ConstU64, Contains, Currency, Get, OnIdle,
4141
OnInitialize, ReservableCurrency, WithdrawReasons,
4242
},
43-
weights::{constants::WEIGHT_PER_SECOND, Weight},
43+
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
4444
};
4545
use frame_system::{self as system, EventRecord, Phase};
4646
use pretty_assertions::{assert_eq, assert_ne};
@@ -285,7 +285,7 @@ impl RegisteredChainExtension<Test> for TempStorageExtension {
285285
parameter_types! {
286286
pub BlockWeights: frame_system::limits::BlockWeights =
287287
frame_system::limits::BlockWeights::simple_max(
288-
(2u64 * WEIGHT_PER_SECOND).set_proof_size(u64::MAX),
288+
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
289289
);
290290
pub static ExistentialDeposit: u64 = 1;
291291
}

frame/democracy/src/tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ impl Contains<RuntimeCall> for BaseFilter {
7777

7878
parameter_types! {
7979
pub BlockWeights: frame_system::limits::BlockWeights =
80-
frame_system::limits::BlockWeights::simple_max(frame_support::weights::constants::WEIGHT_PER_SECOND.set_proof_size(u64::MAX));
80+
frame_system::limits::BlockWeights::simple_max(
81+
Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
82+
);
8183
}
8284
impl frame_system::Config for Test {
8385
type BaseCallFilter = BaseFilter;

frame/election-provider-multi-phase/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ parameter_types! {
239239
pub const ExistentialDeposit: u64 = 1;
240240
pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights
241241
::with_sensible_defaults(
242-
Weight::from_parts(2u64 * constants::WEIGHT_PER_SECOND.ref_time(), u64::MAX),
242+
Weight::from_parts(2u64 * constants::WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
243243
NORMAL_DISPATCH_RATIO,
244244
);
245245
}

frame/fast-unstake/src/mock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use frame_support::{
2121
pallet_prelude::*,
2222
parameter_types,
2323
traits::{ConstU64, Currency},
24-
weights::constants::WEIGHT_PER_SECOND,
24+
weights::constants::WEIGHT_REF_TIME_PER_SECOND,
2525
};
2626
use sp_runtime::traits::{Convert, IdentityLookup};
2727

@@ -37,7 +37,7 @@ pub type T = Runtime;
3737
parameter_types! {
3838
pub BlockWeights: frame_system::limits::BlockWeights =
3939
frame_system::limits::BlockWeights::simple_max(
40-
(2u64 * WEIGHT_PER_SECOND).set_proof_size(u64::MAX),
40+
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
4141
);
4242
}
4343

frame/grandpa/src/default_weights.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! This file was not auto-generated.
2020
2121
use frame_support::weights::{
22-
constants::{RocksDbWeight as DbWeight, WEIGHT_PER_MICROS, WEIGHT_PER_NANOS},
22+
constants::{RocksDbWeight as DbWeight, WEIGHT_REF_TIME_PER_MICROS, WEIGHT_REF_TIME_PER_NANOS},
2323
Weight,
2424
};
2525

@@ -34,21 +34,27 @@ impl crate::WeightInfo for () {
3434
const MAX_NOMINATORS: u64 = 200;
3535

3636
// checking membership proof
37-
(35u64 * WEIGHT_PER_MICROS)
38-
.saturating_add((175u64 * WEIGHT_PER_NANOS).saturating_mul(validator_count))
37+
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
38+
.saturating_add(
39+
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
40+
.saturating_mul(validator_count),
41+
)
3942
.saturating_add(DbWeight::get().reads(5))
4043
// check equivocation proof
41-
.saturating_add(95u64 * WEIGHT_PER_MICROS)
44+
.saturating_add(Weight::from_ref_time(95u64 * WEIGHT_REF_TIME_PER_MICROS))
4245
// report offence
43-
.saturating_add(110u64 * WEIGHT_PER_MICROS)
44-
.saturating_add(25u64 * WEIGHT_PER_MICROS * MAX_NOMINATORS)
46+
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
47+
.saturating_add(Weight::from_ref_time(
48+
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
49+
))
4550
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
4651
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
4752
// fetching set id -> session index mappings
4853
.saturating_add(DbWeight::get().reads(2))
4954
}
5055

5156
fn note_stalled() -> Weight {
52-
(3u64 * WEIGHT_PER_MICROS).saturating_add(DbWeight::get().writes(1))
57+
Weight::from_ref_time(3u64 * WEIGHT_REF_TIME_PER_MICROS)
58+
.saturating_add(DbWeight::get().writes(1))
5359
}
5460
}

frame/lottery/src/weights.rs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! Autogenerated weights for pallet_lottery
1919
//!
2020
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21-
//! DATE: 2022-11-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
21+
//! DATE: 2022-12-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
2222
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
2323
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
2424
@@ -67,33 +67,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
6767
// Storage: System Account (r:1 w:1)
6868
// Storage: Lottery Tickets (r:0 w:1)
6969
fn buy_ticket() -> Weight {
70-
// Minimum execution time: 53_735 nanoseconds.
71-
Weight::from_ref_time(54_235_000)
70+
// Minimum execution time: 52_479 nanoseconds.
71+
Weight::from_ref_time(53_225_000)
7272
.saturating_add(T::DbWeight::get().reads(6))
7373
.saturating_add(T::DbWeight::get().writes(4))
7474
}
7575
// Storage: Lottery CallIndices (r:0 w:1)
7676
/// The range of component `n` is `[0, 10]`.
7777
fn set_calls(n: u32, ) -> Weight {
78-
// Minimum execution time: 15_065 nanoseconds.
79-
Weight::from_ref_time(16_467_398)
80-
// Standard Error: 5_392
81-
.saturating_add(Weight::from_ref_time(294_914).saturating_mul(n.into()))
78+
// Minimum execution time: 14_433 nanoseconds.
79+
Weight::from_ref_time(15_660_780)
80+
// Standard Error: 5_894
81+
.saturating_add(Weight::from_ref_time(290_482).saturating_mul(n.into()))
8282
.saturating_add(T::DbWeight::get().writes(1))
8383
}
8484
// Storage: Lottery Lottery (r:1 w:1)
8585
// Storage: Lottery LotteryIndex (r:1 w:1)
8686
// Storage: System Account (r:1 w:1)
8787
fn start_lottery() -> Weight {
88-
// Minimum execution time: 45_990 nanoseconds.
89-
Weight::from_ref_time(46_789_000)
88+
// Minimum execution time: 43_683 nanoseconds.
89+
Weight::from_ref_time(44_580_000)
9090
.saturating_add(T::DbWeight::get().reads(3))
9191
.saturating_add(T::DbWeight::get().writes(3))
9292
}
9393
// Storage: Lottery Lottery (r:1 w:1)
9494
fn stop_repeat() -> Weight {
95-
// Minimum execution time: 10_783 nanoseconds.
96-
Weight::from_ref_time(11_180_000)
95+
// Minimum execution time: 10_514 nanoseconds.
96+
Weight::from_ref_time(10_821_000)
9797
.saturating_add(T::DbWeight::get().reads(1))
9898
.saturating_add(T::DbWeight::get().writes(1))
9999
}
@@ -103,8 +103,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
103103
// Storage: Lottery TicketsCount (r:1 w:1)
104104
// Storage: Lottery Tickets (r:1 w:0)
105105
fn on_initialize_end() -> Weight {
106-
// Minimum execution time: 62_088 nanoseconds.
107-
Weight::from_ref_time(63_670_000)
106+
// Minimum execution time: 60_254 nanoseconds.
107+
Weight::from_ref_time(61_924_000)
108108
.saturating_add(T::DbWeight::get().reads(6))
109109
.saturating_add(T::DbWeight::get().writes(4))
110110
}
@@ -115,8 +115,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
115115
// Storage: Lottery Tickets (r:1 w:0)
116116
// Storage: Lottery LotteryIndex (r:1 w:1)
117117
fn on_initialize_repeat() -> Weight {
118-
// Minimum execution time: 64_953 nanoseconds.
119-
Weight::from_ref_time(65_465_000)
118+
// Minimum execution time: 61_552 nanoseconds.
119+
Weight::from_ref_time(62_152_000)
120120
.saturating_add(T::DbWeight::get().reads(7))
121121
.saturating_add(T::DbWeight::get().writes(5))
122122
}
@@ -132,33 +132,33 @@ impl WeightInfo for () {
132132
// Storage: System Account (r:1 w:1)
133133
// Storage: Lottery Tickets (r:0 w:1)
134134
fn buy_ticket() -> Weight {
135-
// Minimum execution time: 53_735 nanoseconds.
136-
Weight::from_ref_time(54_235_000)
135+
// Minimum execution time: 52_479 nanoseconds.
136+
Weight::from_ref_time(53_225_000)
137137
.saturating_add(RocksDbWeight::get().reads(6))
138138
.saturating_add(RocksDbWeight::get().writes(4))
139139
}
140140
// Storage: Lottery CallIndices (r:0 w:1)
141141
/// The range of component `n` is `[0, 10]`.
142142
fn set_calls(n: u32, ) -> Weight {
143-
// Minimum execution time: 15_065 nanoseconds.
144-
Weight::from_ref_time(16_467_398)
145-
// Standard Error: 5_392
146-
.saturating_add(Weight::from_ref_time(294_914).saturating_mul(n.into()))
143+
// Minimum execution time: 14_433 nanoseconds.
144+
Weight::from_ref_time(15_660_780)
145+
// Standard Error: 5_894
146+
.saturating_add(Weight::from_ref_time(290_482).saturating_mul(n.into()))
147147
.saturating_add(RocksDbWeight::get().writes(1))
148148
}
149149
// Storage: Lottery Lottery (r:1 w:1)
150150
// Storage: Lottery LotteryIndex (r:1 w:1)
151151
// Storage: System Account (r:1 w:1)
152152
fn start_lottery() -> Weight {
153-
// Minimum execution time: 45_990 nanoseconds.
154-
Weight::from_ref_time(46_789_000)
153+
// Minimum execution time: 43_683 nanoseconds.
154+
Weight::from_ref_time(44_580_000)
155155
.saturating_add(RocksDbWeight::get().reads(3))
156156
.saturating_add(RocksDbWeight::get().writes(3))
157157
}
158158
// Storage: Lottery Lottery (r:1 w:1)
159159
fn stop_repeat() -> Weight {
160-
// Minimum execution time: 10_783 nanoseconds.
161-
Weight::from_ref_time(11_180_000)
160+
// Minimum execution time: 10_514 nanoseconds.
161+
Weight::from_ref_time(10_821_000)
162162
.saturating_add(RocksDbWeight::get().reads(1))
163163
.saturating_add(RocksDbWeight::get().writes(1))
164164
}
@@ -168,8 +168,8 @@ impl WeightInfo for () {
168168
// Storage: Lottery TicketsCount (r:1 w:1)
169169
// Storage: Lottery Tickets (r:1 w:0)
170170
fn on_initialize_end() -> Weight {
171-
// Minimum execution time: 62_088 nanoseconds.
172-
Weight::from_ref_time(63_670_000)
171+
// Minimum execution time: 60_254 nanoseconds.
172+
Weight::from_ref_time(61_924_000)
173173
.saturating_add(RocksDbWeight::get().reads(6))
174174
.saturating_add(RocksDbWeight::get().writes(4))
175175
}
@@ -180,8 +180,8 @@ impl WeightInfo for () {
180180
// Storage: Lottery Tickets (r:1 w:0)
181181
// Storage: Lottery LotteryIndex (r:1 w:1)
182182
fn on_initialize_repeat() -> Weight {
183-
// Minimum execution time: 64_953 nanoseconds.
184-
Weight::from_ref_time(65_465_000)
183+
// Minimum execution time: 61_552 nanoseconds.
184+
Weight::from_ref_time(62_152_000)
185185
.saturating_add(RocksDbWeight::get().reads(7))
186186
.saturating_add(RocksDbWeight::get().writes(5))
187187
}

frame/merkle-mountain-range/src/default_weights.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! This file was not auto-generated.
2020
2121
use frame_support::weights::{
22-
constants::{RocksDbWeight as DbWeight, WEIGHT_PER_NANOS},
22+
constants::{RocksDbWeight as DbWeight, WEIGHT_REF_TIME_PER_NANOS},
2323
Weight,
2424
};
2525

@@ -28,7 +28,7 @@ impl crate::WeightInfo for () {
2828
// Reading the parent hash.
2929
let leaf_weight = DbWeight::get().reads(1);
3030
// Blake2 hash cost.
31-
let hash_weight = 2u64 * WEIGHT_PER_NANOS;
31+
let hash_weight = Weight::from_ref_time(2u64 * WEIGHT_REF_TIME_PER_NANOS);
3232
// No-op hook.
3333
let hook_weight = Weight::zero();
3434

frame/offences/benchmarking/src/mock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use frame_election_provider_support::{onchain, SequentialPhragmen};
2424
use frame_support::{
2525
parameter_types,
2626
traits::{ConstU32, ConstU64},
27-
weights::constants::WEIGHT_PER_SECOND,
27+
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
2828
};
2929
use frame_system as system;
3030
use pallet_session::historical as pallet_session_historical;
@@ -41,7 +41,7 @@ type Balance = u64;
4141
parameter_types! {
4242
pub BlockWeights: frame_system::limits::BlockWeights =
4343
frame_system::limits::BlockWeights::simple_max(
44-
2u64 * WEIGHT_PER_SECOND
44+
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX)
4545
);
4646
}
4747

frame/offences/src/mock.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use frame_support::{
2626
parameter_types,
2727
traits::{ConstU32, ConstU64},
2828
weights::{
29-
constants::{RocksDbWeight, WEIGHT_PER_SECOND},
29+
constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND},
3030
Weight,
3131
},
3232
};
@@ -85,7 +85,9 @@ frame_support::construct_runtime!(
8585

8686
parameter_types! {
8787
pub BlockWeights: frame_system::limits::BlockWeights =
88-
frame_system::limits::BlockWeights::simple_max(2u64 * WEIGHT_PER_SECOND);
88+
frame_system::limits::BlockWeights::simple_max(
89+
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
90+
);
8991
}
9092
impl frame_system::Config for Runtime {
9193
type BaseCallFilter = frame_support::traits::Everything;

frame/staking/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl FindAuthor<AccountId> for Author11 {
115115
parameter_types! {
116116
pub BlockWeights: frame_system::limits::BlockWeights =
117117
frame_system::limits::BlockWeights::simple_max(
118-
frame_support::weights::constants::WEIGHT_PER_SECOND * 2
118+
Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2, u64::MAX),
119119
);
120120
pub static SessionsPerEra: SessionIndex = 3;
121121
pub static ExistentialDeposit: Balance = 1;

0 commit comments

Comments
 (0)