From d38f0ca85c086285fce941f7ae27d5add1a1b951 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 06:52:20 +0800 Subject: [PATCH 01/11] Fix broken benchmarks in pallet-transporter and pallet-messenger Signed-off-by: linning --- domains/pallets/messenger/src/benchmarking.rs | 7 ++++--- domains/pallets/transporter/src/benchmarking.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/domains/pallets/messenger/src/benchmarking.rs b/domains/pallets/messenger/src/benchmarking.rs index c2f0193d5ab..3c0894292cb 100644 --- a/domains/pallets/messenger/src/benchmarking.rs +++ b/domains/pallets/messenger/src/benchmarking.rs @@ -144,13 +144,13 @@ mod benchmarks { }, collected_fee: CollectedFee { src_chain_fee: 1u32.into(), - dst_chain_fee: 1u32.into(), + dst_chain_fee: 0u32.into(), }, }, ))), last_delivered_message_response_nonce: None, }; - Inbox::::put(msg); + Messenger::::pre_dispatch_relay_message(msg, false).expect("pre_dispatch must succeed"); let xdm = CrossDomainMessage::, T::Hash, T::MmrHash> { src_chain_id: dst_chain_id, @@ -226,7 +226,8 @@ mod benchmarks { )))), last_delivered_message_response_nonce: None, }; - OutboxResponses::::put(resp_msg); + Messenger::::pre_dispatch_relay_message_response(resp_msg) + .expect("pre_dispatch must succeed"); let xdm = CrossDomainMessage::, T::Hash, T::MmrHash> { src_chain_id: dst_chain_id, diff --git a/domains/pallets/transporter/src/benchmarking.rs b/domains/pallets/transporter/src/benchmarking.rs index 316d38f4a1e..1951c2b650d 100644 --- a/domains/pallets/transporter/src/benchmarking.rs +++ b/domains/pallets/transporter/src/benchmarking.rs @@ -25,7 +25,7 @@ mod benchmarks { let sender: T::AccountId = account("sender", 1, SEED); let receiver: T::AccountId = account("receiver", 2, SEED); - let amount: BalanceOf = 100u32.into(); + let amount = T::MinimumTransfer::get(); let dst_chain_id: ChainId = u32::MAX.into(); let free_balance = BalanceOf::::max_value(); assert_ne!(T::SelfChainId::get(), dst_chain_id); From 6f4464f8fd23ad5e3d7d172cc9537e617f043ab8 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 06:56:20 +0800 Subject: [PATCH 02/11] Update weight of the unlock_funds benchmark in pallet-domains This benchmark is update long time ago but its weight is not Signed-off-by: linning --- crates/pallet-domains/src/lib.rs | 15 ++++-- crates/pallet-domains/src/staking.rs | 9 +++- crates/pallet-domains/src/weights.rs | 68 +++++++++++++++++----------- 3 files changed, 59 insertions(+), 33 deletions(-) diff --git a/crates/pallet-domains/src/lib.rs b/crates/pallet-domains/src/lib.rs index 36a54d42df0..56029bf8f47 100644 --- a/crates/pallet-domains/src/lib.rs +++ b/crates/pallet-domains/src/lib.rs @@ -1528,12 +1528,19 @@ mod pallet { /// Even if the rest of the withdrawals are out of the unlocking period, the nominator /// should call this extrinsic to unlock each withdrawal #[pallet::call_index(10)] - #[pallet::weight(T::WeightInfo::unlock_funds())] - pub fn unlock_funds(origin: OriginFor, operator_id: OperatorId) -> DispatchResult { + #[pallet::weight(T::WeightInfo::unlock_funds(T::WithdrawalLimit::get()))] + pub fn unlock_funds( + origin: OriginFor, + operator_id: OperatorId, + ) -> DispatchResultWithPostInfo { let nominator_id = ensure_signed(origin)?; - do_unlock_funds::(operator_id, nominator_id.clone()) + let withdrawal_count = do_unlock_funds::(operator_id, nominator_id.clone()) .map_err(crate::pallet::Error::::from)?; - Ok(()) + + Ok(Some(T::WeightInfo::unlock_funds( + withdrawal_count.min(T::WithdrawalLimit::get()), + )) + .into()) } /// Unlocks the nominator under given operator given the unlocking period is complete. diff --git a/crates/pallet-domains/src/staking.rs b/crates/pallet-domains/src/staking.rs index 594432fb207..30a981b7b75 100644 --- a/crates/pallet-domains/src/staking.rs +++ b/crates/pallet-domains/src/staking.rs @@ -1023,10 +1023,12 @@ pub(crate) fn do_withdraw_stake( } /// Unlocks any withdraws that are ready to be unlocked. +/// +/// Return the number of withdrawals being unlocked pub(crate) fn do_unlock_funds( operator_id: OperatorId, nominator_id: NominatorId, -) -> Result<(), Error> { +) -> Result { let operator = Operators::::get(operator_id).ok_or(Error::UnknownOperator)?; ensure!( *operator.status::(operator_id) == OperatorStatus::Registered, @@ -1049,6 +1051,7 @@ pub(crate) fn do_unlock_funds( let head_domain_number = HeadDomainNumber::::get(operator.current_domain_id); + let mut withdrawal_count = 0; let mut total_unlocked_amount = BalanceOf::::zero(); let mut total_storage_fee_refund = BalanceOf::::zero(); loop { @@ -1077,6 +1080,8 @@ pub(crate) fn do_unlock_funds( total_storage_fee_refund = total_storage_fee_refund .checked_add(&storage_fee_refund) .ok_or(Error::BalanceOverflow)?; + + withdrawal_count += 1; } // There is withdrawal but none being processed meaning the first withdrawal's unlock period has @@ -1163,7 +1168,7 @@ pub(crate) fn do_unlock_funds( }); } - Ok(()) + Ok(withdrawal_count) }) } diff --git a/crates/pallet-domains/src/weights.rs b/crates/pallet-domains/src/weights.rs index a800e225fe1..86ee290d2e7 100644 --- a/crates/pallet-domains/src/weights.rs +++ b/crates/pallet-domains/src/weights.rs @@ -45,7 +45,7 @@ pub trait WeightInfo { fn nominate_operator() -> Weight; fn deregister_operator() -> Weight; fn withdraw_stake() -> Weight; - fn unlock_funds() -> Weight; + fn unlock_funds(w: u32) -> Weight; fn unlock_nominator() -> Weight; fn update_domain_operator_allow_list() -> Weight; fn transfer_treasury_funds() -> Weight; @@ -426,26 +426,33 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Domains::Withdrawals` (r:1 w:1) /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Domains::OperatorEpochSharePrice` (r:1 w:0) - /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) - /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(5550), added: 8025, mode: `MaxEncodedLen`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) /// Storage: `Domains::Deposits` (r:1 w:1) /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn unlock_funds() -> Weight { + /// The range of component `w` is `[1, 32]`. + fn unlock_funds(w: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1290` - // Estimated: `9015` - // Minimum execution time: 144_271_000 picoseconds. - Weight::from_parts(147_196_000, 9015) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `1157 + w * (36 ±0)` + // Estimated: `4622 + w * (36 ±0)` + // Minimum execution time: 94_000_000 picoseconds. + Weight::from_parts(86_675_591, 0) + .saturating_add(Weight::from_parts(0, 4622)) + // Standard Error: 373_480 + .saturating_add(Weight::from_parts(1_180_519, 0).saturating_mul(w.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(w.into())) } /// Storage: `Domains::Operators` (r:1 w:1) /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1018,26 +1025,33 @@ impl WeightInfo for () { /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Domains::Withdrawals` (r:1 w:1) /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Domains::OperatorEpochSharePrice` (r:1 w:0) - /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) - /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Holds` (r:1 w:1) - /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(5550), added: 8025, mode: `MaxEncodedLen`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) /// Storage: `Domains::Deposits` (r:1 w:1) /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn unlock_funds() -> Weight { + /// The range of component `w` is `[1, 32]`. + fn unlock_funds(w: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1290` - // Estimated: `9015` - // Minimum execution time: 144_271_000 picoseconds. - Weight::from_parts(147_196_000, 9015) - .saturating_add(ParityDbWeight::get().reads(8_u64)) - .saturating_add(ParityDbWeight::get().writes(4_u64)) + // Measured: `1157 + w * (36 ±0)` + // Estimated: `4622 + w * (36 ±0)` + // Minimum execution time: 94_000_000 picoseconds. + Weight::from_parts(86_675_591, 0) + .saturating_add(Weight::from_parts(0, 4622)) + // Standard Error: 373_480 + .saturating_add(Weight::from_parts(1_180_519, 0).saturating_mul(w.into())) + .saturating_add(ParityDbWeight::get().reads(9)) + .saturating_add(ParityDbWeight::get().writes(5)) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(w.into())) } /// Storage: `Domains::Operators` (r:1 w:1) /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) From 87e0e4b8688f2e9f204341660fa4d70954b7d8e7 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:00:41 +0800 Subject: [PATCH 03/11] Add benchmark for XDM between domains in the pallet-messenger extension Signed-off-by: linning --- domains/pallets/messenger/src/extensions.rs | 2 + .../benchmarking_between_domains.rs | 128 ++++++++++ .../between_domains_relay_message.data | Bin 0 -> 814 bytes ...en_domains_relay_message_channel_open.data | Bin 0 -> 746 bytes ...etween_domains_relay_message_response.data | Bin 0 -> 705 bytes domains/pallets/messenger/src/tests.rs | 221 ++++++++++++++++++ 6 files changed, 351 insertions(+) create mode 100644 domains/pallets/messenger/src/extensions/benchmarking_between_domains.rs create mode 100644 domains/pallets/messenger/src/extensions/fixtures/between_domains_relay_message.data create mode 100644 domains/pallets/messenger/src/extensions/fixtures/between_domains_relay_message_channel_open.data create mode 100644 domains/pallets/messenger/src/extensions/fixtures/between_domains_relay_message_response.data diff --git a/domains/pallets/messenger/src/extensions.rs b/domains/pallets/messenger/src/extensions.rs index 3be3dc85840..e4ba12b20f1 100644 --- a/domains/pallets/messenger/src/extensions.rs +++ b/domains/pallets/messenger/src/extensions.rs @@ -1,5 +1,7 @@ //! Extensions for unsigned general extrinsics +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmarking_between_domains; #[cfg(feature = "runtime-benchmarks")] pub mod benchmarking_from_consensus; #[cfg(feature = "runtime-benchmarks")] diff --git a/domains/pallets/messenger/src/extensions/benchmarking_between_domains.rs b/domains/pallets/messenger/src/extensions/benchmarking_between_domains.rs new file mode 100644 index 00000000000..032cbf946d4 --- /dev/null +++ b/domains/pallets/messenger/src/extensions/benchmarking_between_domains.rs @@ -0,0 +1,128 @@ +//! Benchmarking for `pallet-messenger` extensions. + +#[cfg(not(feature = "std"))] +extern crate alloc; + +use crate::pallet::ChainAllowlist; +use crate::{Config, Pallet as Messenger, ValidatedRelayMessage}; +#[cfg(not(feature = "std"))] +use alloc::collections::BTreeSet; +use frame_benchmarking::v2::*; +use frame_support::dispatch::{DispatchInfo, PostDispatchInfo}; +use frame_system::pallet_prelude::BlockNumberFor; +use parity_scale_codec::{Decode, Encode}; +use scale_info::prelude::fmt; +use sp_domains::{ChainId, ChannelId}; +use sp_messenger::messages::{ChannelOpenParamsV1, CrossDomainMessage}; +use sp_runtime::traits::{Dispatchable, Zero}; +#[cfg(feature = "std")] +use std::collections::BTreeSet; + +pub struct Pallet(Messenger); + +#[derive(Encode, Decode)] +pub(crate) struct RelayMessage { + pub(crate) state_root: T::Hash, + pub(crate) xdm: CrossDomainMessage, T::Hash, T::MmrHash>, +} + +// Between domains relay message channel open data. +const BDRMCO: &[u8; 746] = + include_bytes!("./fixtures/between_domains_relay_message_channel_open.data"); + +// Between domains relay message. +const BDRM: &[u8; 814] = include_bytes!("./fixtures/between_domains_relay_message.data"); + +// Between domains relay message response. +const BDRMR: &[u8; 705] = include_bytes!("./fixtures/between_domains_relay_message_response.data"); + +#[allow(clippy::multiple_bound_locations)] +#[benchmarks(where + T: Send + Sync + scale_info::TypeInfo + fmt::Debug, + RuntimeCallFor: Dispatchable) +] +mod benchmarks { + use super::*; + use frame_system::pallet_prelude::RuntimeCallFor; + + #[benchmark] + fn from_domains_relay_message_channel_open() { + let RelayMessage { state_root, xdm } = + RelayMessage::::decode(&mut BDRMCO.as_slice()).unwrap(); + #[block] + { + let ValidatedRelayMessage { + message, + should_init_channel, + .. + } = Messenger::::validate_relay_message(&xdm, state_root).unwrap(); + + Messenger::::pre_dispatch_relay_message(message, should_init_channel).unwrap(); + } + } + + #[benchmark] + fn from_domains_relay_message() { + let RelayMessage { state_root, xdm } = + RelayMessage::::decode(&mut BDRMCO.as_slice()).unwrap(); + + // channel init and open + let ValidatedRelayMessage { + message, + should_init_channel, + .. + } = Messenger::::validate_relay_message(&xdm, state_root).unwrap(); + Messenger::::pre_dispatch_relay_message(message, should_init_channel).unwrap(); + Messenger::::do_open_channel(xdm.src_chain_id, xdm.channel_id).unwrap(); + + let RelayMessage { state_root, xdm } = + RelayMessage::::decode(&mut BDRM.as_slice()).unwrap(); + + #[block] + { + let ValidatedRelayMessage { + message, + should_init_channel, + .. + } = Messenger::::validate_relay_message(&xdm, state_root).unwrap(); + + Messenger::::pre_dispatch_relay_message(message, should_init_channel).unwrap(); + } + } + + #[benchmark] + fn from_domains_relay_message_response() { + let RelayMessage { state_root, xdm } = + RelayMessage::::decode(&mut BDRMR.as_slice()).unwrap(); + + // channel init + set_channel_init_state::(xdm.src_chain_id, xdm.channel_id); + #[block] + { + let ValidatedRelayMessage { message, .. } = + Messenger::::validate_relay_message_response(&xdm, state_root).unwrap(); + + Messenger::::pre_dispatch_relay_message_response(message).unwrap(); + } + } + + impl_benchmark_test_suite!( + Pallet, + crate::mock::chain_a::new_test_ext(), + crate::mock::chain_a::Runtime, + ); +} + +pub(crate) fn set_channel_init_state(dst_chain_id: ChainId, channel_id: ChannelId) { + let init_params = ChannelOpenParamsV1 { + max_outgoing_messages: 100, + }; + + crate::Pallet::::channels(dst_chain_id, channel_id).unwrap_or_else(|| { + let list = BTreeSet::from([dst_chain_id]); + ChainAllowlist::::put(list); + crate::Pallet::::do_init_channel(dst_chain_id, init_params, None, true, Zero::zero()) + .unwrap(); + crate::Pallet::::channels(dst_chain_id, channel_id).unwrap() + }); +} diff --git a/domains/pallets/messenger/src/extensions/fixtures/between_domains_relay_message.data b/domains/pallets/messenger/src/extensions/fixtures/between_domains_relay_message.data new file mode 100644 index 0000000000000000000000000000000000000000..cb9c240aa5961ed43bceb379a367f0827ba749b0 GIT binary patch literal 814 zcmXR-aW-o25d428(RX@`sr)i#jpE{E!N0D$evmaW_1)X6;#tK9+e_BGous(f`IT^8`63}v z#s&t1hTVpOoUPB-IZm&#Ph2sjqwQt$jO0QaKF7d0kFylFZg6T?^&-sgcE$RYCGWnu zRvFz5TFKy1yjxedYwM$q&kBY&G$ffC_yijEtw=m@_S@XavLDSui@(iI;qT*1G@BW@ zZMDDSu~joNQW`dLCA~fWJxxtlHRQ3yyP_wj7yLOUUi0_;5z)ye?N;a2YMPd5Fo?M2 zr=&6j#8i|NW#$!UCdX&yrKDB}fV|h>w=(EdV43T*smWKKtWBSP+~dSg8UA!(Uxl&{ zp4?obu?LyvbM8r)={nc=N&f#mEuIUWGqyT4%=n$k^lIwNBI~bTVq0YPMwh&QxV-w~ zCadlH-+le(z+u?1NJX9@dcNV;=l8V4IsKNryZ3$dwcQeXavxv4pAbCJzqdgser|!) z?ZfqRGYk$dpTL&cYV&Zzy7F@WppXq)FU`4hAR(TE=hOLnzni6mrcIv4V?OJ?1PeI* zG~}&eShggUiJ?V4T;ai04$Dr4U31UBSG|(Co$+$l!Sc$tjQh2i_7};n2sGNsZt4>d6}(LNSe(^*Mn(n(1`wt@5b^QN72l=Io#}HouJh0$=boB5QWGDQl>G1x|CBf9 zxS;9Gy&{~pqKpj;1`QY3Y*@{*Gp21m{b1GKM{QFhgxR;J9IJX5sCgu9g2MR?4Xa*+ z`Q5Hqzp~`rH`gkoyFn`%Jc@Vg>UM2?)bUxt@P>vYQv;tsgHIT9WAEfC>ZwcR4jyE& zkPuoY#_K9N;WxAW3fWqgF(bCKP8nRAf}?EC^N4(GdVspFD11?02E3M59hQ-8!0dRo4D4u;HYJ){hN(J zalP9d%RNiKc&n?Gs2yaQ&$%aIrt4heC;9*Pw0JIf&e-bI;N@znQkFO`NBEih+s)n= z>a`^23;*w{xqeuFw<(+UYl((e?`AcHa{ajIqNyCKS(SCS^58n3X(5qeejXQNn{s_B z8jjuN4lH!$zwu#crG%zUp2lN7 u>%IgFIQ|;+;5+n{qhr zPB&S9J%>+{sew<)LDB&oFy|WAxfv8DZF9%g0D-G z4eI~u+Dxv$A!POYjH~MPEv7bSSKW6%rN_2>MNQK(4F(an{FGFNfS8JsqRhPF%;fmY zyp+@m0Z{Zbth=;l!jh(K|C2Iy%$G2Fc z#!vG9?`iQ|@SJfjF`so`f(0D#4bxv(Xo<~g4fq+L#?h6# z`tVJ=DbAn5Hb3F?(5&*myXi{9(Z#haOean@uVX&p{`;::put(list); + assert_ok!(Pallet::::initiate_channel( + chain_b::RuntimeOrigin::signed(USER_ACCOUNT), + dst_chain, + )); + assert!(Outbox::::get((dst_chain, channel_id, nonce)).is_some()) + }); + + let (state_root, _, message_proof) = storage_proof_of_outbox_messages::( + chain_test_ext.as_backend(), + dst_chain, + channel_id, + nonce, + ); + + let xdm = CrossDomainMessage { + src_chain_id: chain_b::SelfChainId::get(), + dst_chain_id: dst_chain, + channel_id, + nonce, + proof: Proof::Consensus { + consensus_chain_mmr_proof: ConsensusChainMmrLeafProof:: { + consensus_block_number: Default::default(), + consensus_block_hash: Default::default(), + opaque_mmr_leaf: EncodableOpaqueLeaf(vec![]), + proof: MmrProof { + leaf_indices: vec![], + leaf_count: 0, + items: vec![], + }, + }, + message_proof, + }, + weight_tag: MessageWeightTag::ProtocolChannelOpen, + }; + + let data = FromConsensusRelayMessage:: { state_root, xdm }.encode(); + fs::write( + "./src/extensions/fixtures/between_domains_relay_message_channel_open.data", + data.clone(), + ) + .unwrap(); + } + + #[test] + fn test_between_domains_relay_message_channel_close() { + let mut chain_test_ext = chain_b::new_test_ext(); + let dst_chain = chain_a::SelfChainId::get(); + let channel_id = ChannelId::zero(); + let nonce = Nonce::one(); + + chain_test_ext.execute_with(|| { + let list = BTreeSet::from([dst_chain]); + ChainAllowlist::::put(list); + assert_ok!(Pallet::::initiate_channel( + chain_b::RuntimeOrigin::signed(USER_ACCOUNT), + dst_chain, + )); + + assert_ok!(Pallet::::do_open_channel( + dst_chain, channel_id + )); + + assert_ok!(Pallet::::close_channel( + chain_b::RuntimeOrigin::root(), + dst_chain, + channel_id + )); + assert!(Outbox::::get((dst_chain, channel_id, nonce)).is_some()); + }); + + let (state_root, _, message_proof) = storage_proof_of_outbox_messages::( + chain_test_ext.as_backend(), + dst_chain, + channel_id, + nonce, + ); + + let xdm = CrossDomainMessage { + src_chain_id: chain_b::SelfChainId::get(), + dst_chain_id: dst_chain, + channel_id, + nonce, + proof: Proof::Consensus { + consensus_chain_mmr_proof: ConsensusChainMmrLeafProof:: { + consensus_block_number: Default::default(), + consensus_block_hash: Default::default(), + opaque_mmr_leaf: EncodableOpaqueLeaf(vec![]), + proof: MmrProof { + leaf_indices: vec![], + leaf_count: 0, + items: vec![], + }, + }, + message_proof, + }, + weight_tag: MessageWeightTag::ProtocolChannelClose, + }; + + let data = FromConsensusRelayMessage:: { state_root, xdm }.encode(); + fs::write( + "./src/extensions/fixtures/between_domains_relay_message.data", + data.clone(), + ) + .unwrap(); + } + + #[test] + fn test_between_domains_relay_message_response() { + let mut chain_test_ext = chain_b::new_test_ext(); + let mut chain_a_test_ext = chain_a::new_test_ext(); + let dst_chain = chain_b::SelfChainId::get(); + let channel_id = ChannelId::zero(); + let nonce = Nonce::zero(); + + let msg = chain_a_test_ext.execute_with(|| { + let list = BTreeSet::from([dst_chain]); + ChainAllowlist::::put(list); + assert_ok!(Pallet::::initiate_channel( + chain_a::RuntimeOrigin::signed(USER_ACCOUNT), + dst_chain, + )); + Outbox::::get((dst_chain, channel_id, nonce)).unwrap() + }); + + let (_, _, message_proof) = storage_proof_of_outbox_messages::( + chain_a_test_ext.as_backend(), + dst_chain, + channel_id, + nonce, + ); + + let xdm = CrossDomainMessage { + src_chain_id: chain_a::SelfChainId::get(), + dst_chain_id: dst_chain, + channel_id, + nonce, + proof: Proof::Consensus { + consensus_chain_mmr_proof: ConsensusChainMmrLeafProof:: { + consensus_block_number: Default::default(), + consensus_block_hash: Default::default(), + opaque_mmr_leaf: EncodableOpaqueLeaf(vec![]), + proof: MmrProof { + leaf_indices: vec![], + leaf_count: 0, + items: vec![], + }, + }, + message_proof, + }, + weight_tag: MessageWeightTag::ProtocolChannelOpen, + }; + + chain_test_ext.execute_with(|| { + force_toggle_channel_state::( + chain_a::SelfChainId::get(), + channel_id, + false, + true, + ); + Inbox::::set(Some(msg)); + + // process inbox message + let result = Pallet::::relay_message( + crate::RawOrigin::ValidatedUnsigned.into(), + xdm, + ); + + assert_ok!(result); + + chain_b::Messenger::inbox_responses((chain_a::SelfChainId::get(), channel_id, nonce)) + .unwrap(); + }); + + // relay message response to chain_a + let (state_root, _key, message_proof) = + storage_proof_of_inbox_message_responses::( + chain_test_ext.as_backend(), + chain_a::SelfChainId::get(), + channel_id, + nonce, + ); + + let xdm = CrossDomainMessage { + src_chain_id: chain_b::SelfChainId::get(), + dst_chain_id: chain_a::SelfChainId::get(), + channel_id, + nonce, + proof: Proof::Consensus { + consensus_chain_mmr_proof: ConsensusChainMmrLeafProof:: { + consensus_block_number: Default::default(), + consensus_block_hash: Default::default(), + opaque_mmr_leaf: EncodableOpaqueLeaf(vec![]), + proof: MmrProof { + leaf_indices: vec![], + leaf_count: 0, + items: vec![], + }, + }, + message_proof, + }, + weight_tag: MessageWeightTag::ProtocolChannelOpen, + }; + + let data = FromConsensusRelayMessage:: { state_root, xdm }.encode(); + fs::write( + "./src/extensions/fixtures/between_domains_relay_message_response.data", + data.clone(), + ) + .unwrap(); + } } From ee7ba9f056974c5a204c9233b2495953f2feef84 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:05:16 +0800 Subject: [PATCH 04/11] Update pallet-messenger extension SubstrateWeight type Signed-off-by: linning --- crates/subspace-runtime/src/lib.rs | 8 ++- domains/pallets/messenger/src/extensions.rs | 4 +- .../messenger/src/extensions/weights.rs | 52 ++++++++++++++----- domains/pallets/messenger/src/mock.rs | 2 +- domains/pallets/transporter/src/mock.rs | 3 +- domains/runtime/auto-id/src/lib.rs | 6 ++- domains/runtime/evm/src/lib.rs | 6 ++- domains/test/runtime/auto-id/src/lib.rs | 6 ++- domains/test/runtime/evm/src/lib.rs | 6 ++- test/subspace-test-runtime/src/lib.rs | 6 ++- 10 files changed, 78 insertions(+), 21 deletions(-) diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index ca0aa3544b1..730cc9d7b1d 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -766,7 +766,13 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + // NOTE: use `()` as `FromConsensusWeightInfo` since the consensus chain should + // never process XDM that come from the consensus chain itself. + (), + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime diff --git a/domains/pallets/messenger/src/extensions.rs b/domains/pallets/messenger/src/extensions.rs index e4ba12b20f1..6c5ecd5ac7d 100644 --- a/domains/pallets/messenger/src/extensions.rs +++ b/domains/pallets/messenger/src/extensions.rs @@ -10,7 +10,9 @@ pub mod weights; mod weights_from_consensus; mod weights_from_domains; -use crate::extensions::weights::{FromConsensusWeightInfo, FromDomainWeightInfo}; +pub use crate::extensions::weights::{FromConsensusWeightInfo, FromDomainWeightInfo}; +pub use crate::extensions::weights_from_consensus::WeightInfo as WeightsFromConsensus; +pub use crate::extensions::weights_from_domains::WeightInfo as WeightsFromDomains; use crate::pallet::Call as MessengerCall; use crate::{ Call, Config, ExtensionWeightInfo, Origin, Pallet as Messenger, ValidatedRelayMessage, diff --git a/domains/pallets/messenger/src/extensions/weights.rs b/domains/pallets/messenger/src/extensions/weights.rs index ae5cc0eaf38..0d10d6c293d 100644 --- a/domains/pallets/messenger/src/extensions/weights.rs +++ b/domains/pallets/messenger/src/extensions/weights.rs @@ -1,7 +1,5 @@ //! Weights for pallet-messenger extensions -use crate::extensions::weights_from_consensus::WeightInfo as WeightsFromConsensus; -use crate::extensions::weights_from_domains::WeightInfo as WeightsFromDomains; use core::marker::PhantomData; use frame_support::pallet_prelude::Weight; @@ -17,44 +15,74 @@ pub trait FromConsensusWeightInfo { fn from_consensus_relay_message_response() -> Weight; } +impl FromConsensusWeightInfo for () { + fn from_consensus_relay_message_channel_open() -> Weight { + Weight::zero() + } + fn from_consensus_relay_message() -> Weight { + Weight::zero() + } + fn from_consensus_relay_message_response() -> Weight { + Weight::zero() + } +} + pub trait FromDomainWeightInfo { fn from_domains_relay_message_channel_open() -> Weight; fn from_domains_relay_message() -> Weight; fn from_domains_relay_message_response() -> Weight; } +impl FromDomainWeightInfo for () { + fn from_domains_relay_message_channel_open() -> Weight { + Weight::zero() + } + fn from_domains_relay_message() -> Weight { + Weight::zero() + } + fn from_domains_relay_message_response() -> Weight { + Weight::zero() + } +} + /// Weight functions for `pallet_messenger_extension`. -pub struct SubstrateWeight(PhantomData); +pub struct SubstrateWeight(PhantomData<(T, C, D)>); -impl FromConsensusWeightInfo for SubstrateWeight { +impl FromConsensusWeightInfo + for SubstrateWeight +{ fn from_consensus_relay_message_channel_open() -> Weight { - WeightsFromConsensus::::from_consensus_relay_message_channel_open() + C::from_consensus_relay_message_channel_open() } fn from_consensus_relay_message() -> Weight { - WeightsFromConsensus::::from_consensus_relay_message() + C::from_consensus_relay_message() } fn from_consensus_relay_message_response() -> Weight { - WeightsFromConsensus::::from_consensus_relay_message_response() + C::from_consensus_relay_message_response() } } -impl FromDomainWeightInfo for SubstrateWeight { +impl FromDomainWeightInfo + for SubstrateWeight +{ fn from_domains_relay_message_channel_open() -> Weight { - WeightsFromDomains::::from_domains_relay_message_channel_open() + D::from_domains_relay_message_channel_open() } fn from_domains_relay_message() -> Weight { - WeightsFromDomains::::from_domains_relay_message() + D::from_domains_relay_message() } fn from_domains_relay_message_response() -> Weight { - WeightsFromDomains::::from_domains_relay_message_response() + D::from_domains_relay_message_response() } } -impl WeightInfo for SubstrateWeight { +impl WeightInfo + for SubstrateWeight +{ fn mmr_proof_verification_on_consensus() -> Weight { // Execution time to verify a given MMR proof on consensus chain // is around 153_000_000 pico seconds diff --git a/domains/pallets/messenger/src/mock.rs b/domains/pallets/messenger/src/mock.rs index 879cde7d6d1..60b25737293 100644 --- a/domains/pallets/messenger/src/mock.rs +++ b/domains/pallets/messenger/src/mock.rs @@ -113,7 +113,7 @@ macro_rules! impl_runtime { type AdjustedWeightToFee = frame_support::weights::IdentityFee; type FeeMultiplier = FeeMultiplier; type NoteChainTransfer = (); - type ExtensionWeightInfo = crate::extensions::weights::SubstrateWeight<$runtime>; + type ExtensionWeightInfo = crate::extensions::weights::SubstrateWeight<$runtime, (), ()>; /// function to fetch endpoint response handler by Endpoint. fn get_endpoint_handler( #[allow(unused_variables)] endpoint: &Endpoint, diff --git a/domains/pallets/transporter/src/mock.rs b/domains/pallets/transporter/src/mock.rs index 10e72938858..038f64a1d9d 100644 --- a/domains/pallets/transporter/src/mock.rs +++ b/domains/pallets/transporter/src/mock.rs @@ -100,7 +100,8 @@ impl pallet_messenger::Config for MockRuntime { type HoldIdentifier = MockHoldIdentifier; type DomainRegistration = DomainRegistration; type MaxOutgoingMessages = MaxOutgoingMessages; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = + pallet_messenger::extensions::weights::SubstrateWeight; /// function to fetch endpoint response handler by Endpoint. fn get_endpoint_handler(_endpoint: &Endpoint) -> Option>> { #[cfg(feature = "runtime-benchmarks")] diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index 16b501c5f46..9f272adf7f3 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -444,7 +444,11 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + pallet_messenger::extensions::WeightsFromConsensus, + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index df3bcc70809..21847b7426d 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -596,7 +596,11 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + pallet_messenger::extensions::WeightsFromConsensus, + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime diff --git a/domains/test/runtime/auto-id/src/lib.rs b/domains/test/runtime/auto-id/src/lib.rs index 36d34529aa0..24c22850be4 100644 --- a/domains/test/runtime/auto-id/src/lib.rs +++ b/domains/test/runtime/auto-id/src/lib.rs @@ -442,7 +442,11 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + pallet_messenger::extensions::WeightsFromConsensus, + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime diff --git a/domains/test/runtime/evm/src/lib.rs b/domains/test/runtime/evm/src/lib.rs index b20c9631dcb..14fbcb81e6e 100644 --- a/domains/test/runtime/evm/src/lib.rs +++ b/domains/test/runtime/evm/src/lib.rs @@ -631,7 +631,11 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + pallet_messenger::extensions::WeightsFromConsensus, + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index 46d20cf950a..a8ec05f77fc 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -729,7 +729,11 @@ impl pallet_messenger::Config for Runtime { type MaxOutgoingMessages = MaxOutgoingMessages; type MessengerOrigin = pallet_messenger::EnsureMessengerOrigin; type NoteChainTransfer = Transporter; - type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< + Runtime, + pallet_messenger::extensions::WeightsFromConsensus, + pallet_messenger::extensions::WeightsFromDomains, + >; } impl frame_system::offchain::CreateTransactionBase for Runtime From c977079f385f2ee486e2732a07e6cbbb1827b880 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:08:52 +0800 Subject: [PATCH 05/11] Export pallet WeightInfo trait Signed-off-by: linning --- crates/pallet-domains/src/lib.rs | 2 +- crates/pallet-rewards/src/lib.rs | 1 + crates/pallet-runtime-configs/src/lib.rs | 1 + crates/pallet-subspace/src/extensions.rs | 2 +- crates/pallet-subspace/src/lib.rs | 1 + domains/pallets/auto-id/src/lib.rs | 2 +- domains/pallets/executive/src/lib.rs | 1 + domains/pallets/messenger/src/lib.rs | 1 + domains/pallets/transporter/src/lib.rs | 1 + 9 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/pallet-domains/src/lib.rs b/crates/pallet-domains/src/lib.rs index 56029bf8f47..faad6b95554 100644 --- a/crates/pallet-domains/src/lib.rs +++ b/crates/pallet-domains/src/lib.rs @@ -29,7 +29,7 @@ use crate::staking::OperatorStatus; #[cfg(feature = "runtime-benchmarks")] pub use crate::staking::do_register_operator; use crate::staking_epoch::EpochTransitionResult; -use crate::weights::WeightInfo; +pub use crate::weights::WeightInfo; #[cfg(not(feature = "std"))] use alloc::boxed::Box; use alloc::collections::btree_map::BTreeMap; diff --git a/crates/pallet-rewards/src/lib.rs b/crates/pallet-rewards/src/lib.rs index 8e9fe0e1f17..e7b9cae5112 100644 --- a/crates/pallet-rewards/src/lib.rs +++ b/crates/pallet-rewards/src/lib.rs @@ -23,6 +23,7 @@ use sp_core::U256; use sp_runtime::Saturating; use sp_runtime::traits::{CheckedSub, Zero}; use subspace_runtime_primitives::{BlockNumber, FindBlockRewardAddress, FindVotingRewardAddresses}; +pub use weights::WeightInfo; type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; diff --git a/crates/pallet-runtime-configs/src/lib.rs b/crates/pallet-runtime-configs/src/lib.rs index 71a66ebffd9..e6052271db1 100644 --- a/crates/pallet-runtime-configs/src/lib.rs +++ b/crates/pallet-runtime-configs/src/lib.rs @@ -7,6 +7,7 @@ mod benchmarking; pub mod weights; pub use pallet::*; +pub use weights::WeightInfo; #[frame_support::pallet] mod pallet { diff --git a/crates/pallet-subspace/src/extensions.rs b/crates/pallet-subspace/src/extensions.rs index f77efffb30e..2fc491f66f7 100644 --- a/crates/pallet-subspace/src/extensions.rs +++ b/crates/pallet-subspace/src/extensions.rs @@ -4,7 +4,7 @@ pub mod benchmarking; pub mod weights; -use crate::extensions::weights::WeightInfo; +pub use crate::extensions::weights::WeightInfo; use crate::pallet::Call as SubspaceCall; use crate::{Config, Origin, Pallet as Subspace}; use frame_support::RuntimeDebugNoBound; diff --git a/crates/pallet-subspace/src/lib.rs b/crates/pallet-subspace/src/lib.rs index 3d12dba3880..311066b659f 100644 --- a/crates/pallet-subspace/src/lib.rs +++ b/crates/pallet-subspace/src/lib.rs @@ -60,6 +60,7 @@ use subspace_verification::{ PieceCheckParams, VerifySolutionParams, check_reward_signature, derive_next_solution_range, derive_pot_entropy, }; +pub use weights::WeightInfo; /// Trigger an era change, if any should take place. pub trait EraChangeTrigger { diff --git a/domains/pallets/auto-id/src/lib.rs b/domains/pallets/auto-id/src/lib.rs index 3ea71973a8d..021ad32e620 100644 --- a/domains/pallets/auto-id/src/lib.rs +++ b/domains/pallets/auto-id/src/lib.rs @@ -25,7 +25,6 @@ pub mod weights; extern crate alloc; -use crate::weights::WeightInfo; #[cfg(not(feature = "std"))] use alloc::collections::BTreeSet; #[cfg(not(feature = "std"))] @@ -43,6 +42,7 @@ use sp_core::{H256, U256, blake2_256}; #[cfg(feature = "std")] use std::collections::BTreeSet; use subspace_runtime_primitives::Moment; +pub use weights::WeightInfo; /// Unique AutoId identifier. pub type Identifier = H256; diff --git a/domains/pallets/executive/src/lib.rs b/domains/pallets/executive/src/lib.rs index 27f5b7faf19..0353403c391 100644 --- a/domains/pallets/executive/src/lib.rs +++ b/domains/pallets/executive/src/lib.rs @@ -60,6 +60,7 @@ use sp_runtime::transaction_validity::{ use sp_runtime::{ApplyExtrinsicResult, DispatchError, ExtrinsicInclusionMode}; use sp_std::marker::PhantomData; use sp_std::prelude::*; +pub use weights::WeightInfo; pub type CheckedOf = >::Checked; pub type CallOf = as Applyable>::Call; diff --git a/domains/pallets/messenger/src/lib.rs b/domains/pallets/messenger/src/lib.rs index dcc13194db3..c9a00b277a7 100644 --- a/domains/pallets/messenger/src/lib.rs +++ b/domains/pallets/messenger/src/lib.rs @@ -51,6 +51,7 @@ use sp_messenger::messages::{ use sp_runtime::DispatchError; use sp_runtime::traits::Hash; use subspace_runtime_primitives::CreateUnsigned; +pub use weights::WeightInfo; /// Transaction validity for a given validated XDM extrinsic. /// If the extrinsic is not included in the bundle, extrinsic is removed from the TxPool. diff --git a/domains/pallets/transporter/src/lib.rs b/domains/pallets/transporter/src/lib.rs index d39ce1d92e1..ad0cdaf6158 100644 --- a/domains/pallets/transporter/src/lib.rs +++ b/domains/pallets/transporter/src/lib.rs @@ -43,6 +43,7 @@ use sp_messenger::endpoint::EndpointResponse; use sp_messenger::messages::ChainId; use sp_runtime::traits::{CheckedAdd, CheckedSub, Get}; use sp_std::vec; +pub use weights::WeightInfo; /// Location that either sends or receives transfers between chains. #[derive(Debug, Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] From 86dd424a695d177d002ff0d7684413e3613e7956 Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:14:04 +0800 Subject: [PATCH 06/11] Add more (mostly upstream) pallets to runtime benchmark list Signed-off-by: linning --- crates/subspace-runtime/Cargo.toml | 6 ++++++ crates/subspace-runtime/src/fees.rs | 12 ++++++++++++ crates/subspace-runtime/src/lib.rs | 8 ++++++++ domains/pallets/block-fees/Cargo.toml | 5 +++++ domains/pallets/block-fees/src/fees.rs | 16 ++++++++++++++-- domains/runtime/auto-id/Cargo.toml | 5 ++++- domains/runtime/auto-id/src/lib.rs | 14 ++++++++++++++ domains/runtime/evm/Cargo.toml | 4 ++++ domains/runtime/evm/src/lib.rs | 9 +++++++++ 9 files changed, 76 insertions(+), 3 deletions(-) diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index 10cecd7c0b4..f45637de621 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -144,16 +144,22 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collective/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", "pallet-domains/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-messenger/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", "pallet-rewards/runtime-benchmarks", "pallet-runtime-configs/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", "pallet-subspace/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-transaction-payment/runtime-benchmarks", "pallet-transporter/runtime-benchmarks", "pallet-utility/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", "sp-consensus-subspace/runtime-benchmarks", "sp-messenger/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/crates/subspace-runtime/src/fees.rs b/crates/subspace-runtime/src/fees.rs index eb3683c6463..71069d48ea6 100644 --- a/crates/subspace-runtime/src/fees.rs +++ b/crates/subspace-runtime/src/fees.rs @@ -1,5 +1,7 @@ use crate::{Balances, Runtime, RuntimeCall, TransactionFees}; use frame_support::traits::fungible::Inspect; +#[cfg(feature = "runtime-benchmarks")] +use frame_support::traits::fungible::Mutate; use frame_support::traits::tokens::WithdrawConsequence; use frame_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons}; use pallet_balances::NegativeImbalance; @@ -120,4 +122,14 @@ impl pallet_transaction_payment::OnChargeTransaction for OnChargeTransa _ => Err(InvalidTransaction::Payment.into()), } } + + #[cfg(feature = "runtime-benchmarks")] + fn endow_account(who: &AccountId, amount: Self::Balance) { + Balances::set_balance(who, amount); + } + + #[cfg(feature = "runtime-benchmarks")] + fn minimum_balance() -> Self::Balance { + >::minimum_balance() + } } diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index 730cc9d7b1d..0ac9b1e6d21 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -1268,6 +1268,14 @@ mod benches { [pallet_transporter, Transporter] [pallet_subspace_extension, SubspaceExtensionBench::] [pallet_messenger_from_domains_extension, MessengerFromDomainsExtensionBench::] + [pallet_transaction_payment, TransactionPayment] + [pallet_utility, Utility] + [pallet_sudo, Sudo] + [pallet_collective, Council] + [pallet_preimage, Preimage] + [pallet_scheduler, Scheduler] + [pallet_democracy, Democracy] + [pallet_multisig, Multisig] ); } diff --git a/domains/pallets/block-fees/Cargo.toml b/domains/pallets/block-fees/Cargo.toml index ff4f65f484a..c09bd518f55 100644 --- a/domains/pallets/block-fees/Cargo.toml +++ b/domains/pallets/block-fees/Cargo.toml @@ -37,3 +37,8 @@ std = [ "sp-runtime/std", "sp-std/std", ] + +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] diff --git a/domains/pallets/block-fees/src/fees.rs b/domains/pallets/block-fees/src/fees.rs index 68193f8d4b8..2bbbf2ad0d7 100644 --- a/domains/pallets/block-fees/src/fees.rs +++ b/domains/pallets/block-fees/src/fees.rs @@ -1,5 +1,5 @@ use crate::Pallet as BlockFees; -use frame_support::traits::fungible::Inspect; +use frame_support::traits::fungible::{Inspect, Mutate}; use frame_support::traits::tokens::WithdrawConsequence; use frame_support::traits::{Currency, ExistenceRequirement, Imbalance, WithdrawReasons}; use parity_scale_codec::Encode; @@ -24,7 +24,9 @@ pub struct OnChargeDomainTransaction(PhantomData); impl pallet_transaction_payment::OnChargeTransaction for OnChargeDomainTransaction where T: pallet_transaction_payment::Config + crate::Config>, - C: Currency> + Inspect, Balance = BalanceOf>, + C: Currency> + + Inspect, Balance = BalanceOf> + + Mutate>, C::PositiveImbalance: Imbalance, Opposite = C::NegativeImbalance>, { type Balance = BalanceOf; @@ -113,4 +115,14 @@ where } Ok(()) } + + #[cfg(feature = "runtime-benchmarks")] + fn endow_account(who: &AccountIdOf, amount: Self::Balance) { + C::set_balance(who, amount); + } + + #[cfg(feature = "runtime-benchmarks")] + fn minimum_balance() -> Self::Balance { + >>::minimum_balance() + } } diff --git a/domains/runtime/auto-id/Cargo.toml b/domains/runtime/auto-id/Cargo.toml index ff5e55d3ab4..a85646a3a18 100644 --- a/domains/runtime/auto-id/Cargo.toml +++ b/domains/runtime/auto-id/Cargo.toml @@ -124,7 +124,10 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-auto-id/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-block-fees/runtime-benchmarks", "pallet-messenger/runtime-benchmarks", "pallet-domain-id/runtime-benchmarks", - "pallet-utility/runtime-benchmarks" + "pallet-transaction-payment/runtime-benchmarks", + "pallet-transporter/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", ] diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index 9f272adf7f3..e4b8e9f9c71 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -435,6 +435,9 @@ impl pallet_messenger::Config for Runtime { type OnXDMRewards = OnXDMRewards; type MmrHash = MmrHash; type MmrProofVerifier = MmrProofVerifier; + #[cfg(feature = "runtime-benchmarks")] + type StorageKeys = sp_messenger::BenchmarkStorageKeys; + #[cfg(not(feature = "runtime-benchmarks"))] type StorageKeys = StorageKeys; type DomainOwner = (); type HoldIdentifier = HoldIdentifierWrapper; @@ -660,7 +663,14 @@ mod benches { [frame_system, SystemBench::] [domain_pallet_executive, ExecutivePallet] [pallet_messenger, Messenger] + [pallet_messenger_from_consensus_extension, MessengerFromConsensusExtensionBench::] + [pallet_messenger_between_domains_extension, MessengerBetweenDomainsExtensionBench::] [pallet_auto_id, AutoId] + [pallet_timestamp, Timestamp] + [pallet_utility, Utility] + [pallet_balances, Balances] + [pallet_transporter, Transporter] + [pallet_transaction_payment, TransactionPayment] ); } @@ -1204,6 +1214,8 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench; + use pallet_messenger::extensions::benchmarking_from_consensus::Pallet as MessengerFromConsensusExtensionBench; + use pallet_messenger::extensions::benchmarking_between_domains::Pallet as MessengerBetweenDomainsExtensionBench; let mut list = Vec::::new(); @@ -1222,6 +1234,8 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use frame_support::traits::WhitelistedStorageKeys; use baseline::Pallet as BaselineBench; + use pallet_messenger::extensions::benchmarking_from_consensus::Pallet as MessengerFromConsensusExtensionBench; + use pallet_messenger::extensions::benchmarking_between_domains::Pallet as MessengerBetweenDomainsExtensionBench; let whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index f2e5b74ac20..8acf1cc4e9e 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -139,10 +139,14 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-block-fees/runtime-benchmarks", "pallet-domain-id/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", "pallet-evm/runtime-benchmarks", "pallet-messenger/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-transaction-payment/runtime-benchmarks", + "pallet-transporter/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "sp-messenger/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index 21847b7426d..b1ca0670d22 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -975,6 +975,13 @@ mod benches { [domain_pallet_executive, ExecutivePallet] [pallet_messenger, Messenger] [pallet_messenger_from_consensus_extension, MessengerFromConsensusExtensionBench::] + [pallet_messenger_between_domains_extension, MessengerBetweenDomainsExtensionBench::] + [pallet_timestamp, Timestamp] + [pallet_utility, Utility] + [pallet_balances, Balances] + [pallet_transporter, Transporter] + [pallet_evm, EVM] + [pallet_transaction_payment, TransactionPayment] ); } @@ -1835,6 +1842,7 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench; use pallet_messenger::extensions::benchmarking_from_consensus::Pallet as MessengerFromConsensusExtensionBench; + use pallet_messenger::extensions::benchmarking_between_domains::Pallet as MessengerBetweenDomainsExtensionBench; let mut list = Vec::::new(); @@ -1854,6 +1862,7 @@ impl_runtime_apis! { use frame_support::traits::WhitelistedStorageKeys; use baseline::Pallet as BaselineBench; use pallet_messenger::extensions::benchmarking_from_consensus::Pallet as MessengerFromConsensusExtensionBench; + use pallet_messenger::extensions::benchmarking_between_domains::Pallet as MessengerBetweenDomainsExtensionBench; let whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); From a6e26704bd08bf8a1db9bcc73faf1e0c0606233a Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:16:36 +0800 Subject: [PATCH 07/11] Init weights files structure in the runtime Signed-off-by: linning --- crates/subspace-runtime/src/lib.rs | 1 + crates/subspace-runtime/src/weights.rs | 1 - crates/subspace-runtime/src/weights/mod.rs | 18 ++++++++++++++++++ domains/runtime/auto-id/src/lib.rs | 2 ++ domains/runtime/auto-id/src/weights/mod.rs | 11 +++++++++++ domains/runtime/evm/src/lib.rs | 1 + domains/runtime/evm/src/weights/mod.rs | 11 +++++++++++ 7 files changed, 44 insertions(+), 1 deletion(-) delete mode 100644 crates/subspace-runtime/src/weights.rs create mode 100644 crates/subspace-runtime/src/weights/mod.rs create mode 100644 domains/runtime/auto-id/src/weights/mod.rs create mode 100644 domains/runtime/evm/src/weights/mod.rs diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index 0ac9b1e6d21..ac7e75bc277 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -17,6 +17,7 @@ mod domains; mod fees; mod object_mapping; mod signed_extensions; +mod weights; extern crate alloc; diff --git a/crates/subspace-runtime/src/weights.rs b/crates/subspace-runtime/src/weights.rs deleted file mode 100644 index 264122fb297..00000000000 --- a/crates/subspace-runtime/src/weights.rs +++ /dev/null @@ -1 +0,0 @@ -pub(crate) mod subspace; diff --git a/crates/subspace-runtime/src/weights/mod.rs b/crates/subspace-runtime/src/weights/mod.rs new file mode 100644 index 00000000000..a178c0acac8 --- /dev/null +++ b/crates/subspace-runtime/src/weights/mod.rs @@ -0,0 +1,18 @@ +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_collective; +pub mod pallet_domains; +pub mod pallet_messenger; +pub mod pallet_messenger_from_domains_extension; +pub mod pallet_multisig; +pub mod pallet_preimage; +pub mod pallet_rewards; +pub mod pallet_runtime_configs; +pub mod pallet_scheduler; +pub mod pallet_subspace; +pub mod pallet_subspace_extension; +pub mod pallet_sudo; +pub mod pallet_timestamp; +pub mod pallet_transaction_payment; +pub mod pallet_transporter; +pub mod pallet_utility; diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index e4b8e9f9c71..e0791a51721 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -9,6 +9,8 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); extern crate alloc; +mod weights; + use alloc::borrow::Cow; #[cfg(not(feature = "std"))] use alloc::format; diff --git a/domains/runtime/auto-id/src/weights/mod.rs b/domains/runtime/auto-id/src/weights/mod.rs new file mode 100644 index 00000000000..a4e3c462315 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/mod.rs @@ -0,0 +1,11 @@ +pub mod domain_pallet_executive; +pub mod frame_system; +pub mod pallet_auto_id; +pub mod pallet_balances; +pub mod pallet_messenger; +pub mod pallet_messenger_between_domains_extension; +pub mod pallet_messenger_from_consensus_extension; +pub mod pallet_timestamp; +pub mod pallet_transaction_payment; +pub mod pallet_transporter; +pub mod pallet_utility; diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index b1ca0670d22..6ab02434e8f 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -4,6 +4,7 @@ #![recursion_limit = "256"] mod precompiles; +mod weights; // Make the WASM binary available. #[cfg(feature = "std")] diff --git a/domains/runtime/evm/src/weights/mod.rs b/domains/runtime/evm/src/weights/mod.rs new file mode 100644 index 00000000000..37511e20976 --- /dev/null +++ b/domains/runtime/evm/src/weights/mod.rs @@ -0,0 +1,11 @@ +pub mod domain_pallet_executive; +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_evm; +pub mod pallet_messenger; +pub mod pallet_messenger_between_domains_extension; +pub mod pallet_messenger_from_consensus_extension; +pub mod pallet_timestamp; +pub mod pallet_transaction_payment; +pub mod pallet_transporter; +pub mod pallet_utility; From 1a273f9a9b3c8c8b9c22881deac5b0a54f2178fa Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:24:04 +0800 Subject: [PATCH 08/11] Add and run scripte to generate weight files All weight files are generated by running './runtime_benchmark.sh' Signed-off-by: linning --- .../src/weights/frame_system.rs | 148 ++++ .../src/weights/pallet_balances.rs | 159 +++++ .../src/weights/pallet_collective.rs | 328 +++++++++ .../src/weights/pallet_domains.rs | 658 ++++++++++++++++++ .../src/weights/pallet_messenger.rs | 153 ++++ ...pallet_messenger_from_domains_extension.rs | 83 +++ .../src/weights/pallet_multisig.rs | 151 ++++ .../src/weights/pallet_preimage.rs | 250 +++++++ .../src/weights/pallet_rewards.rs | 54 ++ .../src/weights/pallet_runtime_configs.rs | 68 ++ .../src/weights/pallet_scheduler.rs | 272 ++++++++ .../src/weights/pallet_subspace.rs | 118 ++++ .../src/weights/pallet_subspace_extension.rs | 93 +++ .../src/weights/pallet_sudo.rs | 92 +++ .../src/weights/pallet_timestamp.rs | 55 ++ .../src/weights/pallet_transaction_payment.rs | 51 ++ .../src/weights/pallet_transporter.rs | 105 +++ .../src/weights/pallet_utility.rs | 84 +++ .../src/weights/domain_pallet_executive.rs | 49 ++ .../auto-id/src/weights/frame_system.rs | 158 +++++ .../auto-id/src/weights/pallet_auto_id.rs | 152 ++++ .../auto-id/src/weights/pallet_balances.rs | 193 +++++ .../auto-id/src/weights/pallet_messenger.rs | 170 +++++ ...let_messenger_between_domains_extension.rs | 96 +++ ...llet_messenger_from_consensus_extension.rs | 96 +++ .../auto-id/src/weights/pallet_timestamp.rs | 56 ++ .../src/weights/pallet_transaction_payment.rs | 54 ++ .../auto-id/src/weights/pallet_transporter.rs | 112 +++ .../auto-id/src/weights/pallet_utility.rs | 97 +++ .../src/weights/domain_pallet_executive.rs | 49 ++ .../runtime/evm/src/weights/frame_system.rs | 158 +++++ .../evm/src/weights/pallet_balances.rs | 193 +++++ domains/runtime/evm/src/weights/pallet_evm.rs | 44 ++ .../evm/src/weights/pallet_messenger.rs | 170 +++++ ...let_messenger_between_domains_extension.rs | 96 +++ ...llet_messenger_from_consensus_extension.rs | 96 +++ .../evm/src/weights/pallet_timestamp.rs | 56 ++ .../src/weights/pallet_transaction_payment.rs | 54 ++ .../evm/src/weights/pallet_transporter.rs | 112 +++ .../runtime/evm/src/weights/pallet_utility.rs | 97 +++ runtime-benchmark.sh | 81 +++ 41 files changed, 5361 insertions(+) create mode 100644 crates/subspace-runtime/src/weights/frame_system.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_balances.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_collective.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_domains.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_messenger.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_multisig.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_preimage.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_rewards.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_runtime_configs.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_scheduler.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_subspace.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_subspace_extension.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_sudo.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_timestamp.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_transaction_payment.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_transporter.rs create mode 100644 crates/subspace-runtime/src/weights/pallet_utility.rs create mode 100644 domains/runtime/auto-id/src/weights/domain_pallet_executive.rs create mode 100644 domains/runtime/auto-id/src/weights/frame_system.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_auto_id.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_balances.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_messenger.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_timestamp.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_transaction_payment.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_transporter.rs create mode 100644 domains/runtime/auto-id/src/weights/pallet_utility.rs create mode 100644 domains/runtime/evm/src/weights/domain_pallet_executive.rs create mode 100644 domains/runtime/evm/src/weights/frame_system.rs create mode 100644 domains/runtime/evm/src/weights/pallet_balances.rs create mode 100644 domains/runtime/evm/src/weights/pallet_evm.rs create mode 100644 domains/runtime/evm/src/weights/pallet_messenger.rs create mode 100644 domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs create mode 100644 domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs create mode 100644 domains/runtime/evm/src/weights/pallet_timestamp.rs create mode 100644 domains/runtime/evm/src/weights/pallet_transaction_payment.rs create mode 100644 domains/runtime/evm/src/weights/pallet_transporter.rs create mode 100644 domains/runtime/evm/src/weights/pallet_utility.rs create mode 100755 runtime-benchmark.sh diff --git a/crates/subspace-runtime/src/weights/frame_system.rs b/crates/subspace-runtime/src/weights/frame_system.rs new file mode 100644 index 00000000000..87f2125a95f --- /dev/null +++ b/crates/subspace-runtime/src/weights/frame_system.rs @@ -0,0 +1,148 @@ + +//! Autogenerated weights for `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/frame_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3932160]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_670_000 picoseconds. + Weight::from_parts(2_730_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(321, 0).saturating_mul(b.into())) + } + /// The range of component `b` is `[0, 3932160]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_589_000 picoseconds. + Weight::from_parts(6_670_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_089, 0).saturating_mul(b.into())) + } + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + fn set_heap_pages() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_330_000 picoseconds. + Weight::from_parts(4_520_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 120_649_686_000 picoseconds. + Weight::from_parts(145_558_145_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_660_000 picoseconds. + Weight::from_parts(2_690_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 717 + .saturating_add(Weight::from_parts(800_027, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_770_000 picoseconds. + Weight::from_parts(2_790_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 701 + .saturating_add(Weight::from_parts(601_642, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `17 + p * (69 ±0)` + // Estimated: `0 + p * (70 ±0)` + // Minimum execution time: 4_330_000 picoseconds. + Weight::from_parts(4_400_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 954 + .saturating_add(Weight::from_parts(1_199_247, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_800_000 picoseconds. + Weight::from_parts(12_140_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `21` + // Estimated: `1518` + // Minimum execution time: 141_109_060_000 picoseconds. + Weight::from_parts(146_311_089_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_balances.rs b/crates/subspace-runtime/src/weights/pallet_balances.rs new file mode 100644 index 00000000000..bffd7c464d3 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_balances.rs @@ -0,0 +1,159 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 66_449_000 picoseconds. + Weight::from_parts(67_359_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 53_219_000 picoseconds. + Weight::from_parts(53_629_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 17_370_000 picoseconds. + Weight::from_parts(17_599_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 26_879_000 picoseconds. + Weight::from_parts(27_179_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `6196` + // Minimum execution time: 68_189_000 picoseconds. + Weight::from_parts(68_628_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 66_268_000 picoseconds. + Weight::from_parts(67_059_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_170_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (136 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 20_320_000 picoseconds. + Weight::from_parts(20_450_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 10_380 + .saturating_add(Weight::from_parts(17_592_764, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) + } + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_180_000 picoseconds. + Weight::from_parts(7_370_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 39_059_000 picoseconds. + Weight::from_parts(39_559_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 26_150_000 picoseconds. + Weight::from_parts(26_330_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_collective.rs b/crates/subspace-runtime/src/weights/pallet_collective.rs new file mode 100644 index 00000000000..1325b036c71 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_collective.rs @@ -0,0 +1,328 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_collective.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collective`. +pub struct WeightInfo(PhantomData); +impl pallet_collective::WeightInfo for WeightInfo { + /// Storage: `Council::Members` (r:1 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:100 w:100) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15670 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 15_780_000 picoseconds. + Weight::from_parts(15_910_000, 0) + .saturating_add(Weight::from_parts(0, 15670)) + // Standard Error: 88_241 + .saturating_add(Weight::from_parts(6_092_216, 0).saturating_mul(m.into())) + // Standard Error: 88_241 + .saturating_add(Weight::from_parts(10_744_612, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7 + m * (32 ±0)` + // Estimated: `1493 + m * (32 ±0)` + // Minimum execution time: 14_860_000 picoseconds. + Weight::from_parts(13_865_149, 0) + .saturating_add(Weight::from_parts(0, 1493)) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_552, 0).saturating_mul(b.into())) + // Standard Error: 318 + .saturating_add(Weight::from_parts(14_085, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7 + m * (32 ±0)` + // Estimated: `3473 + m * (32 ±0)` + // Minimum execution time: 18_220_000 picoseconds. + Weight::from_parts(16_895_561, 0) + .saturating_add(Weight::from_parts(0, 3473)) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_578, 0).saturating_mul(b.into())) + // Standard Error: 313 + .saturating_add(Weight::from_parts(26_773, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalCount` (r:1 w:1) + /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `RuntimeConfigs::CouncilDemocracyConfig` (r:1 w:0) + /// Proof: `RuntimeConfigs::CouncilDemocracyConfig` (`max_values`: Some(1), `max_size`: Some(28), added: 523, mode: `MaxEncodedLen`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `301 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3692 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 25_069_000 picoseconds. + Weight::from_parts(27_877_662, 0) + .saturating_add(Weight::from_parts(0, 3692)) + // Standard Error: 86 + .saturating_add(Weight::from_parts(2_125, 0).saturating_mul(b.into())) + // Standard Error: 901 + .saturating_add(Weight::from_parts(20_209, 0).saturating_mul(m.into())) + // Standard Error: 890 + .saturating_add(Weight::from_parts(182_036, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `750 + m * (64 ±0)` + // Estimated: `4214 + m * (64 ±0)` + // Minimum execution time: 24_539_000 picoseconds. + Weight::from_parts(24_915_911, 0) + .saturating_add(Weight::from_parts(0, 4214)) + // Standard Error: 226 + .saturating_add(Weight::from_parts(27_965, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `339 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3784 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 28_279_000 picoseconds. + Weight::from_parts(28_947_721, 0) + .saturating_add(Weight::from_parts(0, 3784)) + // Standard Error: 607 + .saturating_add(Weight::from_parts(21_206, 0).saturating_mul(m.into())) + // Standard Error: 592 + .saturating_add(Weight::from_parts(179_483, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `640 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `3957 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 40_309_000 picoseconds. + Weight::from_parts(41_499_991, 0) + .saturating_add(Weight::from_parts(0, 3957)) + // Standard Error: 110 + .saturating_add(Weight::from_parts(2_005, 0).saturating_mul(b.into())) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(19_795, 0).saturating_mul(m.into())) + // Standard Error: 1_138 + .saturating_add(Weight::from_parts(212_139, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `359 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3804 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 31_019_000 picoseconds. + Weight::from_parts(31_155_882, 0) + .saturating_add(Weight::from_parts(0, 3804)) + // Standard Error: 676 + .saturating_add(Weight::from_parts(24_821, 0).saturating_mul(m.into())) + // Standard Error: 659 + .saturating_add(Weight::from_parts(183_919, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `660 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `3977 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 42_929_000 picoseconds. + Weight::from_parts(44_270_375, 0) + .saturating_add(Weight::from_parts(0, 3977)) + // Standard Error: 111 + .saturating_add(Weight::from_parts(1_692, 0).saturating_mul(b.into())) + // Standard Error: 1_178 + .saturating_add(Weight::from_parts(20_423, 0).saturating_mul(m.into())) + // Standard Error: 1_149 + .saturating_add(Weight::from_parts(212_381, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `168 + p * (32 ±0)` + // Estimated: `1653 + p * (32 ±0)` + // Minimum execution time: 15_570_000 picoseconds. + Weight::from_parts(16_792_925, 0) + .saturating_add(Weight::from_parts(0, 1653)) + // Standard Error: 463 + .saturating_add(Weight::from_parts(163_781, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) + } + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::CostOf` (r:1 w:0) + /// Proof: `Council::CostOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `d` is `[0, 1]`. + /// The range of component `p` is `[1, 100]`. + fn kill(d: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1439 + p * (36 ±0)` + // Estimated: `4838 + d * (123 ±6) + p * (37 ±0)` + // Minimum execution time: 23_349_000 picoseconds. + Weight::from_parts(25_844_386, 0) + .saturating_add(Weight::from_parts(0, 4838)) + // Standard Error: 49_011 + .saturating_add(Weight::from_parts(278_035, 0).saturating_mul(d.into())) + // Standard Error: 759 + .saturating_add(Weight::from_parts(182_321, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 123).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) + } + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::CostOf` (r:1 w:0) + /// Proof: `Council::CostOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn release_proposal_cost() -> Weight { + // Proof Size summary in bytes: + // Measured: `853` + // Estimated: `4318` + // Minimum execution time: 15_500_000 picoseconds. + Weight::from_parts(15_809_000, 0) + .saturating_add(Weight::from_parts(0, 4318)) + .saturating_add(T::DbWeight::get().reads(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_domains.rs b/crates/subspace-runtime/src/weights/pallet_domains.rs new file mode 100644 index 00000000000..a15f0f9e2c3 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_domains.rs @@ -0,0 +1,658 @@ + +//! Autogenerated weights for `pallet_domains` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_domains +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_domains.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_domains`. +pub struct WeightInfo(PhantomData); +impl pallet_domains::WeightInfo for WeightInfo { + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:1) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::NewAddedHeadReceipt` (r:1 w:1) + /// Proof: `Domains::NewAddedHeadReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:1) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTree` (r:2 w:2) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTreeNodes` (r:1 w:2) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ExecutionInbox` (r:3 w:1) + /// Proof: `Domains::ExecutionInbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::SkipBalanceChecks` (r:1 w:0) + /// Proof: `Domains::SkipBalanceChecks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::DomainBalances` (r:1 w:1) + /// Proof: `Transporter::DomainBalances` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRegistry` (r:1 w:0) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRuntimeUpgradeRecords` (r:1 w:0) + /// Proof: `Domains::DomainRuntimeUpgradeRecords` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::SuccessfulBundles` (r:1 w:1) + /// Proof: `Domains::SuccessfulBundles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:1) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorBundleSlot` (r:1 w:1) + /// Proof: `Domains::OperatorBundleSlot` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::InboxedBundleAuthor` (r:0 w:1) + /// Proof: `Domains::InboxedBundleAuthor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ConsensusBlockHash` (r:0 w:1) + /// Proof: `Domains::ConsensusBlockHash` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_bundle() -> Weight { + // Proof Size summary in bytes: + // Measured: `1847` + // Estimated: `10262` + // Minimum execution time: 167_476_000 picoseconds. + Weight::from_parts(171_546_000, 0) + .saturating_add(Weight::from_parts(0, 10262)) + .saturating_add(T::DbWeight::get().reads(17)) + .saturating_add(T::DbWeight::get().writes(14)) + } + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:1) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTreeNodes` (r:1 w:0) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_fraud_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `1046` + // Estimated: `4511` + // Minimum execution time: 36_850_000 picoseconds. + Weight::from_parts(40_559_000, 0) + .saturating_add(Weight::from_parts(0, 4511)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Domains::BlockTree` (r:1 w:1) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTreeNodes` (r:1 w:1) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:100 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:100 w:100) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::PendingSlashes` (r:1 w:1) + /// Proof: `Domains::PendingSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn handle_bad_receipt(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `966 + n * (192 ±0)` + // Estimated: `4431 + n * (2667 ±0)` + // Minimum execution time: 61_879_000 picoseconds. + Weight::from_parts(63_828_000, 0) + .saturating_add(Weight::from_parts(0, 4431)) + // Standard Error: 46_023 + .saturating_add(Weight::from_parts(20_061_261, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2667).saturating_mul(n.into())) + } + /// Storage: `Domains::Operators` (r:200 w:100) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::PendingSlashes` (r:1 w:1) + /// Proof: `Domains::PendingSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::AccumulatedTreasuryFunds` (r:1 w:1) + /// Proof: `Domains::AccumulatedTreasuryFunds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + /// The range of component `s` is `[0, 100]`. + fn confirm_domain_block(n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + n * (364 ±0) + s * (223 ±0)` + // Estimated: `270392 + n * (2588 ±1) + s * (976 ±0)` + // Minimum execution time: 1_994_148_000 picoseconds. + Weight::from_parts(2_010_387_000, 0) + .saturating_add(Weight::from_parts(0, 270392)) + // Standard Error: 349_444 + .saturating_add(Weight::from_parts(17_430_098, 0).saturating_mul(n.into())) + // Standard Error: 349_765 + .saturating_add(Weight::from_parts(12_360_464, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 2588).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 976).saturating_mul(s.into())) + } + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainChainRewards` (r:1 w:0) + /// Proof: `Domains::DomainChainRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:100 w:100) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:100 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[1, 100]`. + fn operator_reward_tax_and_restake(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `430 + n * (208 ±0)` + // Estimated: `3895 + n * (2683 ±0)` + // Minimum execution time: 33_329_000 picoseconds. + Weight::from_parts(41_290_342, 0) + .saturating_add(Weight::from_parts(0, 3895)) + // Standard Error: 40_508 + .saturating_add(Weight::from_parts(6_571_818, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2683).saturating_mul(n.into())) + } + /// Storage: `Domains::PendingSlashes` (r:1 w:1) + /// Proof: `Domains::PendingSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:1 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorIdOwner` (r:1 w:1) + /// Proof: `Domains::OperatorIdOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Deposits` (r:11 w:10) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DepositOnHold` (r:10 w:10) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:2 w:2) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Withdrawals` (r:10 w:0) + /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:10 w:10) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:12 w:12) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::NominatorCount` (r:1 w:1) + /// Proof: `Domains::NominatorCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 9]`. + fn slash_operator(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1470 + n * (341 ±0)` + // Estimated: `8799 + n * (2817 ±0)` + // Minimum execution time: 239_894_000 picoseconds. + Weight::from_parts(254_466_854, 0) + .saturating_add(Weight::from_parts(0, 8799)) + // Standard Error: 83_689 + .saturating_add(Weight::from_parts(93_085_708, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(15)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2817).saturating_mul(n.into())) + } + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:512 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:512 w:512) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LastEpochStakingDistribution` (r:0 w:1) + /// Proof: `Domains::LastEpochStakingDistribution` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:0 w:512) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 512]`. + fn finalize_domain_epoch_staking(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `108006` + // Estimated: `1376196` + // Minimum execution time: 4_151_561_000 picoseconds. + Weight::from_parts(4_266_667_921, 0) + .saturating_add(Weight::from_parts(0, 1376196)) + // Standard Error: 7_125 + .saturating_add(Weight::from_parts(3_252_616, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1025)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + } + /// Storage: `Domains::NextRuntimeId` (r:1 w:1) + /// Proof: `Domains::NextRuntimeId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::RuntimeRegistry` (r:0 w:1) + /// Proof: `Domains::RuntimeRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_domain_runtime() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 33_122_534_000 picoseconds. + Weight::from_parts(33_240_001_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Domains::RuntimeRegistry` (r:1 w:0) + /// Proof: `Domains::RuntimeRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ScheduledRuntimeUpgrades` (r:1 w:1) + /// Proof: `Domains::ScheduledRuntimeUpgrades` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn upgrade_domain_runtime() -> Weight { + // Proof Size summary in bytes: + // Measured: `2481066` + // Estimated: `2484531` + // Minimum execution time: 35_626_150_000 picoseconds. + Weight::from_parts(36_472_342_000, 0) + .saturating_add(Weight::from_parts(0, 2484531)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Domains::PermissionedActionAllowedBy` (r:1 w:0) + /// Proof: `Domains::PermissionedActionAllowedBy` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::RuntimeRegistry` (r:1 w:1) + /// Proof: `Domains::RuntimeRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::NextDomainId` (r:1 w:1) + /// Proof: `Domains::NextDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::NextEVMChainId` (r:1 w:1) + /// Proof: `Domains::NextEVMChainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::DomainBalances` (r:1 w:1) + /// Proof: `Transporter::DomainBalances` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::DomainSudoCalls` (r:0 w:1) + /// Proof: `Domains::DomainSudoCalls` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRegistry` (r:0 w:1) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTreeNodes` (r:0 w:1) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:0 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:0 w:1) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainGenesisBlockExecutionReceipt` (r:0 w:1) + /// Proof: `Domains::DomainGenesisBlockExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTree` (r:0 w:1) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::DomainChainAllowlistUpdate` (r:0 w:1) + /// Proof: `Messenger::DomainChainAllowlistUpdate` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn instantiate_domain() -> Weight { + // Proof Size summary in bytes: + // Measured: `2481138` + // Estimated: `2484603` + // Minimum execution time: 6_258_066_000 picoseconds. + Weight::from_parts(6_358_564_000, 0) + .saturating_add(Weight::from_parts(0, 2484603)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(14)) + } + /// Storage: `Domains::PendingStakingOperationCount` (r:1 w:1) + /// Proof: `Domains::PendingStakingOperationCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRegistry` (r:1 w:0) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::NextOperatorId` (r:1 w:1) + /// Proof: `Domains::NextOperatorId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::Deposits` (r:1 w:1) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainChainRewards` (r:1 w:0) + /// Proof: `Domains::DomainChainRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:0 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LastEpochStakingDistribution` (r:0 w:1) + /// Proof: `Domains::LastEpochStakingDistribution` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorIdOwner` (r:0 w:1) + /// Proof: `Domains::OperatorIdOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:0 w:1) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_operator() -> Weight { + // Proof Size summary in bytes: + // Measured: `663` + // Estimated: `6196` + // Minimum execution time: 207_126_000 picoseconds. + Weight::from_parts(211_265_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(12)) + } + /// Storage: `Domains::Operators` (r:1 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::PendingStakingOperationCount` (r:1 w:1) + /// Proof: `Domains::PendingStakingOperationCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::Deposits` (r:1 w:1) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:1 w:0) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn nominate_operator() -> Weight { + // Proof Size summary in bytes: + // Measured: `1254` + // Estimated: `6196` + // Minimum execution time: 178_556_000 picoseconds. + Weight::from_parts(185_606_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `Domains::OperatorIdOwner` (r:1 w:0) + /// Proof: `Domains::OperatorIdOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:1 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:1) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn deregister_operator() -> Weight { + // Proof Size summary in bytes: + // Measured: `677` + // Estimated: `4142` + // Minimum execution time: 51_609_000 picoseconds. + Weight::from_parts(58_859_000, 0) + .saturating_add(Weight::from_parts(0, 4142)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Domains::Operators` (r:1 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::PendingStakingOperationCount` (r:1 w:1) + /// Proof: `Domains::PendingStakingOperationCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Deposits` (r:1 w:1) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:1 w:0) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Withdrawals` (r:1 w:1) + /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorIdOwner` (r:1 w:0) + /// Proof: `Domains::OperatorIdOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn withdraw_stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `1444` + // Estimated: `6196` + // Minimum execution time: 152_757_000 picoseconds. + Weight::from_parts(159_386_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `Domains::Operators` (r:1 w:0) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Withdrawals` (r:1 w:1) + /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::Deposits` (r:1 w:1) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `w` is `[1, 32]`. + fn unlock_funds(w: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1157 + w * (36 ±0)` + // Estimated: `4622 + w * (36 ±0)` + // Minimum execution time: 142_217_000 picoseconds. + Weight::from_parts(150_536_889, 0) + .saturating_add(Weight::from_parts(0, 4622)) + // Standard Error: 10_615 + .saturating_add(Weight::from_parts(16_011, 0).saturating_mul(w.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(w.into())) + } + /// Storage: `Domains::Operators` (r:1 w:1) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Domains::Deposits` (r:1 w:1) + /// Proof: `Domains::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorEpochSharePrice` (r:1 w:1) + /// Proof: `Domains::OperatorEpochSharePrice` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Withdrawals` (r:1 w:0) + /// Proof: `Domains::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DepositOnHold` (r:1 w:1) + /// Proof: `Domains::DepositOnHold` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Domains::NominatorCount` (r:1 w:1) + /// Proof: `Domains::NominatorCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorIdOwner` (r:1 w:1) + /// Proof: `Domains::OperatorIdOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn unlock_nominator() -> Weight { + // Proof Size summary in bytes: + // Measured: `1400` + // Estimated: `8799` + // Minimum execution time: 253_435_000 picoseconds. + Weight::from_parts(263_085_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(14)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `Domains::DomainRegistry` (r:1 w:1) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn update_domain_operator_allow_list() -> Weight { + // Proof Size summary in bytes: + // Measured: `492` + // Estimated: `3957` + // Minimum execution time: 36_929_000 picoseconds. + Weight::from_parts(38_849_000, 0) + .saturating_add(Weight::from_parts(0, 3957)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_treasury_funds() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `6196` + // Minimum execution time: 54_529_000 picoseconds. + Weight::from_parts(55_029_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:1) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::NewAddedHeadReceipt` (r:1 w:1) + /// Proof: `Domains::NewAddedHeadReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTree` (r:1 w:1) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:1) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTreeNodes` (r:0 w:1) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_receipt() -> Weight { + // Proof Size summary in bytes: + // Measured: `723` + // Estimated: `4188` + // Minimum execution time: 61_548_000 picoseconds. + Weight::from_parts(63_609_000, 0) + .saturating_add(Weight::from_parts(0, 4188)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Domains::DomainRegistry` (r:1 w:0) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ExecutionInbox` (r:2 w:0) + /// Proof: `Domains::ExecutionInbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRuntimeUpgradeRecords` (r:1 w:0) + /// Proof: `Domains::DomainRuntimeUpgradeRecords` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:0) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::FrozenDomains` (r:1 w:0) + /// Proof: `Domains::FrozenDomains` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:1 w:0) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorHighestSlot` (r:1 w:0) + /// Proof: `Domains::OperatorHighestSlot` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorBundleSlot` (r:1 w:0) + /// Proof: `Domains::OperatorBundleSlot` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LastEpochStakingDistribution` (r:1 w:0) + /// Proof: `Domains::LastEpochStakingDistribution` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::BlockSlots` (r:1 w:0) + /// Proof: `Subspace::BlockSlots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `Domains::NewAddedHeadReceipt` (r:1 w:0) + /// Proof: `Domains::NewAddedHeadReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ConsensusBlockHash` (r:1 w:0) + /// Proof: `Domains::ConsensusBlockHash` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTree` (r:1 w:0) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:1 w:0) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TransactionFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `TransactionFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn validate_submit_bundle() -> Weight { + // Proof Size summary in bytes: + // Measured: `1411` + // Estimated: `7351` + // Minimum execution time: 673_405_000 picoseconds. + Weight::from_parts(681_145_000, 0) + .saturating_add(Weight::from_parts(0, 7351)) + .saturating_add(T::DbWeight::get().reads(22)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Domains::DomainRegistry` (r:1 w:0) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadDomainNumber` (r:1 w:0) + /// Proof: `Domains::HeadDomainNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ExecutionInbox` (r:2 w:0) + /// Proof: `Domains::ExecutionInbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRuntimeUpgradeRecords` (r:1 w:0) + /// Proof: `Domains::DomainRuntimeUpgradeRecords` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:0) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::FrozenDomains` (r:1 w:0) + /// Proof: `Domains::FrozenDomains` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::Operators` (r:1 w:0) + /// Proof: `Domains::Operators` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestSubmittedER` (r:1 w:0) + /// Proof: `Domains::LatestSubmittedER` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorHighestSlot` (r:1 w:0) + /// Proof: `Domains::OperatorHighestSlot` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::OperatorBundleSlot` (r:1 w:0) + /// Proof: `Domains::OperatorBundleSlot` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LastEpochStakingDistribution` (r:1 w:0) + /// Proof: `Domains::LastEpochStakingDistribution` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainStakingSummary` (r:1 w:0) + /// Proof: `Domains::DomainStakingSummary` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::BlockSlots` (r:1 w:0) + /// Proof: `Subspace::BlockSlots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `Domains::NewAddedHeadReceipt` (r:1 w:0) + /// Proof: `Domains::NewAddedHeadReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::ConsensusBlockHash` (r:1 w:0) + /// Proof: `Domains::ConsensusBlockHash` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::BlockTree` (r:1 w:0) + /// Proof: `Domains::BlockTree` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:1 w:0) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TransactionFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `TransactionFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn validate_singleton_receipt() -> Weight { + // Proof Size summary in bytes: + // Measured: `1441` + // Estimated: `7381` + // Minimum execution time: 671_265_000 picoseconds. + Weight::from_parts(679_586_000, 0) + .saturating_add(Weight::from_parts(0, 7381)) + .saturating_add(T::DbWeight::get().reads(22)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Domains::BlockTreeNodes` (r:2 w:0) + /// Proof: `Domains::BlockTreeNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::HeadReceiptNumber` (r:1 w:0) + /// Proof: `Domains::HeadReceiptNumber` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::DomainRegistry` (r:1 w:0) + /// Proof: `Domains::DomainRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::RuntimeRegistry` (r:1 w:0) + /// Proof: `Domains::RuntimeRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::LatestConfirmedDomainExecutionReceipt` (r:1 w:0) + /// Proof: `Domains::LatestConfirmedDomainExecutionReceipt` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn fraud_proof_pre_check() -> Weight { + // Proof Size summary in bytes: + // Measured: `2483056` + // Estimated: `2488996` + // Minimum execution time: 1_467_089_000 picoseconds. + Weight::from_parts(1_687_864_000, 0) + .saturating_add(Weight::from_parts(0, 2488996)) + .saturating_add(T::DbWeight::get().reads(6)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_messenger.rs b/crates/subspace-runtime/src/weights/pallet_messenger.rs new file mode 100644 index 00000000000..0047dfafb8d --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_messenger.rs @@ -0,0 +1,153 @@ + +//! Autogenerated weights for `pallet_messenger` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_messenger.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:0 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn initiate_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `62` + // Estimated: `3599` + // Minimum execution time: 80_989_000 picoseconds. + Weight::from_parts(81_628_000, 0) + .saturating_add(Weight::from_parts(0, 3599)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 32_230_000 picoseconds. + Weight::from_parts(32_549_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_open_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 11_990_000 picoseconds. + Weight::from_parts(12_289_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 12_110_000 picoseconds. + Weight::from_parts(12_400_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Messenger::Inbox` (r:1 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::SkipBalanceChecks` (r:1 w:0) + /// Proof: `Domains::SkipBalanceChecks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::UnconfirmedTransfers` (r:1 w:1) + /// Proof: `Transporter::UnconfirmedTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFee` (r:0 w:1) + /// Proof: `Messenger::InboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponses` (r:0 w:1) + /// Proof: `Messenger::InboxResponses` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponseMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::InboxResponseMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `232` + // Estimated: `3697` + // Minimum execution time: 35_209_000 picoseconds. + Weight::from_parts(35_619_000, 0) + .saturating_add(Weight::from_parts(0, 3697)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Messenger::OutboxResponses` (r:1 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:1 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:1 w:0) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `464` + // Estimated: `3929` + // Minimum execution time: 32_439_000 picoseconds. + Weight::from_parts(32_839_000, 0) + .saturating_add(Weight::from_parts(0, 3929)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs b/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs new file mode 100644 index 00000000000..b45ac5e5a54 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs @@ -0,0 +1,83 @@ + +//! Autogenerated weights for `pallet_messenger_from_domains_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger_from_domains_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_messenger_from_domains_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger_from_domains_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger_from_domains_extension::WeightInfo for WeightInfo { + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_channel_open() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 42_939_000 picoseconds. + Weight::from_parts(43_739_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn from_domains_relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `262` + // Estimated: `3727` + // Minimum execution time: 42_219_000 picoseconds. + Weight::from_parts(42_739_000, 0) + .saturating_add(Weight::from_parts(0, 3727)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxResponses` (r:0 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `250` + // Estimated: `3715` + // Minimum execution time: 39_109_000 picoseconds. + Weight::from_parts(39_499_000, 0) + .saturating_add(Weight::from_parts(0, 3715)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_multisig.rs b/crates/subspace-runtime/src/weights/pallet_multisig.rs new file mode 100644 index 00000000000..e3195dfae37 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_multisig.rs @@ -0,0 +1,151 @@ + +//! Autogenerated weights for `pallet_multisig` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_multisig +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_multisig.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_multisig`. +pub struct WeightInfo(PhantomData); +impl pallet_multisig::WeightInfo for WeightInfo { + /// The range of component `z` is `[0, 10000]`. + fn as_multi_threshold_1(z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 14_070_000 picoseconds. + Weight::from_parts(14_331_403, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(390, 0).saturating_mul(z.into())) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:1 w:0) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_create(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `186 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 46_649_000 picoseconds. + Weight::from_parts(38_178_367, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 506 + .saturating_add(Weight::from_parts(87_994, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_672, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[3, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_approve(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `185` + // Estimated: `6811` + // Minimum execution time: 27_230_000 picoseconds. + Weight::from_parts(19_320_299, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 353 + .saturating_add(Weight::from_parts(82_590, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_672, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + /// The range of component `z` is `[0, 10000]`. + fn as_multi_complete(s: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `288 + s * (33 ±0)` + // Estimated: `6811` + // Minimum execution time: 49_399_000 picoseconds. + Weight::from_parts(40_360_502, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 637 + .saturating_add(Weight::from_parts(96_206, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_664, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:1 w:0) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_create(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `187 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 34_809_000 picoseconds. + Weight::from_parts(36_771_264, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 836 + .saturating_add(Weight::from_parts(91_720, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn approve_as_multi_approve(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `185` + // Estimated: `6811` + // Minimum execution time: 17_339_000 picoseconds. + Weight::from_parts(17_942_749, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 422 + .saturating_add(Weight::from_parts(83_675, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// The range of component `s` is `[2, 100]`. + fn cancel_as_multi(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `357 + s * (1 ±0)` + // Estimated: `6811` + // Minimum execution time: 34_039_000 picoseconds. + Weight::from_parts(35_642_021, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 442 + .saturating_add(Weight::from_parts(77_522, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_preimage.rs b/crates/subspace-runtime/src/weights/pallet_preimage.rs new file mode 100644 index 00000000000..bf4e04e45ab --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_preimage.rs @@ -0,0 +1,250 @@ + +//! Autogenerated weights for `pallet_preimage` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_preimage +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_preimage.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_preimage`. +pub struct WeightInfo(PhantomData); +impl pallet_preimage::WeightInfo for WeightInfo { + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3599` + // Minimum execution time: 58_639_000 picoseconds. + Weight::from_parts(59_079_000, 0) + .saturating_add(Weight::from_parts(0, 3599)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_343, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_requested_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `44` + // Estimated: `3556` + // Minimum execution time: 17_309_000 picoseconds. + Weight::from_parts(17_730_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_352, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 4194304]`. + fn note_no_deposit_preimage(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `44` + // Estimated: `3556` + // Minimum execution time: 16_419_000 picoseconds. + Weight::from_parts(16_750_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_348, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unnote_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `3599` + // Minimum execution time: 78_998_000 picoseconds. + Weight::from_parts(80_499_000, 0) + .saturating_add(Weight::from_parts(0, 3599)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unnote_no_deposit_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `85` + // Estimated: `3556` + // Minimum execution time: 39_779_000 picoseconds. + Weight::from_parts(41_639_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `129` + // Estimated: `3556` + // Minimum execution time: 33_230_000 picoseconds. + Weight::from_parts(36_960_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_no_deposit_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `85` + // Estimated: `3556` + // Minimum execution time: 24_380_000 picoseconds. + Weight::from_parts(26_159_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_unnoted_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3556` + // Minimum execution time: 12_530_000 picoseconds. + Weight::from_parts(13_020_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn request_requested_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `44` + // Estimated: `3556` + // Minimum execution time: 10_180_000 picoseconds. + Weight::from_parts(10_409_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) + fn unrequest_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `85` + // Estimated: `3556` + // Minimum execution time: 35_359_000 picoseconds. + Weight::from_parts(36_779_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn unrequest_unnoted_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `44` + // Estimated: `3556` + // Minimum execution time: 10_060_000 picoseconds. + Weight::from_parts(10_359_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn unrequest_multi_referenced_preimage() -> Weight { + // Proof Size summary in bytes: + // Measured: `44` + // Estimated: `3556` + // Minimum execution time: 10_280_000 picoseconds. + Weight::from_parts(10_760_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + n * (227 ±0)` + // Estimated: `990 + n * (2609 ±0)` + // Minimum execution time: 65_408_000 picoseconds. + Weight::from_parts(65_928_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 39_631 + .saturating_add(Weight::from_parts(65_667_989, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2609).saturating_mul(n.into())) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_rewards.rs b/crates/subspace-runtime/src/weights/pallet_rewards.rs new file mode 100644 index 00000000000..cfde6a539b9 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_rewards.rs @@ -0,0 +1,54 @@ + +//! Autogenerated weights for `pallet_rewards` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_rewards +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_rewards.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_rewards`. +pub struct WeightInfo(PhantomData); +impl pallet_rewards::WeightInfo for WeightInfo { + /// Storage: `Rewards::ProposerSubsidyPoints` (r:0 w:1) + /// Proof: `Rewards::ProposerSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`) + /// Storage: `Rewards::VoterSubsidyPoints` (r:0 w:1) + /// Proof: `Rewards::VoterSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`) + /// The range of component `p` is `[0, 20]`. + /// The range of component `v` is `[0, 20]`. + fn update_issuance_params(p: u32, v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_370_000 picoseconds. + Weight::from_parts(4_662_765, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 568 + .saturating_add(Weight::from_parts(9_388, 0).saturating_mul(p.into())) + // Standard Error: 568 + .saturating_add(Weight::from_parts(667, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_runtime_configs.rs b/crates/subspace-runtime/src/weights/pallet_runtime_configs.rs new file mode 100644 index 00000000000..6f153f54ba3 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_runtime_configs.rs @@ -0,0 +1,68 @@ + +//! Autogenerated weights for `pallet_runtime_configs` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_runtime_configs +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_runtime_configs.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_runtime_configs`. +pub struct WeightInfo(PhantomData); +impl pallet_runtime_configs::WeightInfo for WeightInfo { + /// Storage: `RuntimeConfigs::EnableDomains` (r:0 w:1) + /// Proof: `RuntimeConfigs::EnableDomains` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn set_enable_domains() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_100_000 picoseconds. + Weight::from_parts(3_190_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:0 w:1) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn set_enable_dynamic_cost_of_storage() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_030_000 picoseconds. + Weight::from_parts(3_120_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `RuntimeConfigs::EnableBalanceTransfers` (r:0 w:1) + /// Proof: `RuntimeConfigs::EnableBalanceTransfers` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn set_enable_balance_transfers() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_070_000 picoseconds. + Weight::from_parts(3_150_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_scheduler.rs b/crates/subspace-runtime/src/weights/pallet_scheduler.rs new file mode 100644 index 00000000000..0587f989be7 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_scheduler.rs @@ -0,0 +1,272 @@ + +//! Autogenerated weights for `pallet_scheduler` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_scheduler +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_scheduler.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_scheduler`. +pub struct WeightInfo(PhantomData); +impl pallet_scheduler::WeightInfo for WeightInfo { + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn service_agendas_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1489` + // Minimum execution time: 2_490_000 picoseconds. + Weight::from_parts(2_680_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2 + s * (177 ±0)` + // Estimated: `13928` + // Minimum execution time: 4_070_000 picoseconds. + Weight::from_parts(7_856_164, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 1_830 + .saturating_add(Weight::from_parts(437_889, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_890_000 picoseconds. + Weight::from_parts(4_010_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `121 + s * (1 ±0)` + // Estimated: `3586 + s * (1 ±0)` + // Minimum execution time: 21_270_000 picoseconds. + Weight::from_parts(21_410_000, 0) + .saturating_add(Weight::from_parts(0, 3586)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(979, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) + } + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + fn service_task_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_690_000 picoseconds. + Weight::from_parts(5_890_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_task_periodic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_880_000 picoseconds. + Weight::from_parts(4_019_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn execute_dispatch_signed() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_830_000 picoseconds. + Weight::from_parts(2_910_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn execute_dispatch_unsigned() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_840_000 picoseconds. + Weight::from_parts(2_940_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. + fn schedule(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2 + s * (177 ±0)` + // Estimated: `13928` + // Minimum execution time: 11_780_000 picoseconds. + Weight::from_parts(15_843_991, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 1_862 + .saturating_add(Weight::from_parts(447_815, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn cancel(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2 + s * (177 ±0)` + // Estimated: `13928` + // Minimum execution time: 19_010_000 picoseconds. + Weight::from_parts(18_396_572, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 1_123 + .saturating_add(Weight::from_parts(729_268, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. + fn schedule_named(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `180 + s * (185 ±0)` + // Estimated: `13928` + // Minimum execution time: 15_839_000 picoseconds. + Weight::from_parts(21_481_610, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 3_479 + .saturating_add(Weight::from_parts(488_595, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn cancel_named(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `206 + s * (185 ±0)` + // Estimated: `13928` + // Minimum execution time: 21_730_000 picoseconds. + Weight::from_parts(22_330_105, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 1_897 + .saturating_add(Weight::from_parts(772_776, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + /// The range of component `s` is `[1, 50]`. + fn schedule_retry(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `31` + // Estimated: `13928` + // Minimum execution time: 11_890_000 picoseconds. + Weight::from_parts(12_379_978, 0) + .saturating_add(Weight::from_parts(0, 13928)) + // Standard Error: 344 + .saturating_add(Weight::from_parts(17_971, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `8852` + // Estimated: `13928` + // Minimum execution time: 30_459_000 picoseconds. + Weight::from_parts(30_699_000, 0) + .saturating_add(Weight::from_parts(0, 13928)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `9531` + // Estimated: `13928` + // Minimum execution time: 38_489_000 picoseconds. + Weight::from_parts(38_839_000, 0) + .saturating_add(Weight::from_parts(0, 13928)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `8853` + // Estimated: `13928` + // Minimum execution time: 29_779_000 picoseconds. + Weight::from_parts(30_209_000, 0) + .saturating_add(Weight::from_parts(0, 13928)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `9531` + // Estimated: `13928` + // Minimum execution time: 37_279_000 picoseconds. + Weight::from_parts(37_940_000, 0) + .saturating_add(Weight::from_parts(0, 13928)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_subspace.rs b/crates/subspace-runtime/src/weights/pallet_subspace.rs new file mode 100644 index 00000000000..3c63234890d --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_subspace.rs @@ -0,0 +1,118 @@ + +//! Autogenerated weights for `pallet_subspace` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_subspace +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_subspace.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_subspace`. +pub struct WeightInfo(PhantomData); +impl pallet_subspace::WeightInfo for WeightInfo { + /// Storage: `Subspace::DidProcessSegmentHeaders` (r:1 w:1) + /// Proof: `Subspace::DidProcessSegmentHeaders` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::SegmentCommitment` (r:20 w:20) + /// Proof: `Subspace::SegmentCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CounterForSegmentCommitment` (r:1 w:1) + /// Proof: `Subspace::CounterForSegmentCommitment` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 20]`. + fn store_segment_headers(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1489 + x * (2475 ±0)` + // Minimum execution time: 13_700_000 picoseconds. + Weight::from_parts(7_137_918, 0) + .saturating_add(Weight::from_parts(0, 1489)) + // Standard Error: 5_074 + .saturating_add(Weight::from_parts(7_051_253, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 2475).saturating_mul(x.into())) + } + /// Storage: `Subspace::ShouldAdjustSolutionRange` (r:1 w:1) + /// Proof: `Subspace::ShouldAdjustSolutionRange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::SolutionRanges` (r:1 w:1) + /// Proof: `Subspace::SolutionRanges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::NextSolutionRangeOverride` (r:0 w:1) + /// Proof: `Subspace::NextSolutionRangeOverride` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn enable_solution_range_adjustment() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 8_770_000 picoseconds. + Weight::from_parts(9_020_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + fn vote() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_750_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Subspace::EnableRewards` (r:0 w:1) + /// Proof: `Subspace::EnableRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn enable_rewards_at() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_610_000 picoseconds. + Weight::from_parts(3_740_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Subspace::RootPlotPublicKey` (r:1 w:0) + /// Proof: `Subspace::RootPlotPublicKey` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::AllowAuthoringByAnyone` (r:0 w:1) + /// Proof: `Subspace::AllowAuthoringByAnyone` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn enable_authoring_by_anyone() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 5_639_000 picoseconds. + Weight::from_parts(5_770_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Subspace::PotSlotIterations` (r:1 w:1) + /// Proof: `Subspace::PotSlotIterations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_pot_slot_iterations() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 5_250_000 picoseconds. + Weight::from_parts(5_460_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs b/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs new file mode 100644 index 00000000000..d5431323ead --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs @@ -0,0 +1,93 @@ + +//! Autogenerated weights for `pallet_subspace_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_subspace_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_subspace_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_subspace_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_subspace_extension::WeightInfo for WeightInfo { + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `Subspace::SolutionRanges` (r:1 w:0) + /// Proof: `Subspace::SolutionRanges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::BlockSlots` (r:1 w:0) + /// Proof: `Subspace::BlockSlots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::ParentVoteVerificationData` (r:1 w:0) + /// Proof: `Subspace::ParentVoteVerificationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::SegmentCommitment` (r:2 w:0) + /// Proof: `Subspace::SegmentCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CounterForSegmentCommitment` (r:1 w:0) + /// Proof: `Subspace::CounterForSegmentCommitment` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Subspace::ParentBlockAuthorInfo` (r:1 w:0) + /// Proof: `Subspace::ParentBlockAuthorInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CurrentBlockAuthorInfo` (r:1 w:0) + /// Proof: `Subspace::CurrentBlockAuthorInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::ParentBlockVoters` (r:1 w:0) + /// Proof: `Subspace::ParentBlockVoters` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CurrentBlockVoters` (r:1 w:1) + /// Proof: `Subspace::CurrentBlockVoters` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn vote() -> Weight { + // Proof Size summary in bytes: + // Measured: `104` + // Estimated: `6044` + // Minimum execution time: 2_199_383_000 picoseconds. + Weight::from_parts(2_203_553_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `Subspace::SolutionRanges` (r:1 w:0) + /// Proof: `Subspace::SolutionRanges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::BlockSlots` (r:1 w:0) + /// Proof: `Subspace::BlockSlots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::ParentVoteVerificationData` (r:1 w:0) + /// Proof: `Subspace::ParentVoteVerificationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::SegmentCommitment` (r:2 w:0) + /// Proof: `Subspace::SegmentCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CounterForSegmentCommitment` (r:1 w:0) + /// Proof: `Subspace::CounterForSegmentCommitment` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Subspace::ParentBlockAuthorInfo` (r:1 w:0) + /// Proof: `Subspace::ParentBlockAuthorInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CurrentBlockAuthorInfo` (r:1 w:1) + /// Proof: `Subspace::CurrentBlockAuthorInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Subspace::CurrentBlockVoters` (r:1 w:1) + /// Proof: `Subspace::CurrentBlockVoters` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn vote_with_equivocation() -> Weight { + // Proof Size summary in bytes: + // Measured: `203` + // Estimated: `6143` + // Minimum execution time: 2_204_713_000 picoseconds. + Weight::from_parts(2_210_913_000, 0) + .saturating_add(Weight::from_parts(0, 6143)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_sudo.rs b/crates/subspace-runtime/src/weights/pallet_sudo.rs new file mode 100644 index 00000000000..60dec420f67 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_sudo.rs @@ -0,0 +1,92 @@ + +//! Autogenerated weights for `pallet_sudo` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_sudo +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_sudo.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_sudo`. +pub struct WeightInfo(PhantomData); +impl pallet_sudo::WeightInfo for WeightInfo { + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn set_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `37` + // Estimated: `1517` + // Minimum execution time: 9_930_000 picoseconds. + Weight::from_parts(10_560_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn sudo() -> Weight { + // Proof Size summary in bytes: + // Measured: `37` + // Estimated: `1517` + // Minimum execution time: 11_470_000 picoseconds. + Weight::from_parts(11_790_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn sudo_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `37` + // Estimated: `1517` + // Minimum execution time: 11_540_000 picoseconds. + Weight::from_parts(11_689_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn remove_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `37` + // Estimated: `1517` + // Minimum execution time: 9_070_000 picoseconds. + Weight::from_parts(9_310_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn check_only_sudo_account() -> Weight { + // Proof Size summary in bytes: + // Measured: `37` + // Estimated: `1517` + // Minimum execution time: 3_210_000 picoseconds. + Weight::from_parts(3_310_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_timestamp.rs b/crates/subspace-runtime/src/weights/pallet_timestamp.rs new file mode 100644 index 00000000000..1a8673ee8e3 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_timestamp.rs @@ -0,0 +1,55 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_timestamp.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_timestamp`. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1493` + // Minimum execution time: 5_380_000 picoseconds. + Weight::from_parts(5_650_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `36` + // Estimated: `0` + // Minimum execution time: 4_130_000 picoseconds. + Weight::from_parts(4_270_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_transaction_payment.rs b/crates/subspace-runtime/src/weights/pallet_transaction_payment.rs new file mode 100644 index 00000000000..b02813b4b48 --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_transaction_payment.rs @@ -0,0 +1,51 @@ + +//! Autogenerated weights for `pallet_transaction_payment` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transaction_payment +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_transaction_payment.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transaction_payment`. +pub struct WeightInfo(PhantomData); +impl pallet_transaction_payment::WeightInfo for WeightInfo { + /// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:1 w:0) + /// Proof: `RuntimeConfigs::EnableDynamicCostOfStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TransactionFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `TransactionFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn charge_transaction_payment() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 47_759_000 picoseconds. + Weight::from_parts(49_109_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_transporter.rs b/crates/subspace-runtime/src/weights/pallet_transporter.rs new file mode 100644 index 00000000000..f4305af40fc --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_transporter.rs @@ -0,0 +1,105 @@ + +//! Autogenerated weights for `pallet_transporter` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transporter +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_transporter.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transporter`. +pub struct WeightInfo(PhantomData); +impl pallet_transporter::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Domains::SkipBalanceChecks` (r:1 w:0) + /// Proof: `Domains::SkipBalanceChecks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::UnconfirmedTransfers` (r:1 w:1) + /// Proof: `Transporter::UnconfirmedTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:0 w:1) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::OutgoingTransfers` (r:0 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `302` + // Estimated: `3767` + // Minimum execution time: 97_778_000 picoseconds. + Weight::from_parts(98_368_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(10)) + } + /// Storage: `Domains::SkipBalanceChecks` (r:1 w:0) + /// Proof: `Domains::SkipBalanceChecks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::UnconfirmedTransfers` (r:1 w:1) + /// Proof: `Transporter::UnconfirmedTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn message() -> Weight { + // Proof Size summary in bytes: + // Measured: `26` + // Estimated: `3593` + // Minimum execution time: 14_470_000 picoseconds. + Weight::from_parts(14_729_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Transporter::OutgoingTransfers` (r:1 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Domains::SkipBalanceChecks` (r:1 w:0) + /// Proof: `Domains::SkipBalanceChecks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::CancelledTransfers` (r:1 w:1) + /// Proof: `Transporter::CancelledTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `212` + // Estimated: `3677` + // Minimum execution time: 21_930_000 picoseconds. + Weight::from_parts(22_139_000, 0) + .saturating_add(Weight::from_parts(0, 3677)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/crates/subspace-runtime/src/weights/pallet_utility.rs b/crates/subspace-runtime/src/weights/pallet_utility.rs new file mode 100644 index 00000000000..cecc688873c --- /dev/null +++ b/crates/subspace-runtime/src/weights/pallet_utility.rs @@ -0,0 +1,84 @@ + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// benchmark +// pallet +// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./crates/subspace-runtime/src/weights-tmp/pallet_utility.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_utility`. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_800_000 picoseconds. + Weight::from_parts(21_555_355, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_053 + .saturating_add(Weight::from_parts(4_058_222, 0).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_730_000 picoseconds. + Weight::from_parts(5_850_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_860_000 picoseconds. + Weight::from_parts(19_996_791, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_010 + .saturating_add(Weight::from_parts(4_346_283, 0).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_360_000 picoseconds. + Weight::from_parts(8_510_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_680_000 picoseconds. + Weight::from_parts(22_339_571, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 12_185 + .saturating_add(Weight::from_parts(3_962_535, 0).saturating_mul(c.into())) + } +} diff --git a/domains/runtime/auto-id/src/weights/domain_pallet_executive.rs b/domains/runtime/auto-id/src/weights/domain_pallet_executive.rs new file mode 100644 index 00000000000..fd042d90001 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/domain_pallet_executive.rs @@ -0,0 +1,49 @@ + +//! Autogenerated weights for `domain_pallet_executive` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=domain_pallet_executive +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/domain_pallet_executive.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `domain_pallet_executive`. +pub struct WeightInfo(PhantomData); +impl domain_pallet_executive::WeightInfo for WeightInfo { + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 20_849_475_000 picoseconds. + Weight::from_parts(20_924_524_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/domains/runtime/auto-id/src/weights/frame_system.rs b/domains/runtime/auto-id/src/weights/frame_system.rs new file mode 100644 index 00000000000..91f90ca3540 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/frame_system.rs @@ -0,0 +1,158 @@ + +//! Autogenerated weights for `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/frame_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3407872]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_570_000 picoseconds. + Weight::from_parts(2_649_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(273, 0).saturating_mul(b.into())) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[0, 3407872]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_230_000 picoseconds. + Weight::from_parts(7_280_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_057, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + fn set_heap_pages() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_130_000 picoseconds. + Weight::from_parts(4_300_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 119_352_764_000 picoseconds. + Weight::from_parts(136_939_939_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_590_000 picoseconds. + Weight::from_parts(2_640_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 853 + .saturating_add(Weight::from_parts(799_003, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_520_000 picoseconds. + Weight::from_parts(2_600_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 830 + .saturating_add(Weight::from_parts(606_671, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `17 + p * (69 ±0)` + // Estimated: `0 + p * (70 ±0)` + // Minimum execution time: 4_180_000 picoseconds. + Weight::from_parts(4_260_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 961 + .saturating_add(Weight::from_parts(1_200_476, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_860_000 picoseconds. + Weight::from_parts(12_100_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `21` + // Estimated: `1518` + // Minimum execution time: 124_746_439_000 picoseconds. + Weight::from_parts(139_067_803_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_auto_id.rs b/domains/runtime/auto-id/src/weights/pallet_auto_id.rs new file mode 100644 index 00000000000..4f9b25852fe --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_auto_id.rs @@ -0,0 +1,152 @@ + +//! Autogenerated weights for `pallet_auto_id` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_auto_id +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_auto_id.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_auto_id`. +pub struct WeightInfo(PhantomData); +impl pallet_auto_id::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `AutoId::AutoIds` (r:1 w:1) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_issuer_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `36` + // Estimated: `3501` + // Minimum execution time: 47_909_000 picoseconds. + Weight::from_parts(48_649_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `AutoId::AutoIds` (r:2 w:2) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AutoId::CertificateRevocationList` (r:1 w:0) + /// Proof: `AutoId::CertificateRevocationList` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn register_leaf_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `1284` + // Estimated: `7224` + // Minimum execution time: 58_559_000 picoseconds. + Weight::from_parts(59_139_000, 0) + .saturating_add(Weight::from_parts(0, 7224)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `AutoId::AutoIds` (r:1 w:1) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AutoId::CertificateRevocationList` (r:1 w:1) + /// Proof: `AutoId::CertificateRevocationList` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn revoke_issuer_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `1248` + // Estimated: `4713` + // Minimum execution time: 44_689_000 picoseconds. + Weight::from_parts(45_429_000, 0) + .saturating_add(Weight::from_parts(0, 4713)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `AutoId::AutoIds` (r:2 w:1) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AutoId::CertificateRevocationList` (r:1 w:1) + /// Proof: `AutoId::CertificateRevocationList` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn revoke_leaf_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `2559` + // Estimated: `8499` + // Minimum execution time: 50_319_000 picoseconds. + Weight::from_parts(50_939_000, 0) + .saturating_add(Weight::from_parts(0, 8499)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `AutoId::AutoIds` (r:1 w:1) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn deactivate_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `1248` + // Estimated: `4713` + // Minimum execution time: 37_780_000 picoseconds. + Weight::from_parts(38_039_000, 0) + .saturating_add(Weight::from_parts(0, 4713)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `AutoId::AutoIds` (r:1 w:1) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AutoId::CertificateRevocationList` (r:1 w:1) + /// Proof: `AutoId::CertificateRevocationList` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn renew_issuer_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `1284` + // Estimated: `4749` + // Minimum execution time: 54_599_000 picoseconds. + Weight::from_parts(55_569_000, 0) + .saturating_add(Weight::from_parts(0, 4749)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `AutoId::AutoIds` (r:2 w:2) + /// Proof: `AutoId::AutoIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AutoId::CertificateRevocationList` (r:1 w:1) + /// Proof: `AutoId::CertificateRevocationList` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn renew_leaf_auto_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `2595` + // Estimated: `8535` + // Minimum execution time: 66_279_000 picoseconds. + Weight::from_parts(66_649_000, 0) + .saturating_add(Weight::from_parts(0, 8535)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_balances.rs b/domains/runtime/auto-id/src/weights/pallet_balances.rs new file mode 100644 index 00000000000..ca770c61619 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_balances.rs @@ -0,0 +1,193 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 72_438_000 picoseconds. + Weight::from_parts(72_849_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 55_598_000 picoseconds. + Weight::from_parts(56_229_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 18_349_000 picoseconds. + Weight::from_parts(18_549_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 29_569_000 picoseconds. + Weight::from_parts(29_860_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `6196` + // Minimum execution time: 72_659_000 picoseconds. + Weight::from_parts(73_458_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 69_638_000 picoseconds. + Weight::from_parts(70_238_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 21_900_000 picoseconds. + Weight::from_parts(22_199_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:10) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (136 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 21_390_000 picoseconds. + Weight::from_parts(21_540_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 11_143 + .saturating_add(Weight::from_parts(18_120_308, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_220_000 picoseconds. + Weight::from_parts(8_329_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 44_119_000 picoseconds. + Weight::from_parts(44_509_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_069_000 picoseconds. + Weight::from_parts(27_390_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_messenger.rs b/domains/runtime/auto-id/src/weights/pallet_messenger.rs new file mode 100644 index 00000000000..43c95fdbd37 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_messenger.rs @@ -0,0 +1,170 @@ + +//! Autogenerated weights for `pallet_messenger` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_messenger.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:0 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn initiate_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `62` + // Estimated: `3599` + // Minimum execution time: 82_648_000 picoseconds. + Weight::from_parts(83_968_000, 0) + .saturating_add(Weight::from_parts(0, 3599)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 34_289_000 picoseconds. + Weight::from_parts(34_819_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_open_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 12_910_000 picoseconds. + Weight::from_parts(13_210_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 12_809_000 picoseconds. + Weight::from_parts(13_040_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Messenger::Inbox` (r:1 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFee` (r:0 w:1) + /// Proof: `Messenger::InboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponses` (r:0 w:1) + /// Proof: `Messenger::InboxResponses` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponseMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::InboxResponseMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `236` + // Estimated: `3701` + // Minimum execution time: 35_189_000 picoseconds. + Weight::from_parts(35_859_000, 0) + .saturating_add(Weight::from_parts(0, 3701)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `Messenger::OutboxResponses` (r:1 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:1 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:1 w:0) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `472` + // Estimated: `3937` + // Minimum execution time: 32_659_000 picoseconds. + Weight::from_parts(33_370_000, 0) + .saturating_add(Weight::from_parts(0, 3937)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs b/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs new file mode 100644 index 00000000000..96611b372f8 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs @@ -0,0 +1,96 @@ + +//! Autogenerated weights for `pallet_messenger_between_domains_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger_between_domains_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_messenger_between_domains_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger_between_domains_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger_between_domains_extension::WeightInfo for WeightInfo { + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_channel_open() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 37_189_000 picoseconds. + Weight::from_parts(38_239_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `262` + // Estimated: `3727` + // Minimum execution time: 34_809_000 picoseconds. + Weight::from_parts(35_689_000, 0) + .saturating_add(Weight::from_parts(0, 3727)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxResponses` (r:0 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `250` + // Estimated: `3715` + // Minimum execution time: 32_110_000 picoseconds. + Weight::from_parts(32_400_000, 0) + .saturating_add(Weight::from_parts(0, 3715)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs b/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs new file mode 100644 index 00000000000..fd93df70c64 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs @@ -0,0 +1,96 @@ + +//! Autogenerated weights for `pallet_messenger_from_consensus_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger_from_consensus_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_messenger_from_consensus_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger_from_consensus_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger_from_consensus_extension::WeightInfo for WeightInfo { + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message_channel_open() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 36_519_000 picoseconds. + Weight::from_parts(36_959_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `254` + // Estimated: `3719` + // Minimum execution time: 34_679_000 picoseconds. + Weight::from_parts(34_889_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxResponses` (r:0 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `238` + // Estimated: `3703` + // Minimum execution time: 31_589_000 picoseconds. + Weight::from_parts(32_079_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_timestamp.rs b/domains/runtime/auto-id/src/weights/pallet_timestamp.rs new file mode 100644 index 00000000000..e3d1efb8368 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_timestamp.rs @@ -0,0 +1,56 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_timestamp.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_timestamp`. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1493` + // Minimum execution time: 5_370_000 picoseconds. + Weight::from_parts(5_560_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `36` + // Estimated: `0` + // Minimum execution time: 4_150_000 picoseconds. + Weight::from_parts(4_279_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_transaction_payment.rs b/domains/runtime/auto-id/src/weights/pallet_transaction_payment.rs new file mode 100644 index 00000000000..98da4a3fe61 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_transaction_payment.rs @@ -0,0 +1,54 @@ + +//! Autogenerated weights for `pallet_transaction_payment` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transaction_payment +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_transaction_payment.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transaction_payment`. +pub struct WeightInfo(PhantomData); +impl pallet_transaction_payment::WeightInfo for WeightInfo { + /// Storage: `BlockFees::ConsensusChainByteFee` (r:1 w:0) + /// Proof: `BlockFees::ConsensusChainByteFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn charge_transaction_payment() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 48_139_000 picoseconds. + Weight::from_parts(48_829_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_transporter.rs b/domains/runtime/auto-id/src/weights/pallet_transporter.rs new file mode 100644 index 00000000000..a92ec879961 --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_transporter.rs @@ -0,0 +1,112 @@ + +//! Autogenerated weights for `pallet_transporter` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transporter +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_transporter.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transporter`. +pub struct WeightInfo(PhantomData); +impl pallet_transporter::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:0 w:1) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::OutgoingTransfers` (r:0 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `302` + // Estimated: `3767` + // Minimum execution time: 103_588_000 picoseconds. + Weight::from_parts(104_768_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(11)) + } + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn message() -> Weight { + // Proof Size summary in bytes: + // Measured: `30` + // Estimated: `3593` + // Minimum execution time: 15_110_000 picoseconds. + Weight::from_parts(15_320_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Transporter::OutgoingTransfers` (r:1 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `207` + // Estimated: `3672` + // Minimum execution time: 20_559_000 picoseconds. + Weight::from_parts(20_860_000, 0) + .saturating_add(Weight::from_parts(0, 3672)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/auto-id/src/weights/pallet_utility.rs b/domains/runtime/auto-id/src/weights/pallet_utility.rs new file mode 100644 index 00000000000..7e0342078fb --- /dev/null +++ b/domains/runtime/auto-id/src/weights/pallet_utility.rs @@ -0,0 +1,97 @@ + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/auto-id/src/weights-tmp/pallet_utility.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_utility`. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_580_000 picoseconds. + Weight::from_parts(6_639_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_044 + .saturating_add(Weight::from_parts(4_624_732, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_410_000 picoseconds. + Weight::from_parts(5_520_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_430_000 picoseconds. + Weight::from_parts(6_590_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 987 + .saturating_add(Weight::from_parts(4_925_450, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_800_000 picoseconds. + Weight::from_parts(8_940_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_500_000 picoseconds. + Weight::from_parts(6_620_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_409 + .saturating_add(Weight::from_parts(4_599_263, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/domains/runtime/evm/src/weights/domain_pallet_executive.rs b/domains/runtime/evm/src/weights/domain_pallet_executive.rs new file mode 100644 index 00000000000..4bf732128a3 --- /dev/null +++ b/domains/runtime/evm/src/weights/domain_pallet_executive.rs @@ -0,0 +1,49 @@ + +//! Autogenerated weights for `domain_pallet_executive` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=domain_pallet_executive +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/domain_pallet_executive.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `domain_pallet_executive`. +pub struct WeightInfo(PhantomData); +impl domain_pallet_executive::WeightInfo for WeightInfo { + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 20_711_348_000 picoseconds. + Weight::from_parts(20_790_097_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/domains/runtime/evm/src/weights/frame_system.rs b/domains/runtime/evm/src/weights/frame_system.rs new file mode 100644 index 00000000000..210c2dab0ad --- /dev/null +++ b/domains/runtime/evm/src/weights/frame_system.rs @@ -0,0 +1,158 @@ + +//! Autogenerated weights for `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/frame_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_system`. +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + /// The range of component `b` is `[0, 3407872]`. + fn remark(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_650_000 picoseconds. + Weight::from_parts(2_710_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(398, 0).saturating_mul(b.into())) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[0, 3407872]`. + fn remark_with_event(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_520_000 picoseconds. + Weight::from_parts(7_660_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_134, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + fn set_heap_pages() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_200_000 picoseconds. + Weight::from_parts(4_309_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 123_759_179_000 picoseconds. + Weight::from_parts(129_247_223_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn set_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_610_000 picoseconds. + Weight::from_parts(2_660_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 807 + .saturating_add(Weight::from_parts(776_544, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. + fn kill_storage(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_670_000 picoseconds. + Weight::from_parts(2_690_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 739 + .saturating_add(Weight::from_parts(605_990, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. + fn kill_prefix(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `17 + p * (69 ±0)` + // Estimated: `0 + p * (70 ±0)` + // Minimum execution time: 4_300_000 picoseconds. + Weight::from_parts(4_410_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 989 + .saturating_add(Weight::from_parts(1_209_181, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 11_160_000 picoseconds. + Weight::from_parts(12_090_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `21` + // Estimated: `1518` + // Minimum execution time: 121_392_880_000 picoseconds. + Weight::from_parts(132_490_353_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_balances.rs b/domains/runtime/evm/src/weights/pallet_balances.rs new file mode 100644 index 00000000000..2c5e6f7e3b5 --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_balances.rs @@ -0,0 +1,193 @@ + +//! Autogenerated weights for `pallet_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_balances.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_balances::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3581` + // Minimum execution time: 67_989_000 picoseconds. + Weight::from_parts(68_618_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3581` + // Minimum execution time: 52_339_000 picoseconds. + Weight::from_parts(52_669_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `51` + // Estimated: `3581` + // Minimum execution time: 17_700_000 picoseconds. + Weight::from_parts(18_040_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `51` + // Estimated: `3581` + // Minimum execution time: 28_090_000 picoseconds. + Weight::from_parts(28_479_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `51` + // Estimated: `6172` + // Minimum execution time: 69_129_000 picoseconds. + Weight::from_parts(69_689_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3581` + // Minimum execution time: 64_399_000 picoseconds. + Weight::from_parts(65_439_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_unreserve() -> Weight { + // Proof Size summary in bytes: + // Measured: `51` + // Estimated: `3581` + // Minimum execution time: 21_280_000 picoseconds. + Weight::from_parts(21_589_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:10) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (124 ±0)` + // Estimated: `990 + u * (2591 ±0)` + // Minimum execution time: 20_910_000 picoseconds. + Weight::from_parts(21_160_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 12_262 + .saturating_add(Weight::from_parts(17_742_999, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_210_000 picoseconds. + Weight::from_parts(8_310_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 42_609_000 picoseconds. + Weight::from_parts(43_179_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 26_800_000 picoseconds. + Weight::from_parts(26_990_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_evm.rs b/domains/runtime/evm/src/weights/pallet_evm.rs new file mode 100644 index 00000000000..3e176abbcdf --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_evm.rs @@ -0,0 +1,44 @@ + +//! Autogenerated weights for `pallet_evm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_evm +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_evm.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_evm`. +pub struct WeightInfo(PhantomData); +impl pallet_evm::WeightInfo for WeightInfo { + fn withdraw() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_510_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_messenger.rs b/domains/runtime/evm/src/weights/pallet_messenger.rs new file mode 100644 index 00000000000..46f60224a98 --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_messenger.rs @@ -0,0 +1,170 @@ + +//! Autogenerated weights for `pallet_messenger` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_messenger.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:0 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn initiate_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `61` + // Estimated: `3587` + // Minimum execution time: 82_558_000 picoseconds. + Weight::from_parts(83_359_000, 0) + .saturating_add(Weight::from_parts(0, 3587)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 34_349_000 picoseconds. + Weight::from_parts(34_749_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_open_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 12_670_000 picoseconds. + Weight::from_parts(12_920_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn do_close_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `3692` + // Minimum execution time: 12_520_000 picoseconds. + Weight::from_parts(12_850_000, 0) + .saturating_add(Weight::from_parts(0, 3692)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Messenger::Inbox` (r:1 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::InboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxFee` (r:0 w:1) + /// Proof: `Messenger::InboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponses` (r:0 w:1) + /// Proof: `Messenger::InboxResponses` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::InboxResponseMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::InboxResponseMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `236` + // Estimated: `3701` + // Minimum execution time: 35_409_000 picoseconds. + Weight::from_parts(35_669_000, 0) + .saturating_add(Weight::from_parts(0, 3701)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `Messenger::OutboxResponses` (r:1 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:1 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:1 w:0) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::UpdatedChannels` (r:1 w:1) + /// Proof: `Messenger::UpdatedChannels` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `472` + // Estimated: `3937` + // Minimum execution time: 32_429_000 picoseconds. + Weight::from_parts(33_190_000, 0) + .saturating_add(Weight::from_parts(0, 3937)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(6)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs b/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs new file mode 100644 index 00000000000..2c7b1abaa54 --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs @@ -0,0 +1,96 @@ + +//! Autogenerated weights for `pallet_messenger_between_domains_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger_between_domains_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_messenger_between_domains_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger_between_domains_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger_between_domains_extension::WeightInfo for WeightInfo { + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_channel_open() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 36_799_000 picoseconds. + Weight::from_parts(37_350_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `262` + // Estimated: `3727` + // Minimum execution time: 34_669_000 picoseconds. + Weight::from_parts(35_000_000, 0) + .saturating_add(Weight::from_parts(0, 3727)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxResponses` (r:0 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_domains_relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `250` + // Estimated: `3715` + // Minimum execution time: 31_509_000 picoseconds. + Weight::from_parts(32_209_000, 0) + .saturating_add(Weight::from_parts(0, 3715)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs b/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs new file mode 100644 index 00000000000..05dc02a945f --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs @@ -0,0 +1,96 @@ + +//! Autogenerated weights for `pallet_messenger_from_consensus_extension` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_messenger_from_consensus_extension +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_messenger_from_consensus_extension.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_messenger_from_consensus_extension`. +pub struct WeightInfo(PhantomData); +impl pallet_messenger_from_consensus_extension::WeightInfo for WeightInfo { + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:1) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message_channel_open() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 36_649_000 picoseconds. + Weight::from_parts(37_069_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Inbox` (r:0 w:1) + /// Proof: `Messenger::Inbox` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `254` + // Estimated: `3719` + // Minimum execution time: 34_759_000 picoseconds. + Weight::from_parts(35_039_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxResponses` (r:0 w:1) + /// Proof: `Messenger::OutboxResponses` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn from_consensus_relay_message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `238` + // Estimated: `3703` + // Minimum execution time: 31_079_000 picoseconds. + Weight::from_parts(31_660_000, 0) + .saturating_add(Weight::from_parts(0, 3703)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_timestamp.rs b/domains/runtime/evm/src/weights/pallet_timestamp.rs new file mode 100644 index 00000000000..cb1d58e8120 --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_timestamp.rs @@ -0,0 +1,56 @@ + +//! Autogenerated weights for `pallet_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_timestamp.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_timestamp`. +pub struct WeightInfo(PhantomData); +impl pallet_timestamp::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1493` + // Minimum execution time: 5_320_000 picoseconds. + Weight::from_parts(5_510_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `36` + // Estimated: `0` + // Minimum execution time: 4_040_000 picoseconds. + Weight::from_parts(4_170_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_transaction_payment.rs b/domains/runtime/evm/src/weights/pallet_transaction_payment.rs new file mode 100644 index 00000000000..1fa01191e6e --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_transaction_payment.rs @@ -0,0 +1,54 @@ + +//! Autogenerated weights for `pallet_transaction_payment` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transaction_payment +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_transaction_payment.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transaction_payment`. +pub struct WeightInfo(PhantomData); +impl pallet_transaction_payment::WeightInfo for WeightInfo { + /// Storage: `BlockFees::ConsensusChainByteFee` (r:1 w:0) + /// Proof: `BlockFees::ConsensusChainByteFee` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `BlockFees::CollectedBlockFees` (r:1 w:1) + /// Proof: `BlockFees::CollectedBlockFees` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn charge_transaction_payment() -> Weight { + // Proof Size summary in bytes: + // Measured: `51` + // Estimated: `3581` + // Minimum execution time: 47_679_000 picoseconds. + Weight::from_parts(48_089_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_transporter.rs b/domains/runtime/evm/src/weights/pallet_transporter.rs new file mode 100644 index 00000000000..073a0d2bd2d --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_transporter.rs @@ -0,0 +1,112 @@ + +//! Autogenerated weights for `pallet_transporter` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_transporter +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_transporter.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_transporter`. +pub struct WeightInfo(PhantomData); +impl pallet_transporter::WeightInfo for WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::ChainAllowlist` (r:1 w:0) + /// Proof: `Messenger::ChainAllowlist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::NextChannelId` (r:1 w:0) + /// Proof: `Messenger::NextChannelId` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageCount` (r:1 w:1) + /// Proof: `Messenger::OutboxMessageCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Channels` (r:1 w:1) + /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHoldStartAt` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHoldStartAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFeesOnHold` (r:1 w:1) + /// Proof: `Messenger::OutboxFeesOnHold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxMessageWeightTags` (r:0 w:1) + /// Proof: `Messenger::OutboxMessageWeightTags` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::OutboxFee` (r:0 w:1) + /// Proof: `Messenger::OutboxFee` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Messenger::Outbox` (r:0 w:1) + /// Proof: `Messenger::Outbox` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::OutgoingTransfers` (r:0 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `301` + // Estimated: `3766` + // Minimum execution time: 101_787_000 picoseconds. + Weight::from_parts(102_648_000, 0) + .saturating_add(Weight::from_parts(0, 3766)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(11)) + } + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn message() -> Weight { + // Proof Size summary in bytes: + // Measured: `30` + // Estimated: `3581` + // Minimum execution time: 14_019_000 picoseconds. + Weight::from_parts(14_219_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Transporter::OutgoingTransfers` (r:1 w:1) + /// Proof: `Transporter::OutgoingTransfers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) + /// Proof: `SelfDomainId::SelfDomainId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Transporter::ChainTransfers` (r:1 w:1) + /// Proof: `Transporter::ChainTransfers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn message_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `183` + // Estimated: `3648` + // Minimum execution time: 19_529_000 picoseconds. + Weight::from_parts(19_779_000, 0) + .saturating_add(Weight::from_parts(0, 3648)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/domains/runtime/evm/src/weights/pallet_utility.rs b/domains/runtime/evm/src/weights/pallet_utility.rs new file mode 100644 index 00000000000..96382bc667e --- /dev/null +++ b/domains/runtime/evm/src/weights/pallet_utility.rs @@ -0,0 +1,97 @@ + +//! Autogenerated weights for `pallet_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.2.0 +//! DATE: 2025-06-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `protocol-team-testing`, CPU: `AMD Ryzen 5 3600 6-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/subspace-node +// domain +// benchmark +// pallet +// --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm +// --genesis-builder=none +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./domains/runtime/evm/src/weights-tmp/pallet_utility.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_utility`. +pub struct WeightInfo(PhantomData); +impl pallet_utility::WeightInfo for WeightInfo { + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_610_000 picoseconds. + Weight::from_parts(5_422_437, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_594 + .saturating_add(Weight::from_parts(4_587_182, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_440_000 picoseconds. + Weight::from_parts(5_580_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn batch_all(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_420_000 picoseconds. + Weight::from_parts(6_510_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_447 + .saturating_add(Weight::from_parts(4_869_262, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:1) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_930_000 picoseconds. + Weight::from_parts(9_069_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::EventSegments` (r:0 w:11) + /// Proof: `System::EventSegments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `c` is `[0, 1000]`. + fn force_batch(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_590_000 picoseconds. + Weight::from_parts(6_650_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_264 + .saturating_add(Weight::from_parts(4_543_405, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime-benchmark.sh b/runtime-benchmark.sh new file mode 100755 index 00000000000..043f923856b --- /dev/null +++ b/runtime-benchmark.sh @@ -0,0 +1,81 @@ +#!/bin/bash -e + +cargo build -r --bin subspace-node --features runtime-benchmarks + +cargo build -r -p subspace-runtime --features runtime-benchmarks +subspace_runtime_pallets=( + "frame_system" + "pallet_balances" + "pallet_domains" + "pallet_rewards" + "pallet_runtime_configs" + "pallet_subspace" + "pallet_timestamp" + "pallet_messenger" + "pallet_transporter" + "pallet_subspace_extension" + "pallet_messenger_from_domains_extension" + "pallet_transaction_payment" + "pallet_utility" + "pallet_sudo" + "pallet_collective" + "pallet_preimage" + "pallet_scheduler" + "pallet_multisig" + # TODO: `pallet_democracy` benchmark are broken, need investigation + # "pallet_democracy" +) +for pallet in "${subspace_runtime_pallets[@]}"; do + cmd="./target/release/subspace-node benchmark pallet \ + --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm \ + --genesis-builder=none --steps=50 --repeat=20 --pallet=$pallet --extrinsic=* --wasm-execution=compiled \ + --heap-pages=4096 --output=./crates/subspace-runtime/src/weights/$pallet.rs" + echo $cmd + $cmd +done + +cargo build -r -p evm-domain-runtime --features runtime-benchmarks +evm_domain_runtime_pallets=( + "frame_system" + "domain_pallet_executive" + "pallet_messenger" + "pallet_messenger_from_consensus_extension" + "pallet_messenger_between_domains_extension" + "pallet_timestamp" + "pallet_utility" + "pallet_balances" + "pallet_transporter" + "pallet_evm" + "pallet_transaction_payment" +) +for pallet in "${evm_domain_runtime_pallets[@]}"; do + cmd="./target/release/subspace-node domain benchmark pallet \ + --runtime=./target/release/wbuild/evm-domain-runtime/evm_domain_runtime.compact.compressed.wasm \ + --genesis-builder=none --steps=50 --repeat=20 --pallet=$pallet --extrinsic=* --wasm-execution=compiled \ + --heap-pages=4096 --output=./domains/runtime/evm/src/weights/$pallet.rs" + echo $cmd + $cmd +done + +cargo build -r -p auto-id-domain-runtime --features runtime-benchmarks +auto_id_domain_runtime_pallets=( + "frame_system" + "domain_pallet_executive" + "pallet_messenger" + "pallet_messenger_from_consensus_extension" + "pallet_messenger_between_domains_extension" + "pallet_auto_id" + "pallet_timestamp" + "pallet_utility" + "pallet_balances" + "pallet_transporter" + "pallet_transaction_payment" +) +for pallet in "${auto_id_domain_runtime_pallets[@]}"; do + cmd="./target/release/subspace-node domain benchmark pallet \ + --runtime=./target/release/wbuild/auto-id-domain-runtime/auto_id_domain_runtime.compact.compressed.wasm \ + --genesis-builder=none --steps=50 --repeat=20 --pallet=$pallet --extrinsic=* --wasm-execution=compiled \ + --heap-pages=4096 --output=./domains/runtime/auto-id/src/weights/$pallet.rs" + echo $cmd + $cmd +done From df64e4a431b884d24f974d0bfe970bfefda6f4aa Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:25:30 +0800 Subject: [PATCH 09/11] Recorrect the WeightInfo trait for the extension weight files Signed-off-by: linning --- .../src/weights/pallet_messenger_from_domains_extension.rs | 2 +- .../subspace-runtime/src/weights/pallet_subspace_extension.rs | 2 +- .../src/weights/pallet_messenger_between_domains_extension.rs | 2 +- .../src/weights/pallet_messenger_from_consensus_extension.rs | 2 +- .../src/weights/pallet_messenger_between_domains_extension.rs | 2 +- .../src/weights/pallet_messenger_from_consensus_extension.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs b/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs index b45ac5e5a54..edfc9a28e3a 100644 --- a/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs +++ b/crates/subspace-runtime/src/weights/pallet_messenger_from_domains_extension.rs @@ -31,7 +31,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_messenger_from_domains_extension`. pub struct WeightInfo(PhantomData); -impl pallet_messenger_from_domains_extension::WeightInfo for WeightInfo { +impl pallet_messenger::extensions::FromDomainWeightInfo for WeightInfo { /// Storage: `Messenger::Channels` (r:1 w:1) /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Messenger::NextChannelId` (r:1 w:1) diff --git a/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs b/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs index d5431323ead..f97ffcdf4d0 100644 --- a/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs +++ b/crates/subspace-runtime/src/weights/pallet_subspace_extension.rs @@ -31,7 +31,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_subspace_extension`. pub struct WeightInfo(PhantomData); -impl pallet_subspace_extension::WeightInfo for WeightInfo { +impl pallet_subspace::extensions::WeightInfo for WeightInfo { /// Storage: `System::BlockHash` (r:1 w:0) /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) /// Storage: `Subspace::SolutionRanges` (r:1 w:0) diff --git a/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs b/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs index 96611b372f8..b7233b44d27 100644 --- a/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs +++ b/domains/runtime/auto-id/src/weights/pallet_messenger_between_domains_extension.rs @@ -32,7 +32,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_messenger_between_domains_extension`. pub struct WeightInfo(PhantomData); -impl pallet_messenger_between_domains_extension::WeightInfo for WeightInfo { +impl pallet_messenger::extensions::FromDomainWeightInfo for WeightInfo { /// Storage: `Messenger::Channels` (r:1 w:1) /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) diff --git a/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs b/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs index fd93df70c64..e2e3a61c65d 100644 --- a/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs +++ b/domains/runtime/auto-id/src/weights/pallet_messenger_from_consensus_extension.rs @@ -32,7 +32,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_messenger_from_consensus_extension`. pub struct WeightInfo(PhantomData); -impl pallet_messenger_from_consensus_extension::WeightInfo for WeightInfo { +impl pallet_messenger::extensions::FromConsensusWeightInfo for WeightInfo { /// Storage: `Messenger::Channels` (r:1 w:1) /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) diff --git a/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs b/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs index 2c7b1abaa54..49e118c51cb 100644 --- a/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs +++ b/domains/runtime/evm/src/weights/pallet_messenger_between_domains_extension.rs @@ -32,7 +32,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_messenger_between_domains_extension`. pub struct WeightInfo(PhantomData); -impl pallet_messenger_between_domains_extension::WeightInfo for WeightInfo { +impl pallet_messenger::extensions::FromDomainWeightInfo for WeightInfo { /// Storage: `Messenger::Channels` (r:1 w:1) /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) diff --git a/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs b/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs index 05dc02a945f..b077614a941 100644 --- a/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs +++ b/domains/runtime/evm/src/weights/pallet_messenger_from_consensus_extension.rs @@ -32,7 +32,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_messenger_from_consensus_extension`. pub struct WeightInfo(PhantomData); -impl pallet_messenger_from_consensus_extension::WeightInfo for WeightInfo { +impl pallet_messenger::extensions::FromConsensusWeightInfo for WeightInfo { /// Storage: `Messenger::Channels` (r:1 w:1) /// Proof: `Messenger::Channels` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `SelfDomainId::SelfDomainId` (r:1 w:0) From 3c79afec25941a2513c8bc951d4d93bb174c05ff Mon Sep 17 00:00:00 2001 From: linning Date: Fri, 13 Jun 2025 07:26:05 +0800 Subject: [PATCH 10/11] Apply weight to the production runtime Signed-off-by: linning --- crates/subspace-runtime/src/lib.rs | 36 +++++++++++++++--------------- domains/runtime/auto-id/src/lib.rs | 22 +++++++++--------- domains/runtime/evm/src/lib.rs | 22 +++++++++--------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index ac7e75bc277..62cf0603fde 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -247,7 +247,7 @@ impl frame_system::Config for Runtime { /// The data to be stored in an account. type AccountData = pallet_balances::AccountData; /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = frame_system::weights::SubstrateWeight; + type SystemWeightInfo = weights::frame_system::WeightInfo; /// This is used as an identifier of the chain. type SS58Prefix = SS58Prefix; /// The set code logic, just the default since we're not a parachain. @@ -305,9 +305,9 @@ impl pallet_subspace::Config for Runtime { type MaxPiecesInSector = ConstU16<{ MAX_PIECES_IN_SECTOR }>; type ShouldAdjustSolutionRange = ShouldAdjustSolutionRange; type EraChangeTrigger = pallet_subspace::NormalEraChange; - type WeightInfo = pallet_subspace::weights::SubstrateWeight; + type WeightInfo = weights::pallet_subspace::WeightInfo; type BlockSlotCount = BlockSlotCount; - type ExtensionWeightInfo = pallet_subspace::extensions::weights::SubstrateWeight; + type ExtensionWeightInfo = weights::pallet_subspace_extension::WeightInfo; } impl pallet_timestamp::Config for Runtime { @@ -315,7 +315,7 @@ impl pallet_timestamp::Config for Runtime { type Moment = Moment; type OnTimestampSet = (); type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = (); + type WeightInfo = weights::pallet_timestamp::WeightInfo; } parameter_types! { @@ -369,7 +369,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; + type WeightInfo = weights::pallet_balances::WeightInfo; type FreezeIdentifier = (); type MaxFreezes = (); type RuntimeHoldReason = HoldIdentifierWrapper; @@ -406,14 +406,14 @@ impl pallet_transaction_payment::Config for Runtime { type WeightToFee = ConstantMultiplier; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; - type WeightInfo = pallet_transaction_payment::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transaction_payment::WeightInfo; } impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; - type WeightInfo = pallet_utility::weights::SubstrateWeight; + type WeightInfo = weights::pallet_utility::WeightInfo; } impl MaybeMultisigCall for RuntimeCall { @@ -464,7 +464,7 @@ impl MaybeNestedCall for RuntimeCall { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type WeightInfo = pallet_sudo::weights::SubstrateWeight; + type WeightInfo = weights::pallet_sudo::WeightInfo; } pub type CouncilCollective = pallet_collective::Instance1; @@ -507,7 +507,7 @@ impl pallet_collective::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; type SetMembersOrigin = EnsureRootOr; - type WeightInfo = pallet_collective::weights::SubstrateWeight; + type WeightInfo = weights::pallet_collective::WeightInfo; type DisapproveOrigin = TwoThirdsCouncil; type KillOrigin = TwoThirdsCouncil; /// Kind of consideration(amount to hold/freeze) on Collective account who initiated the proposal. @@ -532,7 +532,7 @@ impl pallet_preimage::Config for Runtime { type Currency = Balances; type ManagerOrigin = EnsureRoot; type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_preimage::weights::SubstrateWeight; + type WeightInfo = weights::pallet_preimage::WeightInfo; } parameter_types! { @@ -561,7 +561,7 @@ impl pallet_scheduler::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; type ScheduleOrigin = EnsureRoot; - type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type WeightInfo = weights::pallet_scheduler::WeightInfo; } type NegativeImbalance = >::NegativeImbalance; @@ -748,7 +748,7 @@ impl pallet_messenger::Config for Runtime { } type Currency = Balances; - type WeightInfo = pallet_messenger::weights::SubstrateWeight; + type WeightInfo = weights::pallet_messenger::WeightInfo; type WeightToFee = ConstantMultiplier; type AdjustedWeightToFee = XdmAdjustedWeightToFee; type FeeMultiplier = XdmFeeMultipler; @@ -772,7 +772,7 @@ impl pallet_messenger::Config for Runtime { // NOTE: use `()` as `FromConsensusWeightInfo` since the consensus chain should // never process XDM that come from the consensus chain itself. (), - pallet_messenger::extensions::WeightsFromDomains, + weights::pallet_messenger_from_domains_extension::WeightInfo, >; } @@ -814,7 +814,7 @@ impl pallet_transporter::Config for Runtime { type Currency = Balances; type Sender = Messenger; type AccountIdConverter = AccountIdConverter; - type WeightInfo = pallet_transporter::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transporter::WeightInfo; type SkipBalanceTransferChecks = pallet_domains::DomainsSkipBalanceChecks; type MinimumTransfer = MinimumTransfer; } @@ -915,7 +915,7 @@ impl pallet_domains::Config for Runtime { type MaxDomainBlockWeight = MaxDomainBlockWeight; type MaxDomainNameLength = MaxDomainNameLength; type DomainInstantiationDeposit = DomainInstantiationDeposit; - type WeightInfo = pallet_domains::weights::SubstrateWeight; + type WeightInfo = weights::pallet_domains::WeightInfo; type InitialDomainTxRange = InitialDomainTxRange; type DomainTxRangeAdjustmentInterval = DomainTxRangeAdjustmentInterval; type MinOperatorStake = MinOperatorStake; @@ -957,12 +957,12 @@ impl pallet_rewards::Config for Runtime { type RewardsEnabled = Subspace; type FindBlockRewardAddress = Subspace; type FindVotingRewardAddresses = Subspace; - type WeightInfo = pallet_rewards::weights::SubstrateWeight; + type WeightInfo = weights::pallet_rewards::WeightInfo; type OnReward = (); } impl pallet_runtime_configs::Config for Runtime { - type WeightInfo = pallet_runtime_configs::weights::SubstrateWeight; + type WeightInfo = weights::pallet_runtime_configs::WeightInfo; } mod mmr { @@ -1034,7 +1034,7 @@ impl pallet_multisig::Config for Runtime { type DepositBase = DepositBaseFee; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = pallet_multisig::weights::SubstrateWeight; + type WeightInfo = weights::pallet_multisig::WeightInfo; } construct_runtime!( diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index e0791a51721..9d33c1c43c8 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -193,7 +193,7 @@ impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. type BaseCallFilter = Everything; /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = frame_system::weights::SubstrateWeight; + type SystemWeightInfo = weights::frame_system::WeightInfo; /// Block & extrinsics weights: base values and limits. type BlockWeights = RuntimeBlockWeights; /// The maximum length of a block (in bytes). @@ -216,7 +216,7 @@ impl pallet_timestamp::Config for Runtime { type Moment = Moment; type OnTimestampSet = (); type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = pallet_timestamp::weights::SubstrateWeight; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } parameter_types! { @@ -244,7 +244,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = DustRemovalHandler; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; + type WeightInfo = weights::pallet_balances::WeightInfo; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); @@ -279,13 +279,13 @@ impl pallet_transaction_payment::Config for Runtime { type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightInfo = pallet_transaction_payment::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transaction_payment::WeightInfo; } impl pallet_auto_id::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Time = Timestamp; - type Weights = pallet_auto_id::weights::SubstrateWeight; + type Weights = weights::pallet_auto_id::WeightInfo; } pub struct ExtrinsicStorageFees; @@ -321,7 +321,7 @@ impl domain_pallet_executive::ExtrinsicStorageFees for ExtrinsicStorage impl domain_pallet_executive::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type WeightInfo = domain_pallet_executive::weights::SubstrateWeight; + type WeightInfo = weights::domain_pallet_executive::WeightInfo; type Currency = Balances; type LengthToFee = ::LengthToFee; type ExtrinsicStorageFees = ExtrinsicStorageFees; @@ -430,7 +430,7 @@ impl pallet_messenger::Config for Runtime { } type Currency = Balances; - type WeightInfo = pallet_messenger::weights::SubstrateWeight; + type WeightInfo = weights::pallet_messenger::WeightInfo; type WeightToFee = ConstantMultiplier; type AdjustedWeightToFee = XdmAdjustedWeightToFee; type FeeMultiplier = XdmFeeMultipler; @@ -451,8 +451,8 @@ impl pallet_messenger::Config for Runtime { type NoteChainTransfer = Transporter; type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< Runtime, - pallet_messenger::extensions::WeightsFromConsensus, - pallet_messenger::extensions::WeightsFromDomains, + weights::pallet_messenger_from_consensus_extension::WeightInfo, + weights::pallet_messenger_between_domains_extension::WeightInfo, >; } @@ -476,7 +476,7 @@ impl pallet_transporter::Config for Runtime { type Currency = Balances; type Sender = Messenger; type AccountIdConverter = domain_runtime_primitives::AccountIdConverter; - type WeightInfo = pallet_transporter::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transporter::WeightInfo; type SkipBalanceTransferChecks = (); type MinimumTransfer = MinimumTransfer; } @@ -503,7 +503,7 @@ impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; - type WeightInfo = pallet_utility::weights::SubstrateWeight; + type WeightInfo = weights::pallet_utility::WeightInfo; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index 6ab02434e8f..520221f3302 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -346,7 +346,7 @@ impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. type BaseCallFilter = Everything; /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = frame_system::weights::SubstrateWeight; + type SystemWeightInfo = weights::frame_system::WeightInfo; /// Block & extrinsics weights: base values and limits. type BlockWeights = RuntimeBlockWeights; /// The maximum length of a block (in bytes). @@ -369,7 +369,7 @@ impl pallet_timestamp::Config for Runtime { type Moment = Moment; type OnTimestampSet = (); type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = pallet_timestamp::weights::SubstrateWeight; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } parameter_types! { @@ -397,7 +397,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = DustRemovalHandler; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; + type WeightInfo = weights::pallet_balances::WeightInfo; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); @@ -434,7 +434,7 @@ impl pallet_transaction_payment::Config for Runtime { type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightInfo = pallet_transaction_payment::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transaction_payment::WeightInfo; } pub struct ExtrinsicStorageFees; @@ -468,7 +468,7 @@ impl domain_pallet_executive::ExtrinsicStorageFees for ExtrinsicStorage impl domain_pallet_executive::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type WeightInfo = domain_pallet_executive::weights::SubstrateWeight; + type WeightInfo = weights::domain_pallet_executive::WeightInfo; type Currency = Balances; type LengthToFee = ::LengthToFee; type ExtrinsicStorageFees = ExtrinsicStorageFees; @@ -578,7 +578,7 @@ impl pallet_messenger::Config for Runtime { } type Currency = Balances; - type WeightInfo = pallet_messenger::weights::SubstrateWeight; + type WeightInfo = weights::pallet_messenger::WeightInfo; type WeightToFee = ConstantMultiplier; type AdjustedWeightToFee = XdmAdjustedWeightToFee; type FeeMultiplier = XdmFeeMultipler; @@ -599,8 +599,8 @@ impl pallet_messenger::Config for Runtime { type NoteChainTransfer = Transporter; type ExtensionWeightInfo = pallet_messenger::extensions::weights::SubstrateWeight< Runtime, - pallet_messenger::extensions::WeightsFromConsensus, - pallet_messenger::extensions::WeightsFromDomains, + weights::pallet_messenger_from_consensus_extension::WeightInfo, + weights::pallet_messenger_between_domains_extension::WeightInfo, >; } @@ -624,7 +624,7 @@ impl pallet_transporter::Config for Runtime { type Currency = Balances; type Sender = Messenger; type AccountIdConverter = domain_runtime_primitives::AccountId20Converter; - type WeightInfo = pallet_transporter::weights::SubstrateWeight; + type WeightInfo = weights::pallet_transporter::WeightInfo; type SkipBalanceTransferChecks = (); type MinimumTransfer = MinimumTransfer; } @@ -722,7 +722,7 @@ impl pallet_evm::Config for Runtime { // TODO: re-check this value mostly from moonbeam type GasLimitStorageGrowthRatio = (); type Timestamp = Timestamp; - type WeightInfo = pallet_evm::weights::SubstrateWeight; + type WeightInfo = weights::pallet_evm::WeightInfo; } impl MaybeIntoEvmCall for RuntimeCall { @@ -781,7 +781,7 @@ impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; - type WeightInfo = pallet_utility::weights::SubstrateWeight; + type WeightInfo = weights::pallet_utility::WeightInfo; } impl MaybeUtilityCall for RuntimeCall { From 4933789adb3066a6d54e1d257113d9dda8cb98a1 Mon Sep 17 00:00:00 2001 From: linning Date: Sat, 14 Jun 2025 00:54:48 +0800 Subject: [PATCH 11/11] Fix clippy & update runtime-benchmark.sh Signed-off-by: linning --- runtime-benchmark.sh | 11 +++++++---- test/subspace-test-runtime/Cargo.toml | 1 + test/subspace-test-runtime/src/lib.rs | 12 +++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/runtime-benchmark.sh b/runtime-benchmark.sh index 043f923856b..12a869f0fc1 100755 --- a/runtime-benchmark.sh +++ b/runtime-benchmark.sh @@ -1,8 +1,11 @@ #!/bin/bash -e -cargo build -r --bin subspace-node --features runtime-benchmarks +profile="production" +features="runtime-benchmarks" -cargo build -r -p subspace-runtime --features runtime-benchmarks +cargo build --profile $profile --bin subspace-node --features $features + +cargo build --profile $profile --package subspace-runtime --features $features subspace_runtime_pallets=( "frame_system" "pallet_balances" @@ -34,7 +37,7 @@ for pallet in "${subspace_runtime_pallets[@]}"; do $cmd done -cargo build -r -p evm-domain-runtime --features runtime-benchmarks +cargo build --profile $profile --package evm-domain-runtime --features $features evm_domain_runtime_pallets=( "frame_system" "domain_pallet_executive" @@ -57,7 +60,7 @@ for pallet in "${evm_domain_runtime_pallets[@]}"; do $cmd done -cargo build -r -p auto-id-domain-runtime --features runtime-benchmarks +cargo build --profile $profile --package auto-id-domain-runtime --features $features auto_id_domain_runtime_pallets=( "frame_system" "domain_pallet_executive" diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index aad4af1d407..3c6ccc9d406 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -131,6 +131,7 @@ runtime-benchmarks = [ "pallet-runtime-configs/runtime-benchmarks", "pallet-subspace/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-transaction-payment/runtime-benchmarks", "pallet-transporter/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index a8ec05f77fc..5f703cbbd51 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -45,7 +45,7 @@ use domain_runtime_primitives::{ }; use frame_support::genesis_builder_helper::{build_state, get_preset}; use frame_support::inherent::ProvideInherent; -use frame_support::traits::fungible::Inspect; +use frame_support::traits::fungible::{Inspect, Mutate}; use frame_support::traits::tokens::WithdrawConsequence; use frame_support::traits::{ ConstU8, ConstU16, ConstU32, ConstU64, ConstU128, Currency, Everything, ExistenceRequirement, @@ -535,6 +535,16 @@ impl pallet_transaction_payment::OnChargeTransaction for OnChargeTransa _ => Err(InvalidTransaction::Payment.into()), } } + + #[cfg(feature = "runtime-benchmarks")] + fn endow_account(who: &AccountId, amount: Self::Balance) { + Balances::set_balance(who, amount); + } + + #[cfg(feature = "runtime-benchmarks")] + fn minimum_balance() -> Self::Balance { + >::minimum_balance() + } } impl pallet_transaction_payment::Config for Runtime {