mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Fix Max Block Weight (#501)
* fix max block weight * fix milli per block too
This commit is contained in:
@@ -119,8 +119,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
|
|||||||
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
||||||
/// by Operational extrinsics.
|
/// by Operational extrinsics.
|
||||||
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
||||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
/// We allow for .5 seconds of compute with a 12 second average block time.
|
||||||
const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
|
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: BlockNumber = 250;
|
pub const BlockHashCount: BlockNumber = 250;
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
|
|||||||
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
||||||
/// by Operational extrinsics.
|
/// by Operational extrinsics.
|
||||||
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
||||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
/// We allow for .5 seconds of compute with a 12 second average block time.
|
||||||
const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
|
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: BlockNumber = 250;
|
pub const BlockHashCount: BlockNumber = 250;
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
transaction_version: 1,
|
transaction_version: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MILLISECS_PER_BLOCK: u64 = 6000;
|
pub const MILLISECS_PER_BLOCK: u64 = 12000;
|
||||||
|
|
||||||
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
|
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
|
||||||
|
|
||||||
@@ -125,8 +125,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
|
|||||||
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
|
||||||
/// by Operational extrinsics.
|
/// by Operational extrinsics.
|
||||||
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
||||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
/// We allow for .5 seconds of compute with a 12 second average block time.
|
||||||
const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
|
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: BlockNumber = 250;
|
pub const BlockHashCount: BlockNumber = 250;
|
||||||
|
|||||||
Reference in New Issue
Block a user