From e31b21bef9c40f10edfa89c4ea76e4a0daebcf68 Mon Sep 17 00:00:00 2001 From: librelois Date: Mon, 5 Jun 2023 15:55:13 +0200 Subject: [PATCH] tmp fix: account for validation data size in the estimated PoV (2) --- cumulus/pallets/parachain-system/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index a8e9a0bf9ae4..d774089ef91f 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -494,8 +494,12 @@ pub mod pallet { "ValidationData must be updated only once in a block", ); + let data_len = data.encoded_size() as u64; + // TODO: This is more than zero, but will need benchmarking to figure out what. - let mut total_weight = Weight::zero(); + // MOONBEAM TODO: custom weight to account for validation data size is the PoV + // until https://github.com/paritytech/substrate/issues/13810 it's properly fix. + let mut total_weight = Weight::from_parts(0, data_len); // NOTE: the inherent data is expected to be unique, even if this block is built // in the context of the same relay parent as the previous one. In particular,