mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-30 06:07:25 +00:00
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 <>
This commit is contained in:
@@ -32,7 +32,9 @@ pub use frame_support::{
|
||||
ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness, StorageInfo,
|
||||
},
|
||||
weights::{
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||
constants::{
|
||||
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
|
||||
},
|
||||
IdentityFee, Weight,
|
||||
},
|
||||
StorageValue,
|
||||
@@ -141,7 +143,7 @@ parameter_types! {
|
||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::with_sensible_defaults(
|
||||
(2u64 * WEIGHT_PER_SECOND).set_proof_size(u64::MAX),
|
||||
Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
|
||||
NORMAL_DISPATCH_RATIO,
|
||||
);
|
||||
pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength
|
||||
|
||||
@@ -38,7 +38,9 @@ use frame_support::{
|
||||
WithdrawReasons,
|
||||
},
|
||||
weights::{
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||
constants::{
|
||||
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
|
||||
},
|
||||
ConstantMultiplier, IdentityFee, Weight,
|
||||
},
|
||||
PalletId, RuntimeDebug,
|
||||
@@ -173,7 +175,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
|
||||
/// by Operational extrinsics.
|
||||
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
||||
/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.
|
||||
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX);
|
||||
const MAXIMUM_BLOCK_WEIGHT: Weight =
|
||||
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
|
||||
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 2400;
|
||||
|
||||
Reference in New Issue
Block a user