From 7b29e359ca5cfbac4132adfac91bc057c3b89252 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 30 Sep 2022 14:35:06 +0200 Subject: [PATCH 1/2] Unlimited Proof size per block Signed-off-by: Oliver Tale-Yazdi --- runtime/common/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 06f76fbfbff1..06449856fe58 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -69,7 +69,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); /// by Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2); +/// The storage proof size is not limited so far. +pub const MAXIMUM_BLOCK_WEIGHT: Weight = + WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct()); From 8a362905acc13a6b6e0dc6841d50263cba3cfa91 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 5 Jan 2023 13:13:50 +0100 Subject: [PATCH 2/2] fix Signed-off-by: Oliver Tale-Yazdi --- runtime/common/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 31aced246497..7d7a789d828c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -43,7 +43,7 @@ use frame_support::{ weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use frame_system::limits; -use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId, MAX_POV_SIZE}; +use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId}; use sp_runtime::{FixedPointNumber, Perbill, Perquintill}; use static_assertions::const_assert; @@ -72,7 +72,7 @@ pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time. /// The storage proof size is not limited so far. pub const MAXIMUM_BLOCK_WEIGHT: Weight = - WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); + Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct());