Add weight of refund extension post_dispatch to the weights of messages pallet (#2089)

* add weight of refund extension post_dispatch to the weights of messages pallet

* fixed tests and removed TODO

* verify runtime overhead weight in integrity tests

* add integrity tests to rialto-parachain runtime

* refactor weights a bit

* refund ext is disabled for Rialto <> Millau bridge

* Update bin/runtime-common/src/integrity.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* Update bin/runtime-common/src/integrity.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* Update modules/relayers/src/weights_ext.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
Svyatoslav Nikolsky
2023-05-02 14:55:07 +03:00
committed by Bastian Köcher
parent b03c584e31
commit 49d11e9ce5
12 changed files with 308 additions and 30 deletions
@@ -28,6 +28,7 @@ use bridge_runtime_common::{
messages_xcm_extension::{XcmBlobHauler, XcmBlobHaulerAdapter},
};
use frame_support::{parameter_types, weights::Weight, RuntimeDebug};
use pallet_bridge_relayers::WeightInfoExt as _;
use xcm::latest::prelude::*;
use xcm_builder::HaulBlobExporter;
@@ -142,6 +143,14 @@ impl pallet_bridge_messages::WeightInfoExt
fn expected_extra_storage_proof_size() -> u32 {
bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE
}
fn receive_messages_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::weights::BridgeWeight::<Runtime>::receive_messages_proof_overhead_from_runtime()
}
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::weights::BridgeWeight::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
}
}
#[cfg(test)]
@@ -167,6 +176,7 @@ mod tests {
bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE,
bp_millau::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}