diff --git a/Cargo.lock b/Cargo.lock index 17113102c..6737d7eef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6068,12 +6068,14 @@ dependencies = [ "orml-traits", "orml-xcm-support", "pallet-asset-gateway", + "pallet-asset-rate", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-call-decompressor", "pallet-collator-selection", + "pallet-collective", "pallet-ismp", "pallet-ismp-demo", "pallet-ismp-host-executive", @@ -6089,6 +6091,7 @@ dependencies = [ "pallet-token-governor", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -9921,12 +9924,14 @@ dependencies = [ "orml-traits", "orml-xcm-support", "pallet-asset-gateway", + "pallet-asset-rate", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-call-decompressor", "pallet-collator-selection", + "pallet-collective", "pallet-ismp", "pallet-ismp-demo", "pallet-ismp-host-executive", @@ -9941,6 +9946,7 @@ dependencies = [ "pallet-token-governor", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-xcm", "parachains-common", "parity-scale-codec", @@ -10879,12 +10885,14 @@ dependencies = [ "orml-traits", "orml-xcm-support", "pallet-asset-gateway", + "pallet-asset-rate", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-call-decompressor", "pallet-collator-selection", + "pallet-collective", "pallet-ismp", "pallet-ismp-demo", "pallet-ismp-host-executive", @@ -10899,6 +10907,7 @@ dependencies = [ "pallet-token-governor", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", diff --git a/Cargo.toml b/Cargo.toml index 4b51b5cd8..f5cd69d2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -168,6 +168,9 @@ sp-state-machine = { version = "0.43.0", default-features = false } sp-storage = { version = "21.0.0", default-features = false } pallet-beefy-mmr = { version = "38.0.0", default-features = false } pallet-assets = { version = "39.0.0", default-features = false } +pallet-treasury = { version = "36.0.0", default-features = false} +pallet-asset-rate = {version = "16.0.0", default-features = false} +pallet-collective = {version = "37.0.0", default-features = false} frame-metadata-hash-extension = { default-features = false, version = "0.5.0" } sp-keyring = "39.0.0" diff --git a/evm/abi/src/generated/evm_host.rs b/evm/abi/src/generated/evm_host.rs index c328d36e1..94579b1b2 100644 --- a/evm/abi/src/generated/evm_host.rs +++ b/evm/abi/src/generated/evm_host.rs @@ -2720,7 +2720,8 @@ pub mod evm_host { ///Gets the contract's `GetRequestHandled` event pub fn get_request_handled_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestHandledFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestHandledFilter> + { self.0.event() } ///Gets the contract's `GetRequestTimeoutHandled` event @@ -2742,7 +2743,8 @@ pub mod evm_host { ///Gets the contract's `HostParamsUpdated` event pub fn host_params_updated_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostParamsUpdatedFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostParamsUpdatedFilter> + { self.0.event() } ///Gets the contract's `HostWithdrawal` event @@ -2760,7 +2762,8 @@ pub mod evm_host { ///Gets the contract's `PostRequestHandled` event pub fn post_request_handled_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestHandledFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestHandledFilter> + { self.0.event() } ///Gets the contract's `PostRequestTimeoutHandled` event @@ -2776,13 +2779,15 @@ pub mod evm_host { ///Gets the contract's `PostResponseEvent` event pub fn post_response_event_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseEventFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseEventFilter> + { self.0.event() } ///Gets the contract's `PostResponseFunded` event pub fn post_response_funded_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseFundedFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseFundedFilter> + { self.0.event() } ///Gets the contract's `PostResponseHandled` event diff --git a/evm/abi/src/generated/ping_module.rs b/evm/abi/src/generated/ping_module.rs index d201a71b8..97b0a8d75 100644 --- a/evm/abi/src/generated/ping_module.rs +++ b/evm/abi/src/generated/ping_module.rs @@ -713,13 +713,15 @@ pub mod ping_module { ///Gets the contract's `GetTimeoutReceived` event pub fn get_timeout_received_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetTimeoutReceivedFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetTimeoutReceivedFilter> + { self.0.event() } ///Gets the contract's `MessageDispatched` event pub fn message_dispatched_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MessageDispatchedFilter> { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MessageDispatchedFilter> + { self.0.event() } ///Gets the contract's `PostReceived` event diff --git a/modules/consensus/beefy/prover/src/runtime/paseo.rs b/modules/consensus/beefy/prover/src/runtime/paseo.rs index 6f66b6552..41a1d8dd0 100644 --- a/modules/consensus/beefy/prover/src/runtime/paseo.rs +++ b/modules/consensus/beefy/prover/src/runtime/paseo.rs @@ -526,7 +526,8 @@ pub mod api { pub fn pending_rewards( &self, who: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload { + ) -> ::subxt::runtime_api::Payload + { ::subxt::runtime_api::Payload::new_static( "NominationPoolsApi", "pending_rewards", @@ -2246,7 +2247,8 @@ pub mod api { #[doc = " Get current GRANDPA authority set id."] pub fn current_set_id( &self, - ) -> ::subxt::runtime_api::Payload { + ) -> ::subxt::runtime_api::Payload + { ::subxt::runtime_api::Payload::new_static( "GrandpaApi", "current_set_id", @@ -2683,7 +2685,8 @@ pub mod api { pub fn account_nonce( &self, account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload { + ) -> ::subxt::runtime_api::Payload + { ::subxt::runtime_api::Payload::new_static( "AccountNonceApi", "account_nonce", @@ -4395,7 +4398,8 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::Address { + ) -> ::subxt::constants::Address + { ::subxt::constants::Address::new_static( "System", "BlockLength", @@ -12685,7 +12689,8 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_maximum( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { ::subxt::constants::Address::new_static( "Treasury", "ProposalBondMaximum", @@ -18649,7 +18654,8 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_max( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMax", @@ -18664,7 +18670,8 @@ pub mod api { #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_min( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMin", diff --git a/modules/utils/subxt/src/gargantua.rs b/modules/utils/subxt/src/gargantua.rs index da2588990..adf317801 100644 --- a/modules/utils/subxt/src/gargantua.rs +++ b/modules/utils/subxt/src/gargantua.rs @@ -246,7 +246,8 @@ pub mod api { &self, included_hash: ::subxt::utils::H256, slot: runtime_types::sp_consensus_slots::Slot, - ) -> ::subxt::runtime_api::Payload { + ) -> ::subxt::runtime_api::Payload + { ::subxt::runtime_api::Payload::new_static( "AuraUnincludedSegmentApi", "can_build_upon", @@ -857,7 +858,8 @@ pub mod api { pub fn account_nonce( &self, account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload { + ) -> ::subxt::runtime_api::Payload + { ::subxt::runtime_api::Payload::new_static( "AccountNonceApi", "account_nonce", @@ -3371,7 +3373,8 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::Address { + ) -> ::subxt::constants::Address + { ::subxt::constants::Address::new_static( "System", "BlockLength", diff --git a/parachain/runtimes/gargantua/Cargo.toml b/parachain/runtimes/gargantua/Cargo.toml index cd2bdfb61..c26f0b52a 100644 --- a/parachain/runtimes/gargantua/Cargo.toml +++ b/parachain/runtimes/gargantua/Cargo.toml @@ -38,6 +38,9 @@ pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-message-queue = { workspace = true } +pallet-treasury = { workspace = true} +pallet-asset-rate = { workspace = true} +pallet-collective = { workspace = true} sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } @@ -130,6 +133,9 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-xcm/std", + "pallet-treasury/std", + "pallet-asset-rate/std", + "pallet-collective/std", "pallet-ismp/std", "pallet-ismp-runtime-api/std", "pallet-ismp-demo/std", @@ -187,6 +193,9 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-utility/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", diff --git a/parachain/runtimes/gargantua/src/lib.rs b/parachain/runtimes/gargantua/src/lib.rs index 743979bbf..b82984488 100644 --- a/parachain/runtimes/gargantua/src/lib.rs +++ b/parachain/runtimes/gargantua/src/lib.rs @@ -27,7 +27,7 @@ mod ismp; mod weights; pub mod xcm; -use alloc::vec::Vec; +use alloc::{sync::Arc, vec::Vec}; use cumulus_pallet_parachain_system::{RelayChainState, RelayNumberMonotonicallyIncreases}; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::traits::TransformOrigin; @@ -67,7 +67,7 @@ use frame_support::{ }; use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, + EnsureRoot, EnsureRootWithSuccess, }; use pallet_ismp::mmr::Proof; @@ -88,9 +88,24 @@ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use ::ismp::host::StateMachine; use ::staging_xcm::latest::prelude::BodyId; use cumulus_primitives_core::ParaId; -use frame_support::{derive_impl, traits::ConstBool}; +use frame_support::{ + derive_impl, + traits::{tokens::pay::PayAssetFromAccount, ConstBool}, +}; +#[cfg(feature = "runtime-benchmarks")] +use pallet_asset_rate::AssetKindFactory; + +use pallet_collective::PrimeDefaultVote; +#[cfg(feature = "runtime-benchmarks")] +use pallet_treasury::ArgumentsFactory; + use pallet_ismp::mmr::{Leaf, ProofKeys}; -use sp_core::Get; +use sp_core::{ + crypto::{AccountId32, FromEntropy}, + Get, +}; +use sp_runtime::traits::IdentityLookup; +use staging_xcm::latest::{Junction, Junctions::X1, Location}; /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. pub type Signature = MultiSignature; @@ -553,6 +568,95 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } +parameter_types! { + pub const SpendingPeriod: BlockNumber = 6 * DAYS; + pub const TreasuryPalletId: PalletId = PalletId(*b"hb/trsry"); + pub const PayoutPeriod: BlockNumber = 14 * DAYS; + pub const MaxBalance: Balance = Balance::max_value(); + pub TreasuryAccount: AccountId = Treasury::account_id(); + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 10; + pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct TreasuryAssetFactory {} + +#[cfg(feature = "runtime-benchmarks")] +impl ArgumentsFactory for TreasuryAssetFactory +where + A: From, + B: FromEntropy, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } + + fn create_beneficiary(seed: [u8; 32]) -> B { + B::from_entropy(&mut seed.as_slice()).unwrap() + } +} + +#[cfg(feature = "runtime-benchmarks")] +impl AssetKindFactory for TreasuryAssetFactory +where + A: From, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } +} + +/// A way to pay from treasury +impl pallet_treasury::Config for Runtime { + type Currency = Balances; + type RejectOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + type SpendPeriod = SpendingPeriod; + type Burn = (); + type PalletId = TreasuryPalletId; + type BurnDestination = (); + type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendFunds = (); + type MaxApprovals = ConstU32<1>; // number of technical collectives + type SpendOrigin = EnsureRootWithSuccess; + type AssetKind = Location; + type Beneficiary = AccountId32; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayAssetFromAccount; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type Currency = Balances; + type AssetKind = Location; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = PrimeDefaultVote; + type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -567,6 +671,8 @@ construct_runtime!( // Monetary stuff. Balances: pallet_balances = 10, TransactionPayment: pallet_transaction_payment = 11, + Treasury: pallet_treasury = 12, + AssetRate: pallet_asset_rate = 13, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship = 20, @@ -599,6 +705,9 @@ construct_runtime!( Assets: pallet_assets = 58, TokenGovernor: pallet_token_governor = 59, StateCoprocessor: pallet_state_coprocessor = 60, + + // Governance + TechnicalCollective: pallet_collective = 80 } ); @@ -622,6 +731,9 @@ mod benches { [pallet_sudo, Sudo] [pallet_assets, Assets] [pallet_utility, Utility] + [pallet_treasury, Treasury] + [pallet_asset_rate, AssetRate] + [pallet_collective, TechnicalCollective] [cumulus_pallet_parachain_system, ParachainSystem] [pallet_session, SessionBench::] ); diff --git a/parachain/runtimes/gargantua/src/weights/mod.rs b/parachain/runtimes/gargantua/src/weights/mod.rs index 1ad9507eb..412e43227 100644 --- a/parachain/runtimes/gargantua/src/weights/mod.rs +++ b/parachain/runtimes/gargantua/src/weights/mod.rs @@ -26,12 +26,15 @@ pub mod rocksdb_weights; pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; +pub mod pallet_asset_rate; pub mod pallet_assets; pub mod pallet_balances; +pub mod pallet_collective; pub mod pallet_message_queue; pub mod pallet_session; pub mod pallet_sudo; pub mod pallet_timestamp; +pub mod pallet_treasury; pub mod pallet_utility; pub use block_weights::constants::BlockExecutionWeight; diff --git a/parachain/runtimes/gargantua/src/weights/pallet_asset_rate.rs b/parachain/runtimes/gargantua/src/weights/pallet_asset_rate.rs new file mode 100644 index 000000000..bf2618be5 --- /dev/null +++ b/parachain/runtimes/gargantua/src/weights/pallet_asset_rate.rs @@ -0,0 +1,73 @@ + +//! Autogenerated weights for `pallet_asset_rate` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-08-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Lukambas-M2-MAX`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/hyperbridge +// benchmark +// pallet +// --chain=gargantua-2000 +// --pallet +// pallet_asset_rate +// --extrinsic +// * +// --steps +// 50 +// --repeat +// 20 +// --output +// parachain/runtimes/gargantua/src/weights/pallet_asset_rate.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_asset_rate`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_rate::WeightInfo for WeightInfo { + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `4099` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn update() -> Weight { + // Proof Size summary in bytes: + // Measured: `137` + // Estimated: `4099` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn remove() -> Weight { + // Proof Size summary in bytes: + // Measured: `137` + // Estimated: `4099` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/parachain/runtimes/gargantua/src/weights/pallet_collective.rs b/parachain/runtimes/gargantua/src/weights/pallet_collective.rs new file mode 100644 index 000000000..06b6e7093 --- /dev/null +++ b/parachain/runtimes/gargantua/src/weights/pallet_collective.rs @@ -0,0 +1,291 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-08-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Lukambas-M2-MAX`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("gargantua-2000")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/hyperbridge +// benchmark +// pallet +// --chain=gargantua-2000 +// --pallet +// pallet_collective +// --extrinsic +// * +// --steps +// 50 +// --repeat +// 20 +// --output +// parachain/runtimes/gargantua/src/weights/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: `TechnicalCollective::Members` (r:1 w:1) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:0) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:100 w:100) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:0 w:1) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 10]`. + /// The range of component `n` is `[0, 10]`. + /// 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 * (309 ±0)` + // Estimated: `7119 + m * (1848 ±25) + p * (2643 ±2)` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 7119)) + // Standard Error: 311_524 + .saturating_add(Weight::from_parts(8_075_528, 0).saturating_mul(m.into())) + // Standard Error: 31_842 + .saturating_add(Weight::from_parts(2_977_511, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(m.into()))) + .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((2_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1848).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 2643).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::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, 10]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `104 + m * (32 ±0)` + // Estimated: `1588 + m * (32 ±0)` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_865_645, 0) + .saturating_add(Weight::from_parts(0, 1588)) + // Standard Error: 46 + .saturating_add(Weight::from_parts(1_829, 0).saturating_mul(b.into())) + // Standard Error: 4_952 + .saturating_add(Weight::from_parts(12_615, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:0) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 10]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `104 + m * (32 ±0)` + // Estimated: `3568 + m * (32 ±0)` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_253_091, 0) + .saturating_add(Weight::from_parts(0, 3568)) + // Standard Error: 51 + .saturating_add(Weight::from_parts(1_948, 0).saturating_mul(b.into())) + // Standard Error: 5_515 + .saturating_add(Weight::from_parts(57_107, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalCount` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:0 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 10]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `482 + m * (32 ±0) + p * (35 ±0)` + // Estimated: `3797 + m * (40 ±0) + p * (36 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(15_842_342, 0) + .saturating_add(Weight::from_parts(0, 3797)) + // Standard Error: 75 + .saturating_add(Weight::from_parts(2_370, 0).saturating_mul(b.into())) + // Standard Error: 8_916 + .saturating_add(Weight::from_parts(125_732, 0).saturating_mul(m.into())) + // Standard Error: 776 + .saturating_add(Weight::from_parts(132_769, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 10]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `974 + m * (64 ±0)` + // Estimated: `4439 + m * (64 ±0)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_632_768, 0) + .saturating_add(Weight::from_parts(0, 4439)) + // Standard Error: 7_985 + .saturating_add(Weight::from_parts(63_993, 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: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3824 + m * (77 ±1) + p * (37 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_139_338, 0) + .saturating_add(Weight::from_parts(0, 3824)) + // Standard Error: 9_804 + .saturating_add(Weight::from_parts(128_887, 0).saturating_mul(m.into())) + // Standard Error: 652 + .saturating_add(Weight::from_parts(128_836, 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, 77).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::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, 10]`. + /// 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: `742 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4331 + b * (1 ±0) + m * (44 ±2) + p * (41 ±0)` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(25_159_047, 0) + .saturating_add(Weight::from_parts(0, 4331)) + // Standard Error: 91 + .saturating_add(Weight::from_parts(1_164, 0).saturating_mul(b.into())) + // Standard Error: 14_136 + .saturating_add(Weight::from_parts(2_173, 0).saturating_mul(m.into())) + // Standard Error: 943 + .saturating_add(Weight::from_parts(150_308, 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, 44).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 41).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:1 w:0) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3844 + m * (77 ±1) + p * (37 ±0)` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(18_233_398, 0) + .saturating_add(Weight::from_parts(0, 3844)) + // Standard Error: 12_334 + .saturating_add(Weight::from_parts(185_588, 0).saturating_mul(m.into())) + // Standard Error: 820 + .saturating_add(Weight::from_parts(128_618, 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, 77).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:1 w:0) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::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, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `762 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4351 + b * (1 ±0) + m * (44 ±2) + p * (41 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_509_353, 0) + .saturating_add(Weight::from_parts(0, 4351)) + // Standard Error: 83 + .saturating_add(Weight::from_parts(1_239, 0).saturating_mul(b.into())) + // Standard Error: 12_829 + .saturating_add(Weight::from_parts(39_709, 0).saturating_mul(m.into())) + // Standard Error: 856 + .saturating_add(Weight::from_parts(150_131, 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, 44).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 41).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:0 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::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: `260 + p * (32 ±0)` + // Estimated: `1745 + p * (32 ±0)` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_964_967, 0) + .saturating_add(Weight::from_parts(0, 1745)) + // Standard Error: 789 + .saturating_add(Weight::from_parts(120_532, 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())) + } +} diff --git a/parachain/runtimes/gargantua/src/weights/pallet_treasury.rs b/parachain/runtimes/gargantua/src/weights/pallet_treasury.rs new file mode 100644 index 000000000..a848aef96 --- /dev/null +++ b/parachain/runtimes/gargantua/src/weights/pallet_treasury.rs @@ -0,0 +1,140 @@ +#![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_treasury`. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1887` + // Minimum execution time: 177_000_000 picoseconds. + Weight::from_parts(191_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `127` + // Estimated: `1887` + // Minimum execution time: 80_000_000 picoseconds. + Weight::from_parts(82_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Treasury Deactivated (r:1 w:1) + /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances InactiveIssuance (r:1 w:1) + /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:99 w:99) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:199 w:199) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Bounties BountyApprovals (r:1 w:1) + /// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 99]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `331 + p * (251 ±0)` + // Estimated: `3593 + p * (5206 ±0)` + // Minimum execution time: 887_000_000 picoseconds. + Weight::from_parts(828_616_021, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 695_351 + .saturating_add(Weight::from_parts(566_114_524, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:0) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: Treasury SpendCount (r:1 w:1) + /// Proof: Treasury SpendCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Spends (r:0 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `4702` + // Minimum execution time: 208_000_000 picoseconds. + Weight::from_parts(222_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + /// Storage: XcmPallet QueryCounter (r:1 w:1) + /// Proof Skipped: XcmPallet QueryCounter (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Configuration ActiveConfig (r:1 w:0) + /// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) + /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet SupportedVersion (r:1 w:0) + /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) + /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Dmp DownwardMessageQueues (r:1 w:1) + /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) + /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) + /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet Queries (r:0 w:1) + /// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `737` + // Estimated: `5313` + // Minimum execution time: 551_000_000 picoseconds. + Weight::from_parts(569_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + /// Storage: XcmPallet Queries (r:1 w:1) + /// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `442` + // Estimated: `5313` + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(281_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `172` + // Estimated: `5313` + // Minimum execution time: 147_000_000 picoseconds. + Weight::from_parts(160_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} \ No newline at end of file diff --git a/parachain/runtimes/messier/Cargo.toml b/parachain/runtimes/messier/Cargo.toml index 12d2a9290..580ca593c 100644 --- a/parachain/runtimes/messier/Cargo.toml +++ b/parachain/runtimes/messier/Cargo.toml @@ -38,6 +38,9 @@ pallet-balances = { workspace = true } pallet-assets = { workspace = true } pallet-session = { workspace = true } pallet-sudo = { workspace = true } +pallet-treasury = { workspace = true} +pallet-asset-rate = { workspace = true} +pallet-collective = { workspace = true} pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } @@ -137,6 +140,9 @@ std = [ "pallet-ismp-runtime-api/std", "pallet-ismp-demo/std", "parachain-info/std", + "pallet-treasury/std", + "pallet-asset-rate/std", + "pallet-collective/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", "sp-api/std", @@ -184,6 +190,9 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/parachain/runtimes/messier/src/lib.rs b/parachain/runtimes/messier/src/lib.rs index f13c5166d..a8e9601d9 100644 --- a/parachain/runtimes/messier/src/lib.rs +++ b/parachain/runtimes/messier/src/lib.rs @@ -27,6 +27,7 @@ mod ismp; mod weights; pub mod xcm; +use alloc::sync::Arc; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::traits::TransformOrigin; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; @@ -67,7 +68,7 @@ use frame_support::{ }; use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, + EnsureRoot, EnsureRootWithSuccess, }; use pallet_ismp::mmr::{Proof, ProofKeys}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; @@ -306,8 +307,16 @@ parameter_types! { // Configure FRAME pallets to include in runtime. use ::ismp::host::StateMachine; -use frame_support::derive_impl; +use frame_support::{derive_impl, traits::tokens::pay::PayAssetFromAccount}; +#[cfg(feature = "runtime-benchmarks")] +use pallet_asset_rate::AssetKindFactory; +use pallet_collective::PrimeDefaultVote; use pallet_ismp::mmr::Leaf; +#[cfg(feature = "runtime-benchmarks")] +use pallet_treasury::ArgumentsFactory; +use sp_core::crypto::{AccountId32, FromEntropy}; +use sp_runtime::traits::IdentityLookup; +use staging_xcm::latest::{Junction, Junctions::X1, Location}; #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { @@ -558,6 +567,96 @@ impl pallet_mmr::Config for Runtime { type ForkIdentifierProvider = Ismp; } +parameter_types! { + pub const SpendingPeriod: BlockNumber = 6 * DAYS; + pub const TreasuryPalletId: PalletId = PalletId(*b"hb/trsry"); + pub const PayoutPeriod: BlockNumber = 14 * DAYS; + pub const MaxBalance: Balance = Balance::max_value(); + pub TreasuryAccount: AccountId = Treasury::account_id(); + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 10; + pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct TreasuryAssetFactory {} + +#[cfg(feature = "runtime-benchmarks")] +impl ArgumentsFactory for TreasuryAssetFactory +where + A: From, + B: FromEntropy, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } + + fn create_beneficiary(seed: [u8; 32]) -> B { + B::from_entropy(&mut seed.as_slice()).unwrap() + } +} + +#[cfg(feature = "runtime-benchmarks")] +impl AssetKindFactory for TreasuryAssetFactory +where + A: From, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } +} + +/// A way to pay from treasury +impl pallet_treasury::Config for Runtime { + type Currency = Balances; + type RejectOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + type SpendPeriod = SpendingPeriod; + type Burn = (); + type PalletId = TreasuryPalletId; + type BurnDestination = (); + type WeightInfo = (); + type SpendFunds = (); + type MaxApprovals = ConstU32<1>; // number of technical collectives + type SpendOrigin = EnsureRootWithSuccess; + type AssetKind = Location; + type Beneficiary = AccountId32; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayAssetFromAccount; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type Currency = Balances; + type AssetKind = Location; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = PrimeDefaultVote; + type WeightInfo = (); + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -571,6 +670,8 @@ construct_runtime!( // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Treasury: pallet_treasury = 12, + AssetRate: pallet_asset_rate = 13, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship::{Pallet, Storage} = 20, @@ -601,6 +702,9 @@ construct_runtime!( Gateway: pallet_asset_gateway = 45, Assets: pallet_assets = 46, TokenGovernor: pallet_token_governor = 47, + + // Governance + TechnicalCollective: pallet_collective = 60 } ); diff --git a/parachain/runtimes/nexus/Cargo.toml b/parachain/runtimes/nexus/Cargo.toml index 518c1ac3b..8e01aa4f4 100644 --- a/parachain/runtimes/nexus/Cargo.toml +++ b/parachain/runtimes/nexus/Cargo.toml @@ -44,6 +44,9 @@ pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-message-queue = { workspace = true } pallet-utility = { workspace = true } +pallet-treasury = { workspace = true} +pallet-asset-rate = { workspace = true} +pallet-collective = { workspace = true} sp-api = { workspace = true } sp-block-builder = { workspace = true } @@ -142,6 +145,9 @@ std = [ "pallet-ismp-runtime-api/std", "pallet-ismp-demo/std", "parachain-info/std", + "pallet-treasury/std", + "pallet-asset-rate/std", + "pallet-collective/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", "sp-api/std", @@ -193,6 +199,9 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-asset-rate/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", diff --git a/parachain/runtimes/nexus/src/lib.rs b/parachain/runtimes/nexus/src/lib.rs index a82e9192c..b57197900 100644 --- a/parachain/runtimes/nexus/src/lib.rs +++ b/parachain/runtimes/nexus/src/lib.rs @@ -27,12 +27,15 @@ mod ismp; mod weights; pub mod xcm; +use alloc::sync::Arc; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::traits::TransformOrigin; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; use codec::{Decode, Encode, MaxEncodedLen}; use cumulus_pallet_parachain_system::{RelayChainState, RelayNumberMonotonicallyIncreases}; +#[cfg(feature = "runtime-benchmarks")] +use pallet_asset_rate::AssetKindFactory; use scale_info::TypeInfo; use smallvec::smallvec; use sp_api::impl_runtime_apis; @@ -68,7 +71,7 @@ use frame_support::{ }; use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, + EnsureRoot, EnsureRootWithSuccess, }; use pallet_ismp::mmr::{Proof, ProofKeys}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; @@ -307,8 +310,14 @@ parameter_types! { // Configure FRAME pallets to include in runtime. use ::ismp::host::StateMachine; -use frame_support::derive_impl; +use frame_support::{derive_impl, traits::tokens::pay::PayAssetFromAccount}; +use pallet_collective::PrimeDefaultVote; use pallet_ismp::mmr::Leaf; +#[cfg(feature = "runtime-benchmarks")] +use pallet_treasury::ArgumentsFactory; +use sp_core::crypto::{AccountId32, FromEntropy}; +use sp_runtime::traits::IdentityLookup; +use staging_xcm::latest::{Junction, Junctions::X1, Location}; #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { @@ -566,6 +575,96 @@ impl pallet_mmr::Config for Runtime { type ForkIdentifierProvider = Ismp; } +parameter_types! { + pub const SpendingPeriod: BlockNumber = 6 * DAYS; + pub const TreasuryPalletId: PalletId = PalletId(*b"hb/trsry"); + pub const PayoutPeriod: BlockNumber = 14 * DAYS; + pub const MaxBalance: Balance = Balance::max_value(); + pub TreasuryAccount: AccountId = Treasury::account_id(); + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 10; + pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct TreasuryAssetFactory {} + +#[cfg(feature = "runtime-benchmarks")] +impl ArgumentsFactory for TreasuryAssetFactory +where + A: From, + B: FromEntropy, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } + + fn create_beneficiary(seed: [u8; 32]) -> B { + B::from_entropy(&mut seed.as_slice()).unwrap() + } +} + +#[cfg(feature = "runtime-benchmarks")] +impl AssetKindFactory for TreasuryAssetFactory +where + A: From, +{ + fn create_asset_kind(seed: u32) -> A { + Location { parents: 0, interior: X1(Arc::new([Junction::GeneralIndex(seed as u128)])) } + .into() + } +} + +/// A way to pay from treasury +impl pallet_treasury::Config for Runtime { + type Currency = Balances; + type RejectOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + type SpendPeriod = SpendingPeriod; + type Burn = (); + type PalletId = TreasuryPalletId; + type BurnDestination = (); + type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendFunds = (); + type MaxApprovals = ConstU32<1>; // number of technical collectives + type SpendOrigin = EnsureRootWithSuccess; + type AssetKind = Location; + type Beneficiary = AccountId32; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayAssetFromAccount; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type Currency = Balances; + type AssetKind = Location; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = TreasuryAssetFactory; +} + +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = PrimeDefaultVote; + type WeightInfo = weights::pallet_collective::WeightInfo; + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -580,6 +679,8 @@ construct_runtime!( // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Treasury: pallet_treasury = 12, + AssetRate: pallet_asset_rate = 13, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship::{Pallet, Storage} = 20, @@ -608,6 +709,9 @@ construct_runtime!( Gateway: pallet_asset_gateway = 45, Assets: pallet_assets = 46, TokenGovernor: pallet_token_governor = 47, + + // Governance + TechnicalCollective: pallet_collective = 60 } ); @@ -631,6 +735,9 @@ mod benches { [pallet_sudo, Sudo] [pallet_assets, Assets] [pallet_utility, Utility] + [pallet_treasury, Treasury] + [pallet_asset_rate, AssetRate] + [pallet_collective, TechnicalCollective] [cumulus_pallet_parachain_system, ParachainSystem] [pallet_session, SessionBench::] ); diff --git a/parachain/runtimes/nexus/src/weights/mod.rs b/parachain/runtimes/nexus/src/weights/mod.rs index 6b4ac9bec..7b5e8c9a5 100644 --- a/parachain/runtimes/nexus/src/weights/mod.rs +++ b/parachain/runtimes/nexus/src/weights/mod.rs @@ -25,12 +25,15 @@ pub mod rocksdb_weights; pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; +pub mod pallet_asset_rate; pub mod pallet_assets; pub mod pallet_balances; +pub mod pallet_collective; pub mod pallet_message_queue; pub mod pallet_session; pub mod pallet_sudo; pub mod pallet_timestamp; +pub mod pallet_treasury; pub mod pallet_utility; pub use block_weights::constants::BlockExecutionWeight; diff --git a/parachain/runtimes/nexus/src/weights/pallet_asset_rate.rs b/parachain/runtimes/nexus/src/weights/pallet_asset_rate.rs new file mode 100644 index 000000000..07ae3296b --- /dev/null +++ b/parachain/runtimes/nexus/src/weights/pallet_asset_rate.rs @@ -0,0 +1,73 @@ + +//! Autogenerated weights for `pallet_asset_rate` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-08-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Lukambas-M2-MAX`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/hyperbridge +// benchmark +// pallet +// --chain=nexus-2000 +// --pallet +// pallet_asset_rate +// --extrinsic +// * +// --steps +// 50 +// --repeat +// 20 +// --output +// parachain/runtimes/nexus/src/weights/pallet_asset_rate.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_asset_rate`. +pub struct WeightInfo(PhantomData); +impl pallet_asset_rate::WeightInfo for WeightInfo { + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `4099` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn update() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `4099` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(634), added: 3109, mode: `MaxEncodedLen`) + fn remove() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `4099` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 4099)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/parachain/runtimes/nexus/src/weights/pallet_collective.rs b/parachain/runtimes/nexus/src/weights/pallet_collective.rs new file mode 100644 index 000000000..d5250d5be --- /dev/null +++ b/parachain/runtimes/nexus/src/weights/pallet_collective.rs @@ -0,0 +1,291 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-08-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Lukambas-M2-MAX`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("nexus-2000")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/hyperbridge +// benchmark +// pallet +// --chain=nexus-2000 +// --pallet +// pallet_collective +// --extrinsic +// * +// --steps +// 50 +// --repeat +// 20 +// --output +// parachain/runtimes/nexus/src/weights/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: `TechnicalCollective::Members` (r:1 w:1) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:0) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:100 w:100) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:0 w:1) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 10]`. + /// The range of component `n` is `[0, 10]`. + /// 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 * (309 ±0)` + // Estimated: `7119 + m * (1848 ±25) + p * (2643 ±2)` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 7119)) + // Standard Error: 314_941 + .saturating_add(Weight::from_parts(7_741_416, 0).saturating_mul(m.into())) + // Standard Error: 32_192 + .saturating_add(Weight::from_parts(2_937_270, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(m.into()))) + .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((2_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1848).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 2643).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::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, 10]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `104 + m * (32 ±0)` + // Estimated: `1588 + m * (32 ±0)` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_574_628, 0) + .saturating_add(Weight::from_parts(0, 1588)) + // Standard Error: 50 + .saturating_add(Weight::from_parts(1_679, 0).saturating_mul(b.into())) + // Standard Error: 5_382 + .saturating_add(Weight::from_parts(21_171, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:0) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 10]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `104 + m * (32 ±0)` + // Estimated: `3568 + m * (32 ±0)` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(10_687_830, 0) + .saturating_add(Weight::from_parts(0, 3568)) + // Standard Error: 46 + .saturating_add(Weight::from_parts(1_970, 0).saturating_mul(b.into())) + // Standard Error: 4_994 + .saturating_add(Weight::from_parts(93_021, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalCount` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:0 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 10]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `482 + m * (32 ±0) + p * (35 ±0)` + // Estimated: `3797 + m * (40 ±0) + p * (36 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_498_486, 0) + .saturating_add(Weight::from_parts(0, 3797)) + // Standard Error: 78 + .saturating_add(Weight::from_parts(1_895, 0).saturating_mul(b.into())) + // Standard Error: 9_271 + .saturating_add(Weight::from_parts(92_557, 0).saturating_mul(m.into())) + // Standard Error: 807 + .saturating_add(Weight::from_parts(124_532, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 10]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `974 + m * (64 ±0)` + // Estimated: `4439 + m * (64 ±0)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_920_613, 0) + .saturating_add(Weight::from_parts(0, 4439)) + // Standard Error: 5_989 + .saturating_add(Weight::from_parts(8_744, 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: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3824 + m * (77 ±1) + p * (37 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_139_780, 0) + .saturating_add(Weight::from_parts(0, 3824)) + // Standard Error: 12_758 + .saturating_add(Weight::from_parts(174_755, 0).saturating_mul(m.into())) + // Standard Error: 848 + .saturating_add(Weight::from_parts(128_552, 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, 77).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::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, 10]`. + /// 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: `742 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4331 + b * (1 ±0) + m * (44 ±2) + p * (41 ±0)` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_612_069, 0) + .saturating_add(Weight::from_parts(0, 4331)) + // Standard Error: 97 + .saturating_add(Weight::from_parts(1_010, 0).saturating_mul(b.into())) + // Standard Error: 15_006 + .saturating_add(Weight::from_parts(41_820, 0).saturating_mul(m.into())) + // Standard Error: 1_001 + .saturating_add(Weight::from_parts(143_107, 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, 44).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 41).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:1 w:0) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3844 + m * (77 ±1) + p * (37 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_900_899, 0) + .saturating_add(Weight::from_parts(0, 3844)) + // Standard Error: 11_269 + .saturating_add(Weight::from_parts(160_773, 0).saturating_mul(m.into())) + // Standard Error: 749 + .saturating_add(Weight::from_parts(124_731, 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, 77).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Voting` (r:1 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Members` (r:1 w:0) + /// Proof: `TechnicalCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Prime` (r:1 w:0) + /// Proof: `TechnicalCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::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, 10]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `762 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4351 + b * (1 ±0) + m * (44 ±2) + p * (41 ±0)` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_108_360, 0) + .saturating_add(Weight::from_parts(0, 4351)) + // Standard Error: 108 + .saturating_add(Weight::from_parts(582, 0).saturating_mul(b.into())) + // Standard Error: 16_765 + .saturating_add(Weight::from_parts(93_868, 0).saturating_mul(m.into())) + // Standard Error: 1_118 + .saturating_add(Weight::from_parts(143_957, 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, 44).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 41).saturating_mul(p.into())) + } + /// Storage: `TechnicalCollective::Proposals` (r:1 w:1) + /// Proof: `TechnicalCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::Voting` (r:0 w:1) + /// Proof: `TechnicalCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCollective::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCollective::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: `260 + p * (32 ±0)` + // Estimated: `1745 + p * (32 ±0)` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_739_984, 0) + .saturating_add(Weight::from_parts(0, 1745)) + // Standard Error: 719 + .saturating_add(Weight::from_parts(115_394, 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())) + } +} diff --git a/parachain/runtimes/nexus/src/weights/pallet_treasury.rs b/parachain/runtimes/nexus/src/weights/pallet_treasury.rs new file mode 100644 index 000000000..a848aef96 --- /dev/null +++ b/parachain/runtimes/nexus/src/weights/pallet_treasury.rs @@ -0,0 +1,140 @@ +#![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_treasury`. +pub struct WeightInfo(PhantomData); +impl pallet_treasury::WeightInfo for WeightInfo { + /// Storage: Treasury ProposalCount (r:1 w:1) + /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:0 w:1) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `1887` + // Minimum execution time: 177_000_000 picoseconds. + Weight::from_parts(191_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn remove_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `127` + // Estimated: `1887` + // Minimum execution time: 80_000_000 picoseconds. + Weight::from_parts(82_000_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Treasury Deactivated (r:1 w:1) + /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Balances InactiveIssuance (r:1 w:1) + /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: Treasury Proposals (r:99 w:99) + /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + /// Storage: System Account (r:199 w:199) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Bounties BountyApprovals (r:1 w:1) + /// Proof: Bounties BountyApprovals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// The range of component `p` is `[0, 99]`. + fn on_initialize_proposals(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `331 + p * (251 ±0)` + // Estimated: `3593 + p * (5206 ±0)` + // Minimum execution time: 887_000_000 picoseconds. + Weight::from_parts(828_616_021, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 695_351 + .saturating_add(Weight::from_parts(566_114_524, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) + } + /// Storage: AssetRate ConversionRateToNative (r:1 w:0) + /// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) + /// Storage: Treasury SpendCount (r:1 w:1) + /// Proof: Treasury SpendCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Treasury Spends (r:0 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `4702` + // Minimum execution time: 208_000_000 picoseconds. + Weight::from_parts(222_000_000, 0) + .saturating_add(Weight::from_parts(0, 4702)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + /// Storage: XcmPallet QueryCounter (r:1 w:1) + /// Proof Skipped: XcmPallet QueryCounter (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Configuration ActiveConfig (r:1 w:0) + /// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Dmp DeliveryFeeFactor (r:1 w:0) + /// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet SupportedVersion (r:1 w:0) + /// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: XcmPallet SafeXcmVersion (r:1 w:0) + /// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Dmp DownwardMessageQueues (r:1 w:1) + /// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured) + /// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) + /// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmPallet Queries (r:0 w:1) + /// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `737` + // Estimated: `5313` + // Minimum execution time: 551_000_000 picoseconds. + Weight::from_parts(569_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + /// Storage: XcmPallet Queries (r:1 w:1) + /// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `442` + // Estimated: `5313` + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(281_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: Treasury Spends (r:1 w:1) + /// Proof: Treasury Spends (max_values: None, max_size: Some(1848), added: 4323, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `172` + // Estimated: `5313` + // Minimum execution time: 147_000_000 picoseconds. + Weight::from_parts(160_000_000, 0) + .saturating_add(Weight::from_parts(0, 5313)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} \ No newline at end of file diff --git a/tesseract/messaging/src/get_requests.rs b/tesseract/messaging/src/get_requests.rs index d45e62e0a..f524a44fd 100644 --- a/tesseract/messaging/src/get_requests.rs +++ b/tesseract/messaging/src/get_requests.rs @@ -73,8 +73,8 @@ pub async fn process_get_request_events< // if fee.is_zero() { // tracing::trace!(target: "tesseract", "Skipping unprofitable get request {:?}, // fee provided {:?}", commitment, Cost(fee)); } else { - // tracing::trace!(target: "tesseract", "Handling profitable get request {:?}, fee - // provided {:?}", commitment, Cost(fee)); requests.push(req) + // tracing::trace!(target: "tesseract", "Handling profitable get request {:?}, + // fee provided {:?}", commitment, Cost(fee)); requests.push(req) // } // } else { // tracing::error!("Failed to query fee for get request {:?}", commitment);