mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
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:
committed by
Bastian Köcher
parent
b03c584e31
commit
49d11e9ce5
@@ -599,7 +599,7 @@ generate_bridge_reject_obsolete_headers_and_messages! {
|
||||
|
||||
bp_runtime::generate_static_str_provider!(BridgeRefundRialtoPara2000Lane0Msgs);
|
||||
/// Signed extension that refunds relayers that are delivering messages from the Rialto parachain.
|
||||
pub type PriorityBoostPerMessage = ConstU64<699_683_285>;
|
||||
pub type PriorityBoostPerMessage = ConstU64<324_316_715>;
|
||||
pub type BridgeRefundRialtoParachainMessages = RefundBridgedParachainMessages<
|
||||
Runtime,
|
||||
RefundableParachain<WithRialtoParachainsInstance, RialtoParachainId>,
|
||||
|
||||
@@ -26,6 +26,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;
|
||||
|
||||
@@ -139,6 +140,14 @@ impl pallet_bridge_messages::WeightInfoExt for crate::weights::RialtoMessagesWei
|
||||
fn expected_extra_storage_proof_size() -> u32 {
|
||||
bp_rialto::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)]
|
||||
@@ -161,6 +170,7 @@ mod tests {
|
||||
bp_rialto::EXTRA_STORAGE_PROOF_SIZE,
|
||||
bp_millau::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
|
||||
bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user