From 8c7b689cced1c6f27a85dd2a74afdaac6e8a5552 Mon Sep 17 00:00:00 2001 From: Vadim Smirnov Date: Thu, 24 Aug 2023 08:30:10 +0400 Subject: [PATCH] fix(vara): Update MAXIMUM_BLOCK_WEIGHT to 1 sec (#3164) --- runtime/vara/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/vara/src/lib.rs b/runtime/vara/src/lib.rs index f48b4d1a9bc..e72c4f703ad 100644 --- a/runtime/vara/src/lib.rs +++ b/runtime/vara/src/lib.rs @@ -164,9 +164,11 @@ const_assert!((WEIGHT_REF_TIME_PER_SECOND / 3).checked_mul(2).is_some()); /// We allow for 1/3 of block time for computations, with maximum proof size. /// -/// It's 2/3 sec for vara runtime with 2 second block duration. -const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND * 2 / 3, u64::MAX); +/// It's 3/3 sec for vara runtime with 3 second block duration. +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_MILLIS * MILLISECS_PER_BLOCK / 3, + u64::MAX, +); /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")]