From 516b8f1afc0de99e4191a3f0c7bb45c9dfd93e33 Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Fri, 29 Mar 2024 21:19:36 -0300 Subject: [PATCH 1/4] initial polkadot 1.1.3 code --- relay/paseo/Cargo.toml | 12 +- relay/paseo/build.rs | 16 +- relay/paseo/constants/Cargo.toml | 2 +- relay/paseo/constants/src/lib.rs | 254 +- .../constants/src/weights/block_weights.rs | 74 +- .../src/weights/extrinsic_weights.rs | 74 +- .../constants/src/weights/paritydb_weights.rs | 138 +- .../constants/src/weights/rocksdb_weights.rs | 138 +- relay/paseo/src/bag_thresholds.rs | 408 +- relay/paseo/src/governance/mod.rs | 96 +- relay/paseo/src/governance/old.rs | 288 +- relay/paseo/src/governance/origins.rs | 132 +- relay/paseo/src/governance/tracks.rs | 524 +- relay/paseo/src/lib.rs | 4637 ++++++++--------- .../weights/frame_benchmarking_baseline.rs | 80 +- .../frame_election_provider_support.rs | 76 +- relay/paseo/src/weights/frame_system.rs | 102 +- relay/paseo/src/weights/mod.rs | 1 - relay/paseo/src/weights/pallet_asset_rate.rs | 64 +- relay/paseo/src/weights/pallet_bags_list.rs | 70 +- relay/paseo/src/weights/pallet_balances.rs | 88 +- relay/paseo/src/weights/pallet_bounties.rs | 104 +- .../src/weights/pallet_child_bounties.rs | 88 +- .../src/weights/pallet_conviction_voting.rs | 96 +- .../pallet_election_provider_multi_phase.rs | 8 +- .../paseo/src/weights/pallet_fast_unstake.rs | 8 +- relay/paseo/src/weights/pallet_identity.rs | 212 +- relay/paseo/src/weights/pallet_im_online.rs | 62 +- relay/paseo/src/weights/pallet_indices.rs | 72 +- .../paseo/src/weights/pallet_message_queue.rs | 92 +- relay/paseo/src/weights/pallet_multisig.rs | 120 +- .../src/weights/pallet_nomination_pools.rs | 186 +- relay/paseo/src/weights/pallet_offences.rs | 8 +- relay/paseo/src/weights/pallet_preimage.rs | 120 +- relay/paseo/src/weights/pallet_proxy.rs | 148 +- relay/paseo/src/weights/pallet_referenda.rs | 172 +- relay/paseo/src/weights/pallet_scheduler.rs | 124 +- relay/paseo/src/weights/pallet_session.rs | 8 +- relay/paseo/src/weights/pallet_staking.rs | 8 +- relay/paseo/src/weights/pallet_sudo.rs | 85 - relay/paseo/src/weights/pallet_timestamp.rs | 60 +- relay/paseo/src/weights/pallet_treasury.rs | 100 +- relay/paseo/src/weights/pallet_utility.rs | 84 +- relay/paseo/src/weights/pallet_vesting.rs | 146 +- relay/paseo/src/weights/pallet_whitelist.rs | 76 +- relay/paseo/src/weights/pallet_xcm.rs | 112 +- .../src/weights/runtime_common_auctions.rs | 70 +- .../src/weights/runtime_common_claims.rs | 78 +- .../src/weights/runtime_common_crowdloan.rs | 96 +- .../weights/runtime_common_paras_registrar.rs | 118 +- .../paseo/src/weights/runtime_common_slots.rs | 88 +- .../runtime_parachains_configuration.rs | 112 +- .../weights/runtime_parachains_disputes.rs | 58 +- .../runtime_parachains_disputes_slashing.rs | 8 +- .../src/weights/runtime_parachains_hrmp.rs | 124 +- .../weights/runtime_parachains_inclusion.rs | 60 +- .../weights/runtime_parachains_initializer.rs | 60 +- .../src/weights/runtime_parachains_paras.rs | 136 +- .../runtime_parachains_paras_inherent.rs | 100 +- relay/paseo/src/weights/xcm/mod.rs | 487 +- .../xcm/pallet_xcm_benchmarks_fungible.rs | 110 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 353 +- relay/paseo/src/xcm_config.rs | 673 ++- 63 files changed, 6118 insertions(+), 6186 deletions(-) delete mode 100644 relay/paseo/src/weights/pallet_sudo.rs diff --git a/relay/paseo/Cargo.toml b/relay/paseo/Cargo.toml index 260cd1e..94b419e 100644 --- a/relay/paseo/Cargo.toml +++ b/relay/paseo/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "paseo-runtime" +name = "polkadot-runtime" build = "build.rs" repository.workspace = true version.workspace = true @@ -77,14 +77,13 @@ pallet-referenda = { default-features = false , version = "25.0.0" } pallet-scheduler = { default-features = false , version = "26.0.0" } pallet-session = { default-features = false , version = "25.0.0" } frame-support = { default-features = false , version = "25.0.0" } -pallet-sudo = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } +pallet-staking = { default-features = false , version = "25.0.1" } pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } pallet-staking-reward-curve = { version = "10.0.0" } pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } frame-system = { default-features = false , version = "25.0.0" } frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } -paseo-runtime-constants = { package = "paseo-runtime-constants", path = "constants", default-features = false } +polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } pallet-timestamp = { default-features = false , version = "24.0.0" } pallet-tips = { default-features = false , version = "24.0.0" } pallet-treasury = { default-features = false , version = "24.0.0" } @@ -184,7 +183,6 @@ std = [ "pallet-scheduler/std", "pallet-session-benchmarking?/std", "pallet-session/std", - "pallet-sudo/std", "pallet-staking-reward-fn/std", "pallet-staking-runtime-api/std", "pallet-staking/std", @@ -199,7 +197,7 @@ std = [ "pallet-xcm-benchmarks?/std", "pallet-xcm/std", "parity-scale-codec/std", - "paseo-runtime-constants/std", + "polkadot-runtime-constants/std", "primitives/std", "runtime-common/std", "runtime-parachains/std", @@ -264,7 +262,6 @@ runtime-benchmarks = [ "pallet-referenda/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-session-benchmarking/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-tips/runtime-benchmarks", @@ -320,7 +317,6 @@ try-runtime = [ "pallet-referenda/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", - "pallet-sudo/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", "pallet-tips/try-runtime", diff --git a/relay/paseo/build.rs b/relay/paseo/build.rs index f1b32bc..428c971 100644 --- a/relay/paseo/build.rs +++ b/relay/paseo/build.rs @@ -1,7 +1,7 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -12,14 +12,14 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . use substrate_wasm_builder::WasmBuilder; fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() - .build() + WasmBuilder::new() + .with_current_project() + .import_memory() + .export_heap_base() + .build() } diff --git a/relay/paseo/constants/Cargo.toml b/relay/paseo/constants/Cargo.toml index 30dce19..706b432 100644 --- a/relay/paseo/constants/Cargo.toml +++ b/relay/paseo/constants/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "paseo-runtime-constants" +name = "polkadot-runtime-constants" repository.workspace = true version.workspace = true authors.workspace = true diff --git a/relay/paseo/constants/src/lib.rs b/relay/paseo/constants/src/lib.rs index 6b4dd57..113c825 100644 --- a/relay/paseo/constants/src/lib.rs +++ b/relay/paseo/constants/src/lib.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . #![cfg_attr(not(feature = "std"), no_std)] @@ -22,152 +22,152 @@ pub use self::currency::DOLLARS; /// Money matters. pub mod currency { - use primitives::Balance; + use primitives::Balance; - /// The existential deposit. - pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS; + /// The existential deposit. + pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS; - pub const UNITS: Balance = 10_000_000_000; - pub const DOLLARS: Balance = UNITS; // 10_000_000_000 - pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000 - pub const CENTS: Balance = DOLLARS / 100; // 100_000_000 - pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 + pub const UNITS: Balance = 10_000_000_000; + pub const DOLLARS: Balance = UNITS; // 10_000_000_000 + pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000 + pub const CENTS: Balance = DOLLARS / 100; // 100_000_000 + pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 - pub const fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS - } + pub const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS + } } /// Time and blocks. pub mod time { - use primitives::{BlockNumber, Moment}; - use runtime_common::prod_or_fast; - pub const MILLISECS_PER_BLOCK: Moment = 6000; - pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 1 * MINUTES); - - // These time units are defined in number of blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - pub const HOURS: BlockNumber = MINUTES * 60; - pub const DAYS: BlockNumber = HOURS * 24; - pub const WEEKS: BlockNumber = DAYS * 7; - - // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. - // The choice of is done in accordance to the slot duration and expected target - // block time, for safely resisting network delays of maximum two seconds. - // - pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); + use primitives::{BlockNumber, Moment}; + use runtime_common::prod_or_fast; + pub const MILLISECS_PER_BLOCK: Moment = 6000; + pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(4 * HOURS, 1 * MINUTES); + + // These time units are defined in number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; + pub const WEEKS: BlockNumber = DAYS * 7; + + // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. + // The choice of is done in accordance to the slot duration and expected target + // block time, for safely resisting network delays of maximum two seconds. + // + pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); } /// Fee-related. pub mod fee { - use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::{ - WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, - }; - use primitives::Balance; - use smallvec::smallvec; - pub use sp_runtime::Perbill; - - /// The block saturation level. Fees will be updates based on this value. - pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); - - /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the - /// node's balance type. - /// - /// This should typically create a mapping between the following ranges: - /// - [0, `MAXIMUM_BLOCK_WEIGHT`] - /// - [Balance::min, Balance::max] - /// - /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: - /// - Setting it to `0` will essentially disable the weight fee. - /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. - pub struct WeightToFee; - impl WeightToFeePolynomial for WeightToFee { - type Balance = Balance; - fn polynomial() -> WeightToFeeCoefficients { - // in Paseo, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: - let p = super::currency::CENTS; - let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); - smallvec![WeightToFeeCoefficient { - degree: 1, - negative: false, - coeff_frac: Perbill::from_rational(p % q, q), - coeff_integer: p / q, - }] - } - } + use crate::weights::ExtrinsicBaseWeight; + use frame_support::weights::{ + WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }; + use primitives::Balance; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + /// The block saturation level. Fees will be updates based on this value. + pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); + + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the + /// node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, `MAXIMUM_BLOCK_WEIGHT`] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = super::currency::CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } } /// XCM protocol related constants. pub mod xcm { - /// Pluralistic bodies existing within the consensus. - pub mod body { - // Preallocated for the Root body. - #[allow(dead_code)] - const ROOT_INDEX: u32 = 0; - // The bodies corresponding to the Paseo OpenGov Origins. - pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1; - // The body corresponding to the Treasurer OpenGov track. - pub const TREASURER_INDEX: u32 = 2; - } + /// Pluralistic bodies existing within the consensus. + pub mod body { + // Preallocated for the Root body. + #[allow(dead_code)] + const ROOT_INDEX: u32 = 0; + // The bodies corresponding to the Polkadot OpenGov Origins. + pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1; + // The body corresponding to the Treasurer OpenGov track. + pub const TREASURER_INDEX: u32 = 2; + } } /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; - - /// Asset Hub parachain ID. - pub const ASSET_HUB_ID: u32 = 1000; - /// Collectives parachain ID. - pub const COLLECTIVES_ID: u32 = 1001; - /// Bridge Hub parachain ID. - pub const BRIDGE_HUB_ID: u32 = 1002; - - frame_support::match_types! { - // System parachains from Paseo point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - COLLECTIVES_ID | - BRIDGE_HUB_ID - )), - } - }; - } + use xcm::latest::prelude::*; + + /// Asset Hub parachain ID. + pub const ASSET_HUB_ID: u32 = 1000; + /// Collectives parachain ID. + pub const COLLECTIVES_ID: u32 = 1001; + /// Bridge Hub parachain ID. + pub const BRIDGE_HUB_ID: u32 = 1002; + + frame_support::match_types! { + // System parachains from Polkadot point of view. + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 0, + interior: X1(Parachain( + ASSET_HUB_ID | + COLLECTIVES_ID | + BRIDGE_HUB_ID + )), + } + }; + } } -/// Paseo Treasury pallet instance. +/// Polkadot Treasury pallet instance. pub const TREASURY_PALLET_ID: u8 = 19; #[cfg(test)] mod tests { - use super::{ - currency::{CENTS, DOLLARS, MILLICENTS}, - fee::WeightToFee, - }; - use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFee as WeightToFeeT; - use runtime_common::MAXIMUM_BLOCK_WEIGHT; - - #[test] - // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. - fn full_block_fee_is_correct() { - // A full block should cost between 10 and 100 DOLLARS. - let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); - assert!(full_block >= 10 * DOLLARS); - assert!(full_block <= 100 * DOLLARS); - } - - #[test] - // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct - fn extrinsic_base_fee_is_correct() { - // `ExtrinsicBaseWeight` should cost 1/10 of a CENT - println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); - let y = CENTS / 10; - assert!(x.max(y) - x.min(y) < MILLICENTS); - } + use super::{ + currency::{CENTS, DOLLARS, MILLICENTS}, + fee::WeightToFee, + }; + use crate::weights::ExtrinsicBaseWeight; + use frame_support::weights::WeightToFee as WeightToFeeT; + use runtime_common::MAXIMUM_BLOCK_WEIGHT; + + #[test] + // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. + fn full_block_fee_is_correct() { + // A full block should cost between 10 and 100 DOLLARS. + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); + assert!(full_block >= 10 * DOLLARS); + assert!(full_block <= 100 * DOLLARS); + } + + #[test] + // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct + fn extrinsic_base_fee_is_correct() { + // `ExtrinsicBaseWeight` should cost 1/10 of a CENT + println!("Base: {}", ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); + let y = CENTS / 10; + assert!(x.max(y) - x.min(y) < MILLICENTS); + } } diff --git a/relay/paseo/constants/src/weights/block_weights.rs b/relay/paseo/constants/src/weights/block_weights.rs index 17eb00f..9608fd5 100644 --- a/relay/paseo/constants/src/weights/block_weights.rs +++ b/relay/paseo/constants/src/weights/block_weights.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-06-18 (Y/M/D) @@ -39,43 +39,43 @@ use sp_core::parameter_types; use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { - /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 13_546_462, 14_258_156 - /// Average: 13_806_190 - /// Median: 13_798_575 - /// Std-Dev: 141568.11 - /// - /// Percentiles nanoseconds: - /// 99th: 14_144_016 - /// 95th: 14_039_432 - /// 75th: 13_904_965 - pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(13_806_190), 0); + /// Time to execute an empty block. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// + /// Stats nanoseconds: + /// Min, Max: 13_546_462, 14_258_156 + /// Average: 13_806_190 + /// Median: 13_798_575 + /// Std-Dev: 141568.11 + /// + /// Percentiles nanoseconds: + /// 99th: 14_144_016 + /// 95th: 14_039_432 + /// 75th: 13_904_965 + pub const BlockExecutionWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(13_806_190), 0); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use sp_weights::constants; - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::BlockExecutionWeight::get(); + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::BlockExecutionWeight::get(); - // At least 100 µs. - assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 100 µs." - ); - // At most 50 ms. - assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 50 ms." - ); - } + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 50 ms." + ); + } } diff --git a/relay/paseo/constants/src/weights/extrinsic_weights.rs b/relay/paseo/constants/src/weights/extrinsic_weights.rs index 12d2fa3..fac8792 100644 --- a/relay/paseo/constants/src/weights/extrinsic_weights.rs +++ b/relay/paseo/constants/src/weights/extrinsic_weights.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-06-18 (Y/M/D) @@ -39,43 +39,43 @@ use sp_core::parameter_types; use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { - /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 125_467, 127_402 - /// Average: 126_045 - /// Median: 126_039 - /// Std-Dev: 310.96 - /// - /// Percentiles nanoseconds: - /// 99th: 126_699 - /// 95th: 126_620 - /// 75th: 126_207 - pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(126_045), 0); + /// Time to execute a NO-OP extrinsic, for example `System::remark`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// + /// Stats nanoseconds: + /// Min, Max: 125_467, 127_402 + /// Average: 126_045 + /// Median: 126_039 + /// Std-Dev: 310.96 + /// + /// Percentiles nanoseconds: + /// 99th: 126_699 + /// 95th: 126_620 + /// 75th: 126_207 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(126_045), 0); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use sp_weights::constants; - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::ExtrinsicBaseWeight::get(); + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::ExtrinsicBaseWeight::get(); - // At least 10 µs. - assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 10 µs." - ); - // At most 1 ms. - assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 1 ms." - ); - } + // At least 10 µs. + assert!( + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 10 µs." + ); + // At most 1 ms. + assert!( + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 1 ms." + ); + } } diff --git a/relay/paseo/constants/src/weights/paritydb_weights.rs b/relay/paseo/constants/src/weights/paritydb_weights.rs index f946a94..f999539 100644 --- a/relay/paseo/constants/src/weights/paritydb_weights.rs +++ b/relay/paseo/constants/src/weights/paritydb_weights.rs @@ -18,7 +18,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-03-30 (Y/M/D) //! -//! DATABASE: `ParityDb`, RUNTIME: `Paseo` +//! DATABASE: `ParityDb`, RUNTIME: `Polkadot` //! BLOCK-NUM: `BlockId::Number(9653477)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` //! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0` @@ -33,77 +33,77 @@ // --mul=1.1 // --weight-path=runtime/polkadot/constants/src/weights/ -/// Storage DB weights for the `Paseo` runtime and `ParityDb`. +/// Storage DB weights for the `Polkadot` runtime and `ParityDb`. pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; - parameter_types! { - /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights - /// are available for brave runtime engineers who may want to try this out as default. - pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - // Time to read one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 4_611, 13_478_005 - // Average: 10_750 - // Median: 10_655 - // Std-Dev: 12214.49 - // - // Percentiles [NS]: - // 99th: 14_451 - // 95th: 12_588 - // 75th: 11_200 - read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, + parameter_types! { + /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights + /// are available for brave runtime engineers who may want to try this out as default. + pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 4_611, 13_478_005 + // Average: 10_750 + // Median: 10_655 + // Std-Dev: 12214.49 + // + // Percentiles [NS]: + // 99th: 14_451 + // 95th: 12_588 + // 75th: 11_200 + read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, - // Time to write one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 8_023, 47_367_740 - // Average: 34_592 - // Median: 32_703 - // Std-Dev: 49417.24 - // - // Percentiles [NS]: - // 99th: 69_379 - // 95th: 47_168 - // 75th: 35_252 - write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 8_023, 47_367_740 + // Average: 34_592 + // Median: 32_703 + // Std-Dev: 49417.24 + // + // Percentiles [NS]: + // 99th: 69_379 + // 95th: 47_168 + // 75th: 35_252 + write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } - #[cfg(test)] - mod test_db_weights { - use super::constants::ParityDbWeight as W; - use frame_support::weights::constants; + #[cfg(test)] + mod test_db_weights { + use super::constants::ParityDbWeight as W; + use frame_support::weights::constants; - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn bound() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } } diff --git a/relay/paseo/constants/src/weights/rocksdb_weights.rs b/relay/paseo/constants/src/weights/rocksdb_weights.rs index 4c03f1e..c5cf045 100644 --- a/relay/paseo/constants/src/weights/rocksdb_weights.rs +++ b/relay/paseo/constants/src/weights/rocksdb_weights.rs @@ -18,7 +18,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-03-29 (Y/M/D) //! -//! DATABASE: `RocksDb`, RUNTIME: `Paseo` +//! DATABASE: `RocksDb`, RUNTIME: `Polkadot` //! BLOCK-NUM: `BlockId::Number(9643856)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` //! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0` @@ -32,77 +32,77 @@ // --mul=1.1 // --weight-path=runtime/polkadot/constants/src/weights/ -/// Storage DB weights for the `Paseo` runtime and `RocksDb`. +/// Storage DB weights for the `Polkadot` runtime and `RocksDb`. pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; - parameter_types! { - /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout - /// the runtime. - pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - // Time to read one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 5_015, 1_441_022 - // Average: 18_635 - // Median: 17_795 - // Std-Dev: 4829.75 - // - // Percentiles [NS]: - // 99th: 32_074 - // 95th: 26_658 - // 75th: 19_363 - read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, + parameter_types! { + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the runtime. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 5_015, 1_441_022 + // Average: 18_635 + // Median: 17_795 + // Std-Dev: 4829.75 + // + // Percentiles [NS]: + // 99th: 32_074 + // 95th: 26_658 + // 75th: 19_363 + read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, - // Time to write one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 16_368, 34_500_937 - // Average: 75_882 - // Median: 74_236 - // Std-Dev: 64706.41 - // - // Percentiles [NS]: - // 99th: 111_151 - // 95th: 92_666 - // 75th: 80_297 - write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 16_368, 34_500_937 + // Average: 75_882 + // Median: 74_236 + // Std-Dev: 64706.41 + // + // Percentiles [NS]: + // 99th: 111_151 + // 95th: 92_666 + // 75th: 80_297 + write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } - #[cfg(test)] - mod test_db_weights { - use super::constants::RocksDbWeight as W; - use frame_support::weights::constants; + #[cfg(test)] + mod test_db_weights { + use super::constants::RocksDbWeight as W; + use frame_support::weights::constants; - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn bound() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } } diff --git a/relay/paseo/src/bag_thresholds.rs b/relay/paseo/src/bag_thresholds.rs index 651623b..56c764f 100644 --- a/relay/paseo/src/bag_thresholds.rs +++ b/relay/paseo/src/bag_thresholds.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated bag thresholds. //! @@ -31,204 +31,204 @@ pub const CONSTANT_RATIO: f64 = 1.1131723507077667; /// Upper thresholds delimiting the bag list. pub const THRESHOLDS: [u64; 200] = [ - 10_000_000_000, - 11_131_723_507, - 12_391_526_824, - 13_793_905_044, - 15_354_993_703, - 17_092_754_435, - 19_027_181_634, - 21_180_532_507, - 23_577_583_160, - 26_245_913_670, - 29_216_225_417, - 32_522_694_326, - 36_203_364_094, - 40_300_583_912, - 44_861_495_728, - 49_938_576_656, - 55_590_242_767, - 61_881_521_217, - 68_884_798_439, - 76_680_653_006, - 85_358_782_760, - 95_019_036_859, - 105_772_564_622, - 117_743_094_401, - 131_068_357_174, - 145_901_671_259, - 162_413_706_368, - 180_794_447_305, - 201_255_379_901, - 224_031_924_337, - 249_386_143_848, - 277_609_759_981, - 309_027_509_097, - 344_000_878_735, - 382_932_266_827, - 426_269_611_626, - 474_511_545_609, - 528_213_132_664, - 587_992_254_562, - 654_536_720_209, - 728_612_179_460, - 811_070_932_564, - 902_861_736_593, - 1_005_040_721_687, - 1_118_783_542_717, - 1_245_398_906_179, - 1_386_343_627_960, - 1_543_239_395_225, - 1_717_891_425_287, - 1_912_309_236_147, - 2_128_729_767_682, - 2_369_643_119_512, - 2_637_821_201_686, - 2_936_349_627_828, - 3_268_663_217_709, - 3_638_585_517_729, - 4_050_372_794_022, - 4_508_763_004_364, - 5_019_030_312_352, - 5_587_045_771_074, - 6_219_344_874_498, - 6_923_202_753_807, - 7_706_717_883_882, - 8_578_905_263_043, - 9_549_800_138_161, - 10_630_573_468_586, - 11_833_660_457_397, - 13_172_903_628_838, - 14_663_712_098_160, - 16_323_238_866_411, - 18_170_578_180_087, - 20_226_985_226_447, - 22_516_120_692_255, - 25_064_322_999_817, - 27_900_911_352_605, - 31_058_523_077_268, - 34_573_489_143_434, - 38_486_252_181_966, - 42_841_831_811_331, - 47_690_342_626_046, - 53_087_570_807_094, - 59_095_615_988_698, - 65_783_605_766_662, - 73_228_491_069_308, - 81_515_931_542_404, - 90_741_281_135_191, - 101_010_685_227_495, - 112_442_301_921_293, - 125_167_661_548_718, - 139_333_180_038_781, - 155_101_843_555_358, - 172_655_083_789_626, - 192_194_865_483_744, - 213_946_010_204_502, - 238_158_783_103_893, - 265_111_772_429_462, - 295_115_094_915_607, - 328_513_963_936_552, - 365_692_661_475_578, - 407_078_959_611_349, - 453_149_042_394_237, - 504_432_984_742_966, - 561_520_851_400_862, - 625_069_486_125_324, - 695_810_069_225_823, - 774_556_530_406_243, - 862_214_913_708_369, - 959_793_802_308_039, - 1_068_415_923_109_985, - 1_189_331_064_661_951, - 1_323_930_457_019_515, - 1_473_762_779_014_021, - 1_640_551_977_100_649, - 1_826_217_100_807_404, - 2_032_894_383_008_501, - 2_262_961_819_074_188, - 2_519_066_527_700_738, - 2_804_155_208_229_882, - 3_121_508_044_894_685, - 3_474_776_448_088_622, - 3_868_025_066_902_796, - 4_305_778_556_320_752, - 4_793_073_637_166_665, - 5_335_517_047_800_242, - 5_939_350_054_341_159, - 6_611_520_261_667_250, - 7_359_761_551_432_161, - 8_192_683_066_856_378, - 9_119_868_268_136_230, - 10_151_985_198_186_376, - 11_300_909_227_415_580, - 12_579_859_689_817_292, - 14_003_551_982_487_792, - 15_588_366_878_604_342, - 17_352_539_001_951_086, - 19_316_366_631_550_092, - 21_502_445_250_375_680, - 23_935_927_525_325_748, - 26_644_812_709_737_600, - 29_660_268_798_266_784, - 33_016_991_140_790_860, - 36_753_601_641_491_664, - 40_913_093_136_236_104, - 45_543_324_061_189_736, - 50_697_569_104_240_168, - 56_435_132_174_936_472, - 62_822_028_745_677_552, - 69_931_745_415_056_768, - 77_846_085_432_775_824, - 86_656_109_914_600_688, - 96_463_185_576_826_656, - 107_380_151_045_315_664, - 119_532_615_158_469_088, - 133_060_402_202_199_856, - 148_119_160_705_543_712, - 164_882_154_307_451_552, - 183_542_255_300_186_560, - 204_314_163_786_713_728, - 227_436_877_985_347_776, - 253_176_444_104_585_088, - 281_829_017_427_734_464, - 313_724_269_827_691_328, - 349_229_182_918_168_832, - 388_752_270_484_770_624, - 432_748_278_778_513_664, - 481_723_418_752_617_984, - 536_241_190_443_833_600, - 596_928_866_512_693_376, - 664_484_709_541_257_600, - 739_686_006_129_409_280, - 823_398_010_228_713_984, - 916_583_898_614_395_264, - 1_020_315_853_041_475_584, - 1_135_787_396_594_579_584, - 1_264_327_126_171_442_688, - 1_407_413_999_103_859_968, - 1_566_694_349_801_462_272, - 1_744_000_832_209_069_824, - 1_941_373_506_026_471_680, - 2_161_083_309_305_266_176, - 2_405_658_187_494_662_656, - 2_677_912_179_572_818_944, - 2_980_977_795_924_034_048, - 3_318_342_060_496_414_208, - 3_693_886_631_935_247_360, - 4_111_932_465_319_354_368, - 4_577_289_528_371_127_808, - 5_095_312_144_166_932_480, - 5_671_960_597_112_134_656, - 6_313_869_711_009_142_784, - 7_028_425_188_266_614_784, - 7_823_848_588_596_424_704, - 8_709_291_924_949_524_480, - 9_694_942_965_096_232_960, - 10_792_142_450_433_898_496, - 12_013_514_580_722_579_456, - 13_373_112_266_084_982_784, - 14_886_578_817_516_689_408, - 16_571_327_936_291_497_984, - 18_446_744_073_709_551_615, + 10_000_000_000, + 11_131_723_507, + 12_391_526_824, + 13_793_905_044, + 15_354_993_703, + 17_092_754_435, + 19_027_181_634, + 21_180_532_507, + 23_577_583_160, + 26_245_913_670, + 29_216_225_417, + 32_522_694_326, + 36_203_364_094, + 40_300_583_912, + 44_861_495_728, + 49_938_576_656, + 55_590_242_767, + 61_881_521_217, + 68_884_798_439, + 76_680_653_006, + 85_358_782_760, + 95_019_036_859, + 105_772_564_622, + 117_743_094_401, + 131_068_357_174, + 145_901_671_259, + 162_413_706_368, + 180_794_447_305, + 201_255_379_901, + 224_031_924_337, + 249_386_143_848, + 277_609_759_981, + 309_027_509_097, + 344_000_878_735, + 382_932_266_827, + 426_269_611_626, + 474_511_545_609, + 528_213_132_664, + 587_992_254_562, + 654_536_720_209, + 728_612_179_460, + 811_070_932_564, + 902_861_736_593, + 1_005_040_721_687, + 1_118_783_542_717, + 1_245_398_906_179, + 1_386_343_627_960, + 1_543_239_395_225, + 1_717_891_425_287, + 1_912_309_236_147, + 2_128_729_767_682, + 2_369_643_119_512, + 2_637_821_201_686, + 2_936_349_627_828, + 3_268_663_217_709, + 3_638_585_517_729, + 4_050_372_794_022, + 4_508_763_004_364, + 5_019_030_312_352, + 5_587_045_771_074, + 6_219_344_874_498, + 6_923_202_753_807, + 7_706_717_883_882, + 8_578_905_263_043, + 9_549_800_138_161, + 10_630_573_468_586, + 11_833_660_457_397, + 13_172_903_628_838, + 14_663_712_098_160, + 16_323_238_866_411, + 18_170_578_180_087, + 20_226_985_226_447, + 22_516_120_692_255, + 25_064_322_999_817, + 27_900_911_352_605, + 31_058_523_077_268, + 34_573_489_143_434, + 38_486_252_181_966, + 42_841_831_811_331, + 47_690_342_626_046, + 53_087_570_807_094, + 59_095_615_988_698, + 65_783_605_766_662, + 73_228_491_069_308, + 81_515_931_542_404, + 90_741_281_135_191, + 101_010_685_227_495, + 112_442_301_921_293, + 125_167_661_548_718, + 139_333_180_038_781, + 155_101_843_555_358, + 172_655_083_789_626, + 192_194_865_483_744, + 213_946_010_204_502, + 238_158_783_103_893, + 265_111_772_429_462, + 295_115_094_915_607, + 328_513_963_936_552, + 365_692_661_475_578, + 407_078_959_611_349, + 453_149_042_394_237, + 504_432_984_742_966, + 561_520_851_400_862, + 625_069_486_125_324, + 695_810_069_225_823, + 774_556_530_406_243, + 862_214_913_708_369, + 959_793_802_308_039, + 1_068_415_923_109_985, + 1_189_331_064_661_951, + 1_323_930_457_019_515, + 1_473_762_779_014_021, + 1_640_551_977_100_649, + 1_826_217_100_807_404, + 2_032_894_383_008_501, + 2_262_961_819_074_188, + 2_519_066_527_700_738, + 2_804_155_208_229_882, + 3_121_508_044_894_685, + 3_474_776_448_088_622, + 3_868_025_066_902_796, + 4_305_778_556_320_752, + 4_793_073_637_166_665, + 5_335_517_047_800_242, + 5_939_350_054_341_159, + 6_611_520_261_667_250, + 7_359_761_551_432_161, + 8_192_683_066_856_378, + 9_119_868_268_136_230, + 10_151_985_198_186_376, + 11_300_909_227_415_580, + 12_579_859_689_817_292, + 14_003_551_982_487_792, + 15_588_366_878_604_342, + 17_352_539_001_951_086, + 19_316_366_631_550_092, + 21_502_445_250_375_680, + 23_935_927_525_325_748, + 26_644_812_709_737_600, + 29_660_268_798_266_784, + 33_016_991_140_790_860, + 36_753_601_641_491_664, + 40_913_093_136_236_104, + 45_543_324_061_189_736, + 50_697_569_104_240_168, + 56_435_132_174_936_472, + 62_822_028_745_677_552, + 69_931_745_415_056_768, + 77_846_085_432_775_824, + 86_656_109_914_600_688, + 96_463_185_576_826_656, + 107_380_151_045_315_664, + 119_532_615_158_469_088, + 133_060_402_202_199_856, + 148_119_160_705_543_712, + 164_882_154_307_451_552, + 183_542_255_300_186_560, + 204_314_163_786_713_728, + 227_436_877_985_347_776, + 253_176_444_104_585_088, + 281_829_017_427_734_464, + 313_724_269_827_691_328, + 349_229_182_918_168_832, + 388_752_270_484_770_624, + 432_748_278_778_513_664, + 481_723_418_752_617_984, + 536_241_190_443_833_600, + 596_928_866_512_693_376, + 664_484_709_541_257_600, + 739_686_006_129_409_280, + 823_398_010_228_713_984, + 916_583_898_614_395_264, + 1_020_315_853_041_475_584, + 1_135_787_396_594_579_584, + 1_264_327_126_171_442_688, + 1_407_413_999_103_859_968, + 1_566_694_349_801_462_272, + 1_744_000_832_209_069_824, + 1_941_373_506_026_471_680, + 2_161_083_309_305_266_176, + 2_405_658_187_494_662_656, + 2_677_912_179_572_818_944, + 2_980_977_795_924_034_048, + 3_318_342_060_496_414_208, + 3_693_886_631_935_247_360, + 4_111_932_465_319_354_368, + 4_577_289_528_371_127_808, + 5_095_312_144_166_932_480, + 5_671_960_597_112_134_656, + 6_313_869_711_009_142_784, + 7_028_425_188_266_614_784, + 7_823_848_588_596_424_704, + 8_709_291_924_949_524_480, + 9_694_942_965_096_232_960, + 10_792_142_450_433_898_496, + 12_013_514_580_722_579_456, + 13_373_112_266_084_982_784, + 14_886_578_817_516_689_408, + 16_571_327_936_291_497_984, + 18_446_744_073_709_551_615, ]; diff --git a/relay/paseo/src/governance/mod.rs b/relay/paseo/src/governance/mod.rs index bcea354..39a7188 100644 --- a/relay/paseo/src/governance/mod.rs +++ b/relay/paseo/src/governance/mod.rs @@ -1,20 +1,20 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . -//! New governance configurations for the Paseo runtime. +//! New governance configurations for the Polkadot runtime. use super::*; use crate::xcm_config::CollectivesLocation; @@ -25,73 +25,73 @@ use xcm::latest::BodyId; mod origins; pub use origins::{ - pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, - ReferendumCanceller, ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller, + pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, + ReferendumCanceller, ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller, }; mod tracks; pub use tracks::TracksInfo; parameter_types! { - pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1); + pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1); } impl pallet_conviction_voting::Config for Runtime { - type WeightInfo = weights::pallet_conviction_voting::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type VoteLockingPeriod = VoteLockingPeriod; - type MaxVotes = ConstU32<512>; - type MaxTurnout = - frame_support::traits::tokens::currency::ActiveIssuanceOf; - type Polls = Referenda; + type WeightInfo = weights::pallet_conviction_voting::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type VoteLockingPeriod = VoteLockingPeriod; + type MaxVotes = ConstU32<512>; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; + type Polls = Referenda; } parameter_types! { - pub const AlarmInterval: BlockNumber = 1; - pub const SubmissionDeposit: Balance = 1 * DOLLARS; - pub const UndecidingTimeout: BlockNumber = 14 * DAYS; + pub const AlarmInterval: BlockNumber = 1; + pub const SubmissionDeposit: Balance = 1 * DOLLARS; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; } parameter_types! { - pub const MaxBalance: Balance = Balance::max_value(); + pub const MaxBalance: Balance = Balance::max_value(); } pub type TreasurySpender = EitherOf, Spender>; impl origins::pallet_custom_origins::Config for Runtime {} parameter_types! { - // Fellows pluralistic body. - pub const FellowsBodyId: BodyId = BodyId::Technical; + // Fellows pluralistic body. + pub const FellowsBodyId: BodyId = BodyId::Technical; } impl pallet_whitelist::Config for Runtime { - type WeightInfo = weights::pallet_whitelist::WeightInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type WhitelistOrigin = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, - >; - type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; - type Preimages = Preimage; + type WeightInfo = weights::pallet_whitelist::WeightInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WhitelistOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type Preimages = Preimage; } impl pallet_referenda::Config for Runtime { - type WeightInfo = weights::pallet_referenda::WeightInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type Scheduler = Scheduler; - type Currency = Balances; - type SubmitOrigin = frame_system::EnsureSigned; - type CancelOrigin = EitherOf, ReferendumCanceller>; - type KillOrigin = EitherOf, ReferendumKiller>; - type Slash = Treasury; - type Votes = pallet_conviction_voting::VotesOf; - type Tally = pallet_conviction_voting::TallyOf; - type SubmissionDeposit = SubmissionDeposit; - type MaxQueued = ConstU32<100>; - type UndecidingTimeout = UndecidingTimeout; - type AlarmInterval = AlarmInterval; - type Tracks = TracksInfo; - type Preimages = Preimage; + type WeightInfo = weights::pallet_referenda::WeightInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Currency = Balances; + type SubmitOrigin = frame_system::EnsureSigned; + type CancelOrigin = EitherOf, ReferendumCanceller>; + type KillOrigin = EitherOf, ReferendumKiller>; + type Slash = Treasury; + type Votes = pallet_conviction_voting::VotesOf; + type Tally = pallet_conviction_voting::TallyOf; + type SubmissionDeposit = SubmissionDeposit; + type MaxQueued = ConstU32<100>; + type UndecidingTimeout = UndecidingTimeout; + type AlarmInterval = AlarmInterval; + type Tracks = TracksInfo; + type Preimages = Preimage; } diff --git a/relay/paseo/src/governance/old.rs b/relay/paseo/src/governance/old.rs index 85390b1..f4c2655 100644 --- a/relay/paseo/src/governance/old.rs +++ b/relay/paseo/src/governance/old.rs @@ -1,190 +1,190 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . -//! Old governance configurations for the Paseo runtime. +//! Old governance configurations for the Polkadot runtime. use crate::*; use frame_support::{parameter_types, traits::EitherOfDiverse}; parameter_types! { - pub LaunchPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_LAUNCH_PERIOD"); - pub VotingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1 * MINUTES, "DOT_VOTING_PERIOD"); - pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 1 * MINUTES, "DOT_FAST_TRACK_VOTING_PERIOD"); - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub EnactmentPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_ENACTMENT_PERIOD"); - pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "DOT_COOLOFF_PERIOD"); - pub const InstantAllowed: bool = true; - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; + pub LaunchPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_LAUNCH_PERIOD"); + pub VotingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1 * MINUTES, "DOT_VOTING_PERIOD"); + pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 1 * MINUTES, "DOT_FAST_TRACK_VOTING_PERIOD"); + pub const MinimumDeposit: Balance = 100 * DOLLARS; + pub EnactmentPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_ENACTMENT_PERIOD"); + pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "DOT_COOLOFF_PERIOD"); + pub const InstantAllowed: bool = true; + pub const MaxVotes: u32 = 100; + pub const MaxProposals: u32 = 100; } impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type VoteLockingPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - type SubmitOrigin = frame_system::EnsureSigned; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type EnactmentPeriod = EnactmentPeriod; + type VoteLockingPeriod = EnactmentPeriod; + type LaunchPeriod = LaunchPeriod; + type VotingPeriod = VotingPeriod; + type MinimumDeposit = MinimumDeposit; + type SubmitOrigin = frame_system::EnsureSigned; + /// A straight majority of the council can decide what their next motion is. + type ExternalOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. + type ExternalMajorityOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// A unanimous council can have the next scheduled referendum be a straight default-carries + /// (NTB) vote. + type ExternalDefaultOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote + /// be tabled immediately and with a shorter voting/enactment period. + type FastTrackOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + type InstantOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + type InstantAllowed = InstantAllowed; + type FastTrackVotingPeriod = FastTrackVotingPeriod; + // To cancel a proposal which has been passed, 2/3 of the council must agree to it. + type CancellationOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + EnsureRoot, + >; + // To cancel a proposal before it has been passed, the technical committee must be unanimous or + // Root must agree. + type CancelProposalOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + EnsureRoot, + >; + type BlacklistOrigin = EnsureRoot; + // Any single technical committee member may veto a coming council proposal, however they can + // only do it once and it lasts only for the cooloff period. + type VetoOrigin = pallet_collective::EnsureMember; + type CooloffPeriod = CooloffPeriod; + type Slash = Treasury; + type Scheduler = Scheduler; + type PalletsOrigin = OriginCaller; + type MaxVotes = MaxVotes; + type WeightInfo = weights::pallet_democracy::WeightInfo; + type MaxProposals = MaxProposals; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { - pub CouncilMotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_MOTION_DURATION"); - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; - pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; + pub CouncilMotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_MOTION_DURATION"); + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; } pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_council::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type SetMembersOrigin = EnsureRoot; + type WeightInfo = weights::pallet_collective_council::WeightInfo; + type MaxProposalWeight = MaxProposalWeight; } parameter_types! { - pub const CandidacyBond: Balance = 100 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = deposit(1, 64); - // additional data per vote is 32 bytes (account id). - pub const VotingBondFactor: Balance = deposit(0, 32); - /// Weekly council elections; scaling up to monthly eventually. - pub TermDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_TERM_DURATION"); - /// 13 members initially, to be increased to 23 eventually. - pub const DesiredMembers: u32 = 13; - pub const DesiredRunnersUp: u32 = 20; - pub const MaxVoters: u32 = 10 * 1000; - pub const MaxVotesPerVoter: u32 = 16; - pub const MaxCandidates: u32 = 1000; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; + pub const CandidacyBond: Balance = 100 * DOLLARS; + // 1 storage item created, key size is 32 bytes, value size is 16+16. + pub const VotingBondBase: Balance = deposit(1, 64); + // additional data per vote is 32 bytes (account id). + pub const VotingBondFactor: Balance = deposit(0, 32); + /// Weekly council elections; scaling up to monthly eventually. + pub TermDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_TERM_DURATION"); + /// 13 members initially, to be increased to 23 eventually. + pub const DesiredMembers: u32 = 13; + pub const DesiredRunnersUp: u32 = 20; + pub const MaxVoters: u32 = 10 * 1000; + pub const MaxVotesPerVoter: u32 = 16; + pub const MaxCandidates: u32 = 1000; + pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; } // Make sure that there are no more than `MaxMembers` members elected via phragmen. const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = PhragmenElectionPalletId; - type Currency = Balances; - type ChangeMembers = Council; - type InitializeMembers = Council; - type CurrencyToVote = runtime_common::CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type MaxVoters = MaxVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type MaxCandidates = MaxCandidates; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type PalletId = PhragmenElectionPalletId; + type Currency = Balances; + type ChangeMembers = Council; + type InitializeMembers = Council; + type CurrencyToVote = runtime_common::CurrencyToVote; + type CandidacyBond = CandidacyBond; + type VotingBondBase = VotingBondBase; + type VotingBondFactor = VotingBondFactor; + type LoserCandidate = Treasury; + type KickedMember = Treasury; + type DesiredMembers = DesiredMembers; + type DesiredRunnersUp = DesiredRunnersUp; + type TermDuration = TermDuration; + type MaxVoters = MaxVoters; + type MaxVotesPerVoter = MaxVotesPerVoter; + type MaxCandidates = MaxCandidates; + type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; } parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; + pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; } pub type TechnicalCollective = pallet_collective::Instance2; 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 = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type SetMembersOrigin = EnsureRoot; + type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo; + type MaxProposalWeight = MaxProposalWeight; } impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRoot; - type RemoveOrigin = EnsureRoot; - type SwapOrigin = EnsureRoot; - type ResetOrigin = EnsureRoot; - type PrimeOrigin = EnsureRoot; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = TechnicalMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type AddOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type SwapOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type PrimeOrigin = EnsureRoot; + type MembershipInitialized = TechnicalCommittee; + type MembershipChanged = TechnicalCommittee; + type MaxMembers = TechnicalMaxMembers; + type WeightInfo = weights::pallet_membership::WeightInfo; } diff --git a/relay/paseo/src/governance/origins.rs b/relay/paseo/src/governance/origins.rs index 44a3f43..551e05e 100644 --- a/relay/paseo/src/governance/origins.rs +++ b/relay/paseo/src/governance/origins.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Custom origins for governance interventions. @@ -20,50 +20,50 @@ pub use pallet_custom_origins::*; #[frame_support::pallet] pub mod pallet_custom_origins { - use crate::{Balance, DOLLARS, GRAND}; - use frame_support::pallet_prelude::*; + use crate::{Balance, DOLLARS, GRAND}; + use frame_support::pallet_prelude::*; - #[pallet::config] - pub trait Config: frame_system::Config {} + #[pallet::config] + pub trait Config: frame_system::Config {} - #[pallet::pallet] - pub struct Pallet(_); + #[pallet::pallet] + pub struct Pallet(_); - #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] - #[pallet::origin] - pub enum Origin { - /// Origin able to cancel slashes and manage minimum commission. - StakingAdmin, - /// Origin for spending up to $10,000,000 PAS from the treasury as well as generally - /// administering it. - Treasurer, - /// Origin for managing the composition of the fellowship. - FellowshipAdmin, - /// Origin for managing the registrar and permissioned HRMP channel operations. - GeneralAdmin, - /// Origin for starting auctions. - AuctionAdmin, - /// Origin able to force slot leases. - LeaseAdmin, - /// Origin able to cancel referenda. - ReferendumCanceller, - /// Origin able to kill referenda. - ReferendumKiller, - /// Origin able to spend around $250 from the treasury at once. - SmallTipper, - /// Origin able to spend around $1,000 from the treasury at once. - BigTipper, - /// Origin able to spend around $10,000 from the treasury at once. - SmallSpender, - /// Origin able to spend around $100,000 from the treasury at once. - MediumSpender, - /// Origin able to spend up to $1,000,000 PAS from the treasury at once. - BigSpender, - /// Origin able to dispatch a whitelisted call. - WhitelistedCaller, - } + #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] + #[pallet::origin] + pub enum Origin { + /// Origin able to cancel slashes and manage minimum commission. + StakingAdmin, + /// Origin for spending up to $10,000,000 DOT from the treasury as well as generally + /// administering it. + Treasurer, + /// Origin for managing the composition of the fellowship. + FellowshipAdmin, + /// Origin for managing the registrar and permissioned HRMP channel operations. + GeneralAdmin, + /// Origin for starting auctions. + AuctionAdmin, + /// Origin able to force slot leases. + LeaseAdmin, + /// Origin able to cancel referenda. + ReferendumCanceller, + /// Origin able to kill referenda. + ReferendumKiller, + /// Origin able to spend around $250 from the treasury at once. + SmallTipper, + /// Origin able to spend around $1,000 from the treasury at once. + BigTipper, + /// Origin able to spend around $10,000 from the treasury at once. + SmallSpender, + /// Origin able to spend around $100,000 from the treasury at once. + MediumSpender, + /// Origin able to spend up to $1,000,000 DOT from the treasury at once. + BigSpender, + /// Origin able to dispatch a whitelisted call. + WhitelistedCaller, + } - macro_rules! decl_unit_ensures { + macro_rules! decl_unit_ensures { ( $name:ident: $success_type:ty = $success:expr ) => { pub struct $name; impl> + From> @@ -93,19 +93,19 @@ pub mod pallet_custom_origins { }; () => {} } - decl_unit_ensures!( - StakingAdmin, - Treasurer, - FellowshipAdmin, - GeneralAdmin, - AuctionAdmin, - LeaseAdmin, - ReferendumCanceller, - ReferendumKiller, - WhitelistedCaller, - ); + decl_unit_ensures!( + StakingAdmin, + Treasurer, + FellowshipAdmin, + GeneralAdmin, + AuctionAdmin, + LeaseAdmin, + ReferendumCanceller, + ReferendumKiller, + WhitelistedCaller, + ); - macro_rules! decl_ensure { + macro_rules! decl_ensure { ( $vis:vis type $name:ident: EnsureOrigin { $( $item:ident = $success:expr, )* @@ -138,14 +138,14 @@ pub mod pallet_custom_origins { } } - decl_ensure! { - pub type Spender: EnsureOrigin { - SmallTipper = 250 * DOLLARS, - BigTipper = 1 * GRAND, - SmallSpender = 10 * GRAND, - MediumSpender = 100 * GRAND, - BigSpender = 1_000 * GRAND, - Treasurer = 10_000 * GRAND, - } - } + decl_ensure! { + pub type Spender: EnsureOrigin { + SmallTipper = 250 * DOLLARS, + BigTipper = 1 * GRAND, + SmallSpender = 10 * GRAND, + MediumSpender = 100 * GRAND, + BigSpender = 1_000 * GRAND, + Treasurer = 10_000 * GRAND, + } + } } diff --git a/relay/paseo/src/governance/tracks.rs b/relay/paseo/src/governance/tracks.rs index 5eb9f41..6d9f62c 100644 --- a/relay/paseo/src/governance/tracks.rs +++ b/relay/paseo/src/governance/tracks.rs @@ -1,319 +1,319 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Track configurations for governance. use super::*; const fn percent(x: i32) -> sp_arithmetic::FixedI64 { - sp_arithmetic::FixedI64::from_rational(x as u128, 100) + sp_arithmetic::FixedI64::from_rational(x as u128, 100) } use pallet_referenda::Curve; const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_STAKING_ADMIN: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_FELLOWSHIP_ADMIN: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_GENERAL_ADMIN: Curve = - Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_GENERAL_ADMIN: Curve = - Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); const APP_AUCTION_ADMIN: Curve = - Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_AUCTION_ADMIN: Curve = - Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); const APP_LEASE_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_LEASE_ADMIN: Curve = Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_REFERENDUM_CANCELLER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_REFERENDUM_KILLER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50)); const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50)); const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_SMALL_SPENDER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100)); const SUP_MEDIUM_SPENDER: Curve = - Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100)); const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50)); const APP_WHITELISTED_CALLER: Curve = - Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); const SUP_WHITELISTED_CALLER: Curve = - Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); + Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15] = [ - ( - 0, - pallet_referenda::TrackInfo { - name: "root", - max_deciding: 1, - decision_deposit: 100 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 24 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_ROOT, - min_support: SUP_ROOT, - }, - ), - ( - 1, - pallet_referenda::TrackInfo { - name: "whitelisted_caller", - max_deciding: 100, - decision_deposit: 10 * GRAND, - prepare_period: 30 * MINUTES, - decision_period: 28 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 10 * MINUTES, - min_approval: APP_WHITELISTED_CALLER, - min_support: SUP_WHITELISTED_CALLER, - }, - ), - ( - 10, - pallet_referenda::TrackInfo { - name: "staking_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_STAKING_ADMIN, - min_support: SUP_STAKING_ADMIN, - }, - ), - ( - 11, - pallet_referenda::TrackInfo { - name: "treasurer", - max_deciding: 10, - decision_deposit: 1 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_TREASURER, - min_support: SUP_TREASURER, - }, - ), - ( - 12, - pallet_referenda::TrackInfo { - name: "lease_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_LEASE_ADMIN, - min_support: SUP_LEASE_ADMIN, - }, - ), - ( - 13, - pallet_referenda::TrackInfo { - name: "fellowship_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_FELLOWSHIP_ADMIN, - min_support: SUP_FELLOWSHIP_ADMIN, - }, - ), - ( - 14, - pallet_referenda::TrackInfo { - name: "general_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_GENERAL_ADMIN, - min_support: SUP_GENERAL_ADMIN, - }, - ), - ( - 15, - pallet_referenda::TrackInfo { - name: "auction_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_AUCTION_ADMIN, - min_support: SUP_AUCTION_ADMIN, - }, - ), - ( - 20, - pallet_referenda::TrackInfo { - name: "referendum_canceller", - max_deciding: 1_000, - decision_deposit: 10 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 7 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_REFERENDUM_CANCELLER, - min_support: SUP_REFERENDUM_CANCELLER, - }, - ), - ( - 21, - pallet_referenda::TrackInfo { - name: "referendum_killer", - max_deciding: 1_000, - decision_deposit: 50 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_REFERENDUM_KILLER, - min_support: SUP_REFERENDUM_KILLER, - }, - ), - ( - 30, - pallet_referenda::TrackInfo { - name: "small_tipper", - max_deciding: 200, - decision_deposit: 1 * DOLLARS, - prepare_period: 1 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 1 * MINUTES, - min_approval: APP_SMALL_TIPPER, - min_support: SUP_SMALL_TIPPER, - }, - ), - ( - 31, - pallet_referenda::TrackInfo { - name: "big_tipper", - max_deciding: 100, - decision_deposit: 10 * DOLLARS, - prepare_period: 10 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 1 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_BIG_TIPPER, - min_support: SUP_BIG_TIPPER, - }, - ), - ( - 32, - pallet_referenda::TrackInfo { - name: "small_spender", - max_deciding: 50, - decision_deposit: 100 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 12 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_SMALL_SPENDER, - min_support: SUP_SMALL_SPENDER, - }, - ), - ( - 33, - pallet_referenda::TrackInfo { - name: "medium_spender", - max_deciding: 50, - decision_deposit: 200 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 24 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_MEDIUM_SPENDER, - min_support: SUP_MEDIUM_SPENDER, - }, - ), - ( - 34, - pallet_referenda::TrackInfo { - name: "big_spender", - max_deciding: 50, - decision_deposit: 400 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 48 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_BIG_SPENDER, - min_support: SUP_BIG_SPENDER, - }, - ), + ( + 0, + pallet_referenda::TrackInfo { + name: "root", + max_deciding: 1, + decision_deposit: 100 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_ROOT, + min_support: SUP_ROOT, + }, + ), + ( + 1, + pallet_referenda::TrackInfo { + name: "whitelisted_caller", + max_deciding: 100, + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, + decision_period: 28 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, + min_approval: APP_WHITELISTED_CALLER, + min_support: SUP_WHITELISTED_CALLER, + }, + ), + ( + 10, + pallet_referenda::TrackInfo { + name: "staking_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_STAKING_ADMIN, + min_support: SUP_STAKING_ADMIN, + }, + ), + ( + 11, + pallet_referenda::TrackInfo { + name: "treasurer", + max_deciding: 10, + decision_deposit: 1 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 7 * DAYS, + min_enactment_period: 24 * HOURS, + min_approval: APP_TREASURER, + min_support: SUP_TREASURER, + }, + ), + ( + 12, + pallet_referenda::TrackInfo { + name: "lease_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_LEASE_ADMIN, + min_support: SUP_LEASE_ADMIN, + }, + ), + ( + 13, + pallet_referenda::TrackInfo { + name: "fellowship_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_FELLOWSHIP_ADMIN, + min_support: SUP_FELLOWSHIP_ADMIN, + }, + ), + ( + 14, + pallet_referenda::TrackInfo { + name: "general_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_GENERAL_ADMIN, + min_support: SUP_GENERAL_ADMIN, + }, + ), + ( + 15, + pallet_referenda::TrackInfo { + name: "auction_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_AUCTION_ADMIN, + min_support: SUP_AUCTION_ADMIN, + }, + ), + ( + 20, + pallet_referenda::TrackInfo { + name: "referendum_canceller", + max_deciding: 1_000, + decision_deposit: 10 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_CANCELLER, + min_support: SUP_REFERENDUM_CANCELLER, + }, + ), + ( + 21, + pallet_referenda::TrackInfo { + name: "referendum_killer", + max_deciding: 1_000, + decision_deposit: 50 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_KILLER, + min_support: SUP_REFERENDUM_KILLER, + }, + ), + ( + 30, + pallet_referenda::TrackInfo { + name: "small_tipper", + max_deciding: 200, + decision_deposit: 1 * DOLLARS, + prepare_period: 1 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 1 * MINUTES, + min_approval: APP_SMALL_TIPPER, + min_support: SUP_SMALL_TIPPER, + }, + ), + ( + 31, + pallet_referenda::TrackInfo { + name: "big_tipper", + max_deciding: 100, + decision_deposit: 10 * DOLLARS, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_BIG_TIPPER, + min_support: SUP_BIG_TIPPER, + }, + ), + ( + 32, + pallet_referenda::TrackInfo { + name: "small_spender", + max_deciding: 50, + decision_deposit: 100 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 2 * DAYS, + min_enactment_period: 24 * HOURS, + min_approval: APP_SMALL_SPENDER, + min_support: SUP_SMALL_SPENDER, + }, + ), + ( + 33, + pallet_referenda::TrackInfo { + name: "medium_spender", + max_deciding: 50, + decision_deposit: 200 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 4 * DAYS, + min_enactment_period: 24 * HOURS, + min_approval: APP_MEDIUM_SPENDER, + min_support: SUP_MEDIUM_SPENDER, + }, + ), + ( + 34, + pallet_referenda::TrackInfo { + name: "big_spender", + max_deciding: 50, + decision_deposit: 400 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 7 * DAYS, + min_enactment_period: 24 * HOURS, + min_approval: APP_BIG_SPENDER, + min_support: SUP_BIG_SPENDER, + }, + ), ]; pub struct TracksInfo; impl pallet_referenda::TracksInfo for TracksInfo { - type Id = u16; - type RuntimeOrigin = ::PalletsOrigin; - fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { - &TRACKS_DATA[..] - } - fn track_for(id: &Self::RuntimeOrigin) -> Result { - if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { - match system_origin { - frame_system::RawOrigin::Root => Ok(0), - _ => Err(()), - } - } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { - match custom_origin { - origins::Origin::WhitelistedCaller => Ok(1), - // General admin - origins::Origin::StakingAdmin => Ok(10), - origins::Origin::Treasurer => Ok(11), - origins::Origin::LeaseAdmin => Ok(12), - origins::Origin::FellowshipAdmin => Ok(13), - origins::Origin::GeneralAdmin => Ok(14), - origins::Origin::AuctionAdmin => Ok(15), - // Referendum admins - origins::Origin::ReferendumCanceller => Ok(20), - origins::Origin::ReferendumKiller => Ok(21), - // Limited treasury spenders - origins::Origin::SmallTipper => Ok(30), - origins::Origin::BigTipper => Ok(31), - origins::Origin::SmallSpender => Ok(32), - origins::Origin::MediumSpender => Ok(33), - origins::Origin::BigSpender => Ok(34), - } - } else { - Err(()) - } - } + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + &TRACKS_DATA[..] + } + fn track_for(id: &Self::RuntimeOrigin) -> Result { + if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { + match system_origin { + frame_system::RawOrigin::Root => Ok(0), + _ => Err(()), + } + } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { + match custom_origin { + origins::Origin::WhitelistedCaller => Ok(1), + // General admin + origins::Origin::StakingAdmin => Ok(10), + origins::Origin::Treasurer => Ok(11), + origins::Origin::LeaseAdmin => Ok(12), + origins::Origin::FellowshipAdmin => Ok(13), + origins::Origin::GeneralAdmin => Ok(14), + origins::Origin::AuctionAdmin => Ok(15), + // Referendum admins + origins::Origin::ReferendumCanceller => Ok(20), + origins::Origin::ReferendumKiller => Ok(21), + // Limited treasury spenders + origins::Origin::SmallTipper => Ok(30), + origins::Origin::BigTipper => Ok(31), + origins::Origin::SmallSpender => Ok(32), + origins::Origin::MediumSpender => Ok(33), + origins::Origin::BigSpender => Ok(34), + } + } else { + Err(()) + } + } } pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); diff --git a/relay/paseo/src/lib.rs b/relay/paseo/src/lib.rs index 065fda1..ddae0d8 100644 --- a/relay/paseo/src/lib.rs +++ b/relay/paseo/src/lib.rs @@ -1,20 +1,20 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . -//! The Paseo runtime. This can be compiled with `#[no_std]`, ready for Wasm. +//! The Polkadot runtime. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. @@ -22,44 +22,47 @@ use pallet_transaction_payment::CurrencyAdapter; use runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, impls::{ - DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, - VersionedMultiLocationConverter, - }, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate + auctions, claims, crowdloan, impl_runtime_weights, + impls::{ + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, + VersionedMultiLocationConverter, + }, + paras_registrar, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, + SlowAdjustingFeeUpdate, }; use runtime_parachains::{ - assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - inclusion::{AggregateMessageOrigin, UmpQueueId}, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, - paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v7 as parachains_runtime_api_impl, - scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, + assigner_parachains as parachains_assigner_parachains, + configuration as parachains_configuration, disputes as parachains_disputes, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, + paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, + runtime_api_impl::v7 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::{ - ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, - mmr::{BeefyDataProvider, MmrLeafVersion}, + ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, + mmr::{BeefyDataProvider, MmrLeafVersion}, }; use frame_election_provider_support::{ - bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, + bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, }; use frame_support::{ - construct_runtime, - genesis_builder_helper::{build_config, create_default_config}, - parameter_types, - traits::{ - fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Get, InstanceFilter, - KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, - WithdrawReasons, - }, - weights::{ConstantMultiplier, WeightMeter}, - PalletId, + construct_runtime, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, + traits::{ + fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Get, InstanceFilter, + KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, + WithdrawReasons, + }, + weights::{ConstantMultiplier, WeightMeter}, + PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; @@ -69,24 +72,24 @@ use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::{ - slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, + slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, + CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, + Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, + OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, + PARACHAIN_KEY_TYPE_ID, }; use sp_core::{OpaqueMetadata, H256}; use sp_runtime::{ - create_runtime_str, - curve::PiecewiseLinear, - generic, impl_opaque_keys, - traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, - IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, - }, - transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, + create_runtime_str, + curve::PiecewiseLinear, + generic, impl_opaque_keys, + traits::{ + AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, + IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, + }, + transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; @@ -94,8 +97,8 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::{ - latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, - VersionedMultiLocation, + latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, + VersionedMultiLocation, }; use xcm_builder::PayOverXcm; @@ -110,7 +113,7 @@ pub use pallet_timestamp::Call as TimestampCall; pub use sp_runtime::BuildStorage; /// Constant values used within the runtime. -use paseo_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; +use polkadot_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; // Weights used in the runtime. mod weights; @@ -120,560 +123,520 @@ mod bag_thresholds; // Governance configurations. pub mod governance; use governance::{ - pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin, - Treasurer, TreasurySpender, + pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin, + Treasurer, TreasurySpender, }; pub mod xcm_config; -pub const LOG_TARGET: &'static str = "runtime::paseo"; +pub const LOG_TARGET: &'static str = "runtime::polkadot"; -impl_runtime_weights!(paseo_runtime_constants); +impl_runtime_weights!(polkadot_runtime_constants); // Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -// Paseo version identifier; -/// Runtime version (Paseo). +// Polkadot version identifier; +/// Runtime version (Polkadot). #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("paseo"), - impl_name: create_runtime_str!("paseo-testnet"), - authoring_version: 0, - spec_version: 1_001_003, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 25, - state_version: 0, + spec_name: create_runtime_str!("polkadot"), + impl_name: create_runtime_str!("parity-polkadot"), + authoring_version: 0, + spec_version: 1_001_003, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 25, + state_version: 0, }; /// The BABE epoch configuration at genesis. pub const BABE_GENESIS_EPOCH_CONFIG: babe_primitives::BabeEpochConfiguration = - babe_primitives::BabeEpochConfiguration { - c: PRIMARY_PROBABILITY, - allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, - }; + babe_primitives::BabeEpochConfiguration { + c: PRIMARY_PROBABILITY, + allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, + }; /// Native version. #[cfg(any(feature = "std", test))] pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } } parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u8 = 42; + pub const Version: RuntimeVersion = VERSION; + pub const SS58Prefix: u8 = 0; } impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = BlockWeights; - type BlockLength = BlockLength; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = Nonce; - type Hash = Hash; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = AccountIdLookup; - type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type DbWeight = RocksDbWeight; - type Version = Version; - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = weights::frame_system::WeightInfo; - type SS58Prefix = SS58Prefix; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = BlockWeights; + type BlockLength = BlockLength; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = Nonce; + type Hash = Hash; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = AccountIdLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * - BlockWeights::get().max_block; - pub const MaxScheduledPerBlock: u32 = 50; - pub const NoPreimagePostponement: Option = Some(10); + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + BlockWeights::get().max_block; + pub const MaxScheduledPerBlock: u32 = 50; + pub const NoPreimagePostponement: Option = Some(10); } /// Used the compare the privilege of an origin inside the scheduler. pub struct OriginPrivilegeCmp; impl PrivilegeCmp for OriginPrivilegeCmp { - fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option { - if left == right { - return Some(Ordering::Equal); - } + fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option { + if left == right { + return Some(Ordering::Equal) + } - match (left, right) { - // Root is greater than anything. - (OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater), - // For every other origin we don't care, as they are not used for `ScheduleOrigin`. - _ => None, - } - } + match (left, right) { + // Root is greater than anything. + (OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater), + // For every other origin we don't care, as they are not used for `ScheduleOrigin`. + _ => None, + } + } } impl pallet_scheduler::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type PalletsOrigin = OriginCaller; - type RuntimeCall = RuntimeCall; - type MaximumWeight = MaximumSchedulerWeight; - // The goal of having ScheduleOrigin include AuctionAdmin is to allow the auctions track of - // OpenGov to schedule periodic auctions. - // Also allow Treasurer to schedule recurring payments. - type ScheduleOrigin = EitherOf, AuctionAdmin>, Treasurer>; - type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type OriginPrivilegeCmp = OriginPrivilegeCmp; - type Preimages = Preimage; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + // The goal of having ScheduleOrigin include AuctionAdmin is to allow the auctions track of + // OpenGov to schedule periodic auctions. + // Also allow Treasurer to schedule recurring payments. + type ScheduleOrigin = EitherOf, AuctionAdmin>, Treasurer>; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = weights::pallet_scheduler::WeightInfo; + type OriginPrivilegeCmp = OriginPrivilegeCmp; + type Preimages = Preimage; } parameter_types! { - pub const PreimageBaseDeposit: Balance = deposit(2, 64); - pub const PreimageByteDeposit: Balance = deposit(0, 1); - pub const PreimageHoldReason: RuntimeHoldReason = - RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); + pub const PreimageBaseDeposit: Balance = deposit(2, 64); + pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type ManagerOrigin = EnsureRoot; - type Consideration = HoldConsideration< - AccountId, - Balances, - PreimageHoldReason, - LinearStoragePrice, - >; + type WeightInfo = weights::pallet_preimage::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type ManagerOrigin = EnsureRoot; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { - pub EpochDuration: u64 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS as u64, - 2 * MINUTES as u64, - "DOT_EPOCH_DURATION" - ); - pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; - pub ReportLongevity: u64 = - BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); + pub EpochDuration: u64 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS as u64, + 2 * MINUTES as u64, + "DOT_EPOCH_DURATION" + ); + pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; + pub ReportLongevity: u64 = + BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); } impl pallet_babe::Config for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; + type EpochDuration = EpochDuration; + type ExpectedBlockTime = ExpectedBlockTime; - // session module is the trigger - type EpochChangeTrigger = pallet_babe::ExternalTrigger; + // session module is the trigger + type EpochChangeTrigger = pallet_babe::ExternalTrigger; - type DisabledValidators = Session; + type DisabledValidators = Session; - type WeightInfo = (); + type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; - type KeyOwnerProof = - >::Proof; + type KeyOwnerProof = + >::Proof; - type EquivocationReportSystem = - pallet_babe::EquivocationReportSystem; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; } parameter_types! { - pub const IndexDeposit: Balance = 10 * DOLLARS; + pub const IndexDeposit: Balance = 10 * DOLLARS; } impl pallet_indices::Config for Runtime { - type AccountIndex = AccountIndex; - type Currency = Balances; - type Deposit = IndexDeposit; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_indices::WeightInfo; + type AccountIndex = AccountIndex; + type Currency = Balances; + type Deposit = IndexDeposit; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_indices::WeightInfo; } parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; } impl pallet_balances::Config for Runtime { - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances::WeightInfo; - type RuntimeHoldReason = RuntimeHoldReason; - type RuntimeFreezeReason = RuntimeFreezeReason; - type FreezeIdentifier = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; - type MaxFreezes = ConstU32<8>; + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = weights::pallet_balances::WeightInfo; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = RuntimeFreezeReason; + type MaxHolds = ConstU32<1>; + type MaxFreezes = ConstU32<8>; } parameter_types! { - pub BeefySetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); + pub BeefySetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_beefy::Config for Runtime { - type BeefyId = BeefyId; - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = BeefySetIdSessionEntries; - type OnNewValidatorSet = BeefyMmrLeaf; - type WeightInfo = (); - type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_beefy::EquivocationReportSystem; + type BeefyId = BeefyId; + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxSetIdSessionEntries = BeefySetIdSessionEntries; + type OnNewValidatorSet = BeefyMmrLeaf; + type WeightInfo = (); + type KeyOwnerProof = >::Proof; + type EquivocationReportSystem = + pallet_beefy::EquivocationReportSystem; } impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; - type Hashing = Keccak256; - type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; - type WeightInfo = (); - type LeafData = pallet_beefy_mmr::Pallet; + const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; + type Hashing = Keccak256; + type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; + type WeightInfo = (); + type LeafData = pallet_beefy_mmr::Pallet; } /// MMR helper types. mod mmr { - use super::Runtime; - pub use pallet_mmr::primitives::*; + use super::Runtime; + pub use pallet_mmr::primitives::*; - pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hashing = ::Hashing; - pub type Hash = ::Output; + pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; + pub type Hashing = ::Hashing; + pub type Hash = ::Output; } parameter_types! { - /// Version of the produced MMR leaf. - /// - /// The version consists of two parts; - /// - `major` (3 bits) - /// - `minor` (5 bits) - /// - /// `major` should be updated only if decoding the previous MMR Leaf format from the payload - /// is not possible (i.e. backward incompatible change). - /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE - /// encoding does not prevent old leafs from being decoded. - /// - /// Hence we expect `major` to be changed really rarely (think never). - /// See [`MmrLeafVersion`] type documentation for more details. - pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); + /// Version of the produced MMR leaf. + /// + /// The version consists of two parts; + /// - `major` (3 bits) + /// - `minor` (5 bits) + /// + /// `major` should be updated only if decoding the previous MMR Leaf format from the payload + /// is not possible (i.e. backward incompatible change). + /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE + /// encoding does not prevent old leafs from being decoded. + /// + /// Hence we expect `major` to be changed really rarely (think never). + /// See [`MmrLeafVersion`] type documentation for more details. + pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); } /// A BEEFY data provider that merkelizes all the parachain heads at the current block /// (sorted by their parachain id). pub struct ParaHeadsRootProvider; impl BeefyDataProvider for ParaHeadsRootProvider { - fn extra_data() -> H256 { - let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() - .into_iter() - .filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0))) - .collect(); - para_heads.sort_by_key(|k| k.0); - binary_merkle_tree::merkle_root::( - para_heads.into_iter().map(|pair| pair.encode()), - ) - .into() - } + fn extra_data() -> H256 { + let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() + .into_iter() + .filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0))) + .collect(); + para_heads.sort_by_key(|k| k.0); + binary_merkle_tree::merkle_root::( + para_heads.into_iter().map(|pair| pair.encode()), + ) + .into() + } } impl pallet_beefy_mmr::Config for Runtime { - type LeafVersion = LeafVersion; - type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; - type LeafExtra = H256; - type BeefyDataProvider = ParaHeadsRootProvider; + type LeafVersion = LeafVersion; + type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; + type LeafExtra = H256; + type BeefyDataProvider = ParaHeadsRootProvider; } parameter_types! { - pub const TransactionByteFee: Balance = 10 * MILLICENTS; - /// This value increases the priority of `Operational` transactions by adding - /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. - pub const OperationalFeeMultiplier: u8 = 5; + pub const TransactionByteFee: Balance = 10 * MILLICENTS; + /// This value increases the priority of `Operational` transactions by adding + /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. + pub const OperationalFeeMultiplier: u8 = 5; } impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; - type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = CurrencyAdapter>; + type OperationalFeeMultiplier = OperationalFeeMultiplier; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; } parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; } impl pallet_timestamp::Config for Runtime { - type Moment = u64; - type OnTimestampSet = Babe; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; + type Moment = u64; + type OnTimestampSet = Babe; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (Staking, ImOnline); + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (Staking, ImOnline); } impl_opaque_keys! { - pub struct OldSessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - } -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - pub beefy: Beefy, - } -} - -// remove this when removing `OldSessionKeys` -fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - im_online: old.im_online, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: { - // From Session::upgrade_keys(): - // - // Care should be taken that the raw versions of the - // added keys are unique for every `ValidatorId, KeyTypeId` combination. - // This is an invariant that the session pallet typically maintains internally. - // - // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination. - let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into(); - let id_raw: &mut [u8] = id.as_mut(); - id_raw[1..33].copy_from_slice(v.as_ref()); - id_raw[0..4].copy_from_slice(b"beef"); - id - }, - } + pub struct SessionKeys { + pub grandpa: Grandpa, + pub babe: Babe, + pub im_online: ImOnline, + pub para_validator: Initializer, + pub para_assignment: ParaSessionInfo, + pub authority_discovery: AuthorityDiscovery, + pub beefy: Beefy, + } } impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = AccountId; - type ValidatorIdOf = pallet_staking::StashOf; - type ShouldEndSession = Babe; - type NextSessionRotation = Babe; - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = weights::pallet_session::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type ValidatorId = AccountId; + type ValidatorIdOf = pallet_staking::StashOf; + type ShouldEndSession = Babe; + type NextSessionRotation = Babe; + type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; } impl pallet_session::historical::Config for Runtime { - type FullIdentification = pallet_staking::Exposure; - type FullIdentificationOf = pallet_staking::ExposureOf; + type FullIdentification = pallet_staking::Exposure; + type FullIdentificationOf = pallet_staking::ExposureOf; } parameter_types! { - // phase durations. 1/4 of the last session for each. - // in testing: 1min or half of the session for each - pub SignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "DOT_SIGNED_PHASE" - ); - pub UnsignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "DOT_UNSIGNED_PHASE" - ); - - // signed config - pub const SignedMaxSubmissions: u32 = 16; - pub const SignedMaxRefunds: u32 = 16 / 4; - pub const SignedFixedDeposit: Balance = deposit(2, 0); - pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); - // 0.01 PAS per KB of solution data. - pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; - // Each good submission will get 1 PAS as reward - pub SignedRewardBase: Balance = 1 * UNITS; - pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); - - // 4 hour session, 1 hour unsigned phase, 32 offchain executions. - pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32; - - pub const MaxElectingVoters: u32 = 22_500; - /// We take the top 22500 nominators as electing voters and all of the validators as electable - /// targets. Whilst this is the case, we cannot and shall not increase the size of the - /// validator intentions. - pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = - ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); - /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet - /// cannot have active validators higher than this count. - pub const MaxActiveValidators: u32 = 1200; + // phase durations. 1/4 of the last session for each. + // in testing: 1min or half of the session for each + pub SignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), + "DOT_SIGNED_PHASE" + ); + pub UnsignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), + "DOT_UNSIGNED_PHASE" + ); + + // signed config + pub const SignedMaxSubmissions: u32 = 16; + pub const SignedMaxRefunds: u32 = 16 / 4; + pub const SignedFixedDeposit: Balance = deposit(2, 0); + pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); + // 0.01 DOT per KB of solution data. + pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; + // Each good submission will get 1 DOT as reward + pub SignedRewardBase: Balance = 1 * UNITS; + pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); + + // 4 hour session, 1 hour unsigned phase, 32 offchain executions. + pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32; + + pub const MaxElectingVoters: u32 = 22_500; + /// We take the top 22500 nominators as electing voters and all of the validators as electable + /// targets. Whilst this is the case, we cannot and shall not increase the size of the + /// validator intentions. + pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = + ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); + /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet + /// cannot have active validators higher than this count. + pub const MaxActiveValidators: u32 = 1200; } generate_solution_type!( - #[compact] - pub struct NposCompactSolution16::< - VoterIndex = u32, - TargetIndex = u16, - Accuracy = sp_runtime::PerU16, - MaxVoters = MaxElectingVoters, - >(16) + #[compact] + pub struct NposCompactSolution16::< + VoterIndex = u32, + TargetIndex = u16, + Accuracy = sp_runtime::PerU16, + MaxVoters = MaxElectingVoters, + >(16) ); pub struct OnChainSeqPhragmen; impl onchain::Config for OnChainSeqPhragmen { - type System = Runtime; - type Solver = SequentialPhragmen; - type DataProvider = Staking; - type WeightInfo = weights::frame_election_provider_support::WeightInfo; - type MaxWinners = MaxActiveValidators; - type Bounds = ElectionBounds; + type System = Runtime; + type Solver = SequentialPhragmen; + type DataProvider = Staking; + type WeightInfo = weights::frame_election_provider_support::WeightInfo; + type MaxWinners = MaxActiveValidators; + type Bounds = ElectionBounds; } impl pallet_election_provider_multi_phase::MinerConfig for Runtime { - type AccountId = AccountId; - type MaxLength = OffchainSolutionLengthLimit; - type MaxWeight = OffchainSolutionWeightLimit; - type Solution = NposCompactSolution16; - type MaxVotesPerVoter = < + type AccountId = AccountId; + type MaxLength = OffchainSolutionLengthLimit; + type MaxWeight = OffchainSolutionWeightLimit; + type Solution = NposCompactSolution16; + type MaxVotesPerVoter = < ::DataProvider as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; - type MaxWinners = MaxActiveValidators; + type MaxWinners = MaxActiveValidators; - // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their - // weight estimate function is wired to this call's weight. - fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { - < + // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their + // weight estimate function is wired to this call's weight. + fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { + < ::WeightInfo as pallet_election_provider_multi_phase::WeightInfo >::submit_unsigned(v, t, a, d) - } + } } impl pallet_election_provider_multi_phase::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EstimateCallFee = TransactionPayment; - type SignedPhase = SignedPhase; - type UnsignedPhase = UnsignedPhase; - type SignedMaxSubmissions = SignedMaxSubmissions; - type SignedMaxRefunds = SignedMaxRefunds; - type SignedRewardBase = SignedRewardBase; - type SignedDepositBase = - GeometricDepositBase; - type SignedDepositByte = SignedDepositByte; - type SignedDepositWeight = (); - type SignedMaxWeight = - ::MaxWeight; - type MinerConfig = Self; - type SlashHandler = (); // burn slashes - type RewardHandler = (); // nothing to do upon rewards - type BetterUnsignedThreshold = BetterUnsignedThreshold; - type BetterSignedThreshold = (); - type OffchainRepeat = OffchainRepeat; - type MinerTxPriority = NposSolutionPriority; - type DataProvider = Staking; - #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] - type Fallback = onchain::OnChainExecution; - #[cfg(not(any(feature = "fast-runtime", feature = "runtime-benchmarks")))] - type Fallback = frame_election_provider_support::NoElection<( - AccountId, - BlockNumber, - Staking, - MaxActiveValidators, - )>; - type GovernanceFallback = onchain::OnChainExecution; - type Solver = SequentialPhragmen< - AccountId, - pallet_election_provider_multi_phase::SolutionAccuracyOf, - (), - >; - type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EitherOf, StakingAdmin>; - type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; - type MaxWinners = MaxActiveValidators; - type ElectionBounds = ElectionBounds; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type EstimateCallFee = TransactionPayment; + type SignedPhase = SignedPhase; + type UnsignedPhase = UnsignedPhase; + type SignedMaxSubmissions = SignedMaxSubmissions; + type SignedMaxRefunds = SignedMaxRefunds; + type SignedRewardBase = SignedRewardBase; + type SignedDepositBase = + GeometricDepositBase; + type SignedDepositByte = SignedDepositByte; + type SignedDepositWeight = (); + type SignedMaxWeight = + ::MaxWeight; + type MinerConfig = Self; + type SlashHandler = (); // burn slashes + type RewardHandler = (); // nothing to do upon rewards + type BetterUnsignedThreshold = BetterUnsignedThreshold; + type BetterSignedThreshold = (); + type OffchainRepeat = OffchainRepeat; + type MinerTxPriority = NposSolutionPriority; + type DataProvider = Staking; + #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] + type Fallback = onchain::OnChainExecution; + #[cfg(not(any(feature = "fast-runtime", feature = "runtime-benchmarks")))] + type Fallback = frame_election_provider_support::NoElection<( + AccountId, + BlockNumber, + Staking, + MaxActiveValidators, + )>; + type GovernanceFallback = onchain::OnChainExecution; + type Solver = SequentialPhragmen< + AccountId, + pallet_election_provider_multi_phase::SolutionAccuracyOf, + (), + >; + type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; + type ForceOrigin = EitherOf, StakingAdmin>; + type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; + type MaxWinners = MaxActiveValidators; + type ElectionBounds = ElectionBounds; } parameter_types! { - pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS; + pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS; } type VoterBagsListInstance = pallet_bags_list::Instance1; impl pallet_bags_list::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ScoreProvider = Staking; - type WeightInfo = weights::pallet_bags_list::WeightInfo; - type BagThresholds = BagThresholds; - type Score = sp_npos_elections::VoteWeight; + type RuntimeEvent = RuntimeEvent; + type ScoreProvider = Staking; + type WeightInfo = weights::pallet_bags_list::WeightInfo; + type BagThresholds = BagThresholds; + type Score = sp_npos_elections::VoteWeight; } // TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and // re-built in case input parameters have changed. The `ideal_stake` should be determined by the // amount of parachain slots being bid on: this should be around `(75 - 25.min(slots / 4))%`. pallet_staking_reward_curve::build! { - const REWARD_CURVE: PiecewiseLinear<'static> = curve!( - min_inflation: 0_025_000, - max_inflation: 0_100_000, - // 3:2:1 staked : parachains : float. - // while there's no parachains, then this is 75% staked : 25% float. - ideal_stake: 0_750_000, - falloff: 0_050_000, - max_piece_count: 40, - test_precision: 0_005_000, - ); + const REWARD_CURVE: PiecewiseLinear<'static> = curve!( + min_inflation: 0_025_000, + max_inflation: 0_100_000, + // 3:2:1 staked : parachains : float. + // while there's no parachains, then this is 75% staked : 25% float. + ideal_stake: 0_750_000, + falloff: 0_050_000, + max_piece_count: 40, + test_precision: 0_005_000, + ); } parameter_types! { - // Six sessions in an era (24 hours). - pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); - - // 28 eras for unbonding (28 days). - pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( - 28, - 28, - "DOT_BONDING_DURATION" - ); - pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( - 27, - 27, - "DOT_SLASH_DEFER_DURATION" - ); - pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxNominatorRewardedPerValidator: u32 = 512; - pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); - // 16 - pub const MaxNominations: u32 = ::LIMIT as u32; -} - -/// Custom version of `runtime_commong::era_payout` somewhat tailored for Paseo's crowdloan + // Six sessions in an era (24 hours). + pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); + + // 28 eras for unbonding (28 days). + pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( + 28, + 28, + "DOT_BONDING_DURATION" + ); + pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( + 27, + 27, + "DOT_SLASH_DEFER_DURATION" + ); + pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; + pub const MaxNominatorRewardedPerValidator: u32 = 512; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); + // 16 + pub const MaxNominations: u32 = ::LIMIT as u32; +} + +/// Custom version of `runtime_commong::era_payout` somewhat tailored for Polkadot's crowdloan /// unlock history. The only tweak should be /// /// ```diff @@ -683,495 +646,487 @@ parameter_types! { /// /// See . fn polkadot_era_payout( - total_staked: Balance, - total_stakable: Balance, - max_annual_inflation: Perquintill, - period_fraction: Perquintill, - auctioned_slots: u64, + total_staked: Balance, + total_stakable: Balance, + max_annual_inflation: Perquintill, + period_fraction: Perquintill, + auctioned_slots: u64, ) -> (Balance, Balance) { - use pallet_staking_reward_fn::compute_inflation; - use sp_runtime::traits::Saturating; + use pallet_staking_reward_fn::compute_inflation; + use sp_runtime::traits::Saturating; - let min_annual_inflation = Perquintill::from_rational(25u64, 1000u64); - let delta_annual_inflation = max_annual_inflation.saturating_sub(min_annual_inflation); + let min_annual_inflation = Perquintill::from_rational(25u64, 1000u64); + let delta_annual_inflation = max_annual_inflation.saturating_sub(min_annual_inflation); - // 20% reserved for up to 60 slots. - let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); + // 20% reserved for up to 60 slots. + let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); - // Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the - // amount that we expect to be taken up with auctions. - let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); + // Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the + // amount that we expect to be taken up with auctions. + let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); - let stake = Perquintill::from_rational(total_staked, total_stakable); - let falloff = Perquintill::from_percent(5); - let adjustment = compute_inflation(stake, ideal_stake, falloff); - let staking_inflation = - min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); + let stake = Perquintill::from_rational(total_staked, total_stakable); + let falloff = Perquintill::from_percent(5); + let adjustment = compute_inflation(stake, ideal_stake, falloff); + let staking_inflation = + min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); - let max_payout = period_fraction * max_annual_inflation * total_stakable; - let staking_payout = (period_fraction * staking_inflation) * total_stakable; - let rest = max_payout.saturating_sub(staking_payout); + let max_payout = period_fraction * max_annual_inflation * total_stakable; + let staking_payout = (period_fraction * staking_inflation) * total_stakable; + let rest = max_payout.saturating_sub(staking_payout); - let other_issuance = total_stakable.saturating_sub(total_staked); - if total_staked > other_issuance { - let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; - // We don't do anything with this, but if we wanted to, we could introduce a cap on the - // treasury amount with: `rest = rest.min(cap_rest);` - } - (staking_payout, rest) + let other_issuance = total_stakable.saturating_sub(total_staked); + if total_staked > other_issuance { + let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; + // We don't do anything with this, but if we wanted to, we could introduce a cap on the + // treasury amount with: `rest = rest.min(cap_rest);` + } + (staking_payout, rest) } pub struct EraPayout; impl pallet_staking::EraPayout for EraPayout { - fn era_payout( - total_staked: Balance, - total_issuance: Balance, - era_duration_millis: u64, - ) -> (Balance, Balance) { - // all para-ids that are not active. - let auctioned_slots = Paras::parachains() - .into_iter() - // all active para-ids that do not belong to a system chain is the number - // of parachains that we should take into account for inflation. - .filter(|i| *i >= LOWEST_PUBLIC_ID) - .count() as u64; - - const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); - const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; - - polkadot_era_payout( - total_staked, - total_issuance, - MAX_ANNUAL_INFLATION, - Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), - auctioned_slots, - ) - } + fn era_payout( + total_staked: Balance, + total_issuance: Balance, + era_duration_millis: u64, + ) -> (Balance, Balance) { + // all para-ids that are not active. + let auctioned_slots = Paras::parachains() + .into_iter() + // all active para-ids that do not belong to a system chain is the number + // of parachains that we should take into account for inflation. + .filter(|i| *i >= LOWEST_PUBLIC_ID) + .count() as u64; + + const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); + const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; + + polkadot_era_payout( + total_staked, + total_issuance, + MAX_ANNUAL_INFLATION, + Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), + auctioned_slots, + ) + } } impl pallet_staking::Config for Runtime { - type Currency = Balances; - type CurrencyBalance = Balance; - type UnixTime = Timestamp; - type CurrencyToVote = CurrencyToVote; - type RewardRemainder = Treasury; - type RuntimeEvent = RuntimeEvent; - type Slash = Treasury; - type Reward = (); - type SessionsPerEra = SessionsPerEra; - type BondingDuration = BondingDuration; - type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EitherOf, StakingAdmin>; - type SessionInterface = Self; - type EraPayout = EraPayout; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; - type OffendingValidatorsThreshold = OffendingValidatorsThreshold; - type NextNewSession = Session; - type ElectionProvider = ElectionProviderMultiPhase; - type GenesisElectionProvider = onchain::OnChainExecution; - type VoterList = VoterList; - type TargetList = UseValidatorsMap; - type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; - type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; - type HistoryDepth = frame_support::traits::ConstU32<84>; - type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; - type EventListeners = NominationPools; - type WeightInfo = weights::pallet_staking::WeightInfo; + type Currency = Balances; + type CurrencyBalance = Balance; + type UnixTime = Timestamp; + type CurrencyToVote = CurrencyToVote; + type RewardRemainder = Treasury; + type RuntimeEvent = RuntimeEvent; + type Slash = Treasury; + type Reward = (); + type SessionsPerEra = SessionsPerEra; + type BondingDuration = BondingDuration; + type SlashDeferDuration = SlashDeferDuration; + type AdminOrigin = EitherOf, StakingAdmin>; + type SessionInterface = Self; + type EraPayout = EraPayout; + type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; + type NextNewSession = Session; + type ElectionProvider = ElectionProviderMultiPhase; + type GenesisElectionProvider = onchain::OnChainExecution; + type VoterList = VoterList; + type TargetList = UseValidatorsMap; + type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; + type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; + type HistoryDepth = frame_support::traits::ConstU32<84>; + type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; + type EventListeners = NominationPools; + type WeightInfo = weights::pallet_staking::WeightInfo; } impl pallet_fast_unstake::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BatchSize = frame_support::traits::ConstU32<16>; - type Deposit = frame_support::traits::ConstU128<{ UNITS }>; - type ControlOrigin = EnsureRoot; - type Staking = Staking; - type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; - type WeightInfo = weights::pallet_fast_unstake::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BatchSize = frame_support::traits::ConstU32<16>; + type Deposit = frame_support::traits::ConstU128<{ UNITS }>; + type ControlOrigin = EnsureRoot; + type Staking = Staking; + type MaxErasToCheckPerBlock = ConstU32<1>; + #[cfg(feature = "runtime-benchmarks")] + type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; + type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } parameter_types! { - // Minimum 4 CENTS/byte - pub const BasicDeposit: Balance = deposit(1, 258); - pub const FieldDeposit: Balance = deposit(0, 66); - pub const SubAccountDeposit: Balance = deposit(1, 53); - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; + // Minimum 4 CENTS/byte + pub const BasicDeposit: Balance = deposit(1, 258); + pub const FieldDeposit: Balance = deposit(0, 66); + pub const SubAccountDeposit: Balance = deposit(1, 53); + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; } impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; - type IdentityInformation = IdentityInfo; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; - type WeightInfo = weights::pallet_identity::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = IdentityInfo; + type MaxRegistrars = MaxRegistrars; + type Slashed = Treasury; + type ForceOrigin = EitherOf, GeneralAdmin>; + type RegistrarOrigin = EitherOf, GeneralAdmin>; + type WeightInfo = weights::pallet_identity::WeightInfo; } parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 100 * DOLLARS; - pub const ProposalBondMaximum: Balance = 500 * DOLLARS; - pub const SpendPeriod: BlockNumber = 24 * DAYS; - pub const Burn: Permill = Permill::from_percent(1); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; - // The asset's interior location for the paying account. This is the Treasury - // pallet instance (which sits at index 19). - pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); - - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(20); - pub const TipReportDepositBase: Balance = 1 * DOLLARS; - pub const DataDepositPerByte: Balance = 1 * CENTS; - pub const MaxApprovals: u32 = 100; - pub const MaxAuthorities: u32 = 100_000; - pub const MaxKeys: u32 = 10_000; - pub const MaxPeerInHeartbeats: u32 = 10_000; - pub const RootSpendOriginMaxAmount: Balance = Balance::MAX; - pub const CouncilSpendOriginMaxAmount: Balance = Balance::MAX; + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 100 * DOLLARS; + pub const ProposalBondMaximum: Balance = 500 * DOLLARS; + pub const SpendPeriod: BlockNumber = 24 * DAYS; + pub const Burn: Permill = Permill::from_percent(1); + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + // The asset's interior location for the paying account. This is the Treasury + // pallet instance (which sits at index 19). + pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); + + pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipFindersFee: Percent = Percent::from_percent(20); + pub const TipReportDepositBase: Balance = 1 * DOLLARS; + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const MaxApprovals: u32 = 100; + pub const MaxAuthorities: u32 = 100_000; + pub const MaxKeys: u32 = 10_000; + pub const MaxPeerInHeartbeats: u32 = 10_000; + pub const RootSpendOriginMaxAmount: Balance = Balance::MAX; + pub const CouncilSpendOriginMaxAmount: Balance = Balance::MAX; } impl pallet_treasury::Config for Runtime { - type PalletId = TreasuryPalletId; - type Currency = Balances; - type ApproveOrigin = EitherOfDiverse, Treasurer>; - type RejectOrigin = EitherOfDiverse, Treasurer>; - type RuntimeEvent = RuntimeEvent; - type OnSlash = Treasury; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type ProposalBondMaximum = ProposalBondMaximum; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = (); - type SpendFunds = Bounties; - type MaxApprovals = MaxApprovals; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type SpendOrigin = TreasurySpender; - type AssetKind = VersionedLocatableAsset; - type Beneficiary = VersionedMultiLocation; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayOverXcm< - TreasuryInteriorLocation, - crate::xcm_config::XcmRouter, - crate::XcmPallet, - ConstU32<{ 6 * HOURS }>, - Self::Beneficiary, - Self::AssetKind, - LocatableAssetConverter, - VersionedMultiLocationConverter, - >; - type BalanceConverter = AssetRate; - type PayoutPeriod = PayoutSpendPeriod; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; + type PalletId = TreasuryPalletId; + type Currency = Balances; + type ApproveOrigin = EitherOfDiverse, Treasurer>; + type RejectOrigin = EitherOfDiverse, Treasurer>; + type RuntimeEvent = RuntimeEvent; + type OnSlash = Treasury; + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type ProposalBondMaximum = ProposalBondMaximum; + type SpendPeriod = SpendPeriod; + type Burn = Burn; + type BurnDestination = (); + type SpendFunds = Bounties; + type MaxApprovals = MaxApprovals; + type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedMultiLocation; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayOverXcm< + TreasuryInteriorLocation, + crate::xcm_config::XcmRouter, + crate::XcmPallet, + ConstU32<{ 6 * HOURS }>, + Self::Beneficiary, + Self::AssetKind, + LocatableAssetConverter, + VersionedMultiLocationConverter, + >; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; } parameter_types! { - pub const BountyDepositBase: Balance = 1 * DOLLARS; - pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const MaximumReasonLength: u32 = 16384; - pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); - pub const CuratorDepositMin: Balance = 10 * DOLLARS; - pub const CuratorDepositMax: Balance = 200 * DOLLARS; - pub const BountyValueMinimum: Balance = 10 * DOLLARS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); + pub const CuratorDepositMin: Balance = 10 * DOLLARS; + pub const CuratorDepositMax: Balance = 200 * DOLLARS; + pub const BountyValueMinimum: Balance = 10 * DOLLARS; } impl pallet_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type CuratorDepositMultiplier = CuratorDepositMultiplier; - type CuratorDepositMin = CuratorDepositMin; - type CuratorDepositMax = CuratorDepositMax; - type BountyValueMinimum = BountyValueMinimum; - type ChildBountyManager = ChildBounties; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_bounties::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type CuratorDepositMultiplier = CuratorDepositMultiplier; + type CuratorDepositMin = CuratorDepositMin; + type CuratorDepositMax = CuratorDepositMax; + type BountyValueMinimum = BountyValueMinimum; + type ChildBountyManager = ChildBounties; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = weights::pallet_bounties::WeightInfo; } parameter_types! { - pub const MaxActiveChildBountyCount: u32 = 100; - pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; + pub const MaxActiveChildBountyCount: u32 = 100; + pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; } impl pallet_child_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type MaxActiveChildBountyCount = MaxActiveChildBountyCount; - type ChildBountyValueMinimum = ChildBountyValueMinimum; - type WeightInfo = weights::pallet_child_bounties::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type MaxActiveChildBountyCount = MaxActiveChildBountyCount; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type WeightInfo = weights::pallet_child_bounties::WeightInfo; } impl pallet_offences::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = Staking; + type RuntimeEvent = RuntimeEvent; + type IdentificationTuple = pallet_session::historical::IdentificationTuple; + type OnOffenceHandler = Staking; } impl pallet_authority_discovery::Config for Runtime { - type MaxAuthorities = MaxAuthorities; + type MaxAuthorities = MaxAuthorities; } parameter_types! { - pub NposSolutionPriority: TransactionPriority = - Perbill::from_percent(90) * TransactionPriority::max_value(); - pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); + pub NposSolutionPriority: TransactionPriority = + Perbill::from_percent(90) * TransactionPriority::max_value(); + pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); } impl pallet_im_online::Config for Runtime { - type AuthorityId = ImOnlineId; - type RuntimeEvent = RuntimeEvent; - type ValidatorSet = Historical; - type NextSessionRotation = Babe; - type ReportUnresponsiveness = Offences; - type UnsignedPriority = ImOnlineUnsignedPriority; - type WeightInfo = weights::pallet_im_online::WeightInfo; - type MaxKeys = MaxKeys; - type MaxPeerInHeartbeats = MaxPeerInHeartbeats; + type AuthorityId = ImOnlineId; + type RuntimeEvent = RuntimeEvent; + type ValidatorSet = Historical; + type NextSessionRotation = Babe; + type ReportUnresponsiveness = Offences; + type UnsignedPriority = ImOnlineUnsignedPriority; + type WeightInfo = weights::pallet_im_online::WeightInfo; + type MaxKeys = MaxKeys; + type MaxPeerInHeartbeats = MaxPeerInHeartbeats; } parameter_types! { - pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); + pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; + type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type WeightInfo = (); + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxSetIdSessionEntries = MaxSetIdSessionEntries; - type KeyOwnerProof = >::Proof; + type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; } /// Submits a transaction with the node's public and signature type. Adheres to the signed extension /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - RuntimeCall: From, + RuntimeCall: From, { - fn create_transaction>( - call: RuntimeCall, - public: ::Signer, - account: AccountId, - nonce: ::Nonce, - ) -> Option<( - RuntimeCall, - ::SignaturePayload, - )> { - use sp_runtime::traits::StaticLookup; - // take the biggest period possible. - let period = BlockHashCount::get() - .checked_next_power_of_two() - .map(|c| c / 2) - .unwrap_or(2) as u64; - - let current_block = System::block_number() - .saturated_into::() - // The `System::block_number` is initialized with `n+1`, - // so the actual block number is `n`. - .saturating_sub(1); - let tip = 0; - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::mortal( - period, - current_block, - )), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), - claims::PrevalidateAttests::::new(), - ); - let raw_payload = SignedPayload::new(call, extra) - .map_err(|e| { - log::warn!(target: LOG_TARGET, "Unable to create signed payload: {:?}", e); - }) - .ok()?; - let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; - let (call, extra, _) = raw_payload.deconstruct(); - let address = ::Lookup::unlookup(account); - Some((call, (address, signature, extra))) - } + fn create_transaction>( + call: RuntimeCall, + public: ::Signer, + account: AccountId, + nonce: ::Nonce, + ) -> Option<(RuntimeCall, ::SignaturePayload)> { + use sp_runtime::traits::StaticLookup; + // take the biggest period possible. + let period = + BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; + + let current_block = System::block_number() + .saturated_into::() + // The `System::block_number` is initialized with `n+1`, + // so the actual block number is `n`. + .saturating_sub(1); + let tip = 0; + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from(generic::Era::mortal( + period, + current_block, + )), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + claims::PrevalidateAttests::::new(), + ); + let raw_payload = SignedPayload::new(call, extra) + .map_err(|e| { + log::warn!(target: LOG_TARGET, "Unable to create signed payload: {:?}", e); + }) + .ok()?; + let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; + let (call, extra, _) = raw_payload.deconstruct(); + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) + } } impl frame_system::offchain::SigningTypes for Runtime { - type Public = ::Signer; - type Signature = Signature; + type Public = ::Signer; + type Signature = Signature; } impl frame_system::offchain::SendTransactionTypes for Runtime where - RuntimeCall: From, + RuntimeCall: From, { - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; + type Extrinsic = UncheckedExtrinsic; + type OverarchingCall = RuntimeCall; } parameter_types! { - // Deposit for a parathread (on-demand parachain) - pub const ParathreadDeposit: Balance = 500 * DOLLARS; - pub const MaxRetries: u32 = 3; + // Deposit for a parathread (on-demand parachain) + pub const ParathreadDeposit: Balance = 500 * DOLLARS; + pub const MaxRetries: u32 = 3; } parameter_types! { - pub Prefix: &'static [u8] = b"Pay DOTs to the Paseo account:"; + pub Prefix: &'static [u8] = b"Pay DOTs to the Polkadot account:"; } impl claims::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type VestingSchedule = Vesting; - type Prefix = Prefix; - /// Only Root can move a claim. - type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type VestingSchedule = Vesting; + type Prefix = Prefix; + /// Only Root can move a claim. + type MoveClaimOrigin = EnsureRoot; + type WeightInfo = weights::runtime_common_claims::WeightInfo; } parameter_types! { - pub const MinVestedTransfer: Balance = 1 * DOLLARS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); + pub const MinVestedTransfer: Balance = 1 * DOLLARS; + pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = + WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); } impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = weights::pallet_vesting::WeightInfo; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - const MAX_VESTING_SCHEDULES: u32 = 28; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = weights::pallet_vesting::WeightInfo; + type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + const MAX_VESTING_SCHEDULES: u32 = 28; } impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = weights::pallet_utility::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; } parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); - pub const MaxSignatories: u32 = 100; + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u32 = 100; } impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = weights::pallet_multisig::WeightInfo; } parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const MaxProxies: u16 = 32; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); - pub const MaxPending: u16 = 32; + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const MaxPending: u16 = 32; } /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - scale_info::TypeInfo, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { - Any = 0, - NonTransfer = 1, - Governance = 2, - Staking = 3, - // Skip 4 as it is now removed (was SudoBalances) - IdentityJudgement = 5, - CancelProxy = 6, - Auction = 7, - NominationPools = 8, + Any = 0, + NonTransfer = 1, + Governance = 2, + Staking = 3, + // Skip 4 as it is now removed (was SudoBalances) + IdentityJudgement = 5, + CancelProxy = 6, + Auction = 7, + NominationPools = 8, } #[cfg(test)] mod proxy_type_tests { - use super::*; - - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] - pub enum OldProxyType { - Any, - NonTransfer, - Governance, - Staking, - SudoBalances, - IdentityJudgement, - } - - #[test] - fn proxy_type_decodes_correctly() { - for (i, j) in vec![ - (OldProxyType::Any, ProxyType::Any), - (OldProxyType::NonTransfer, ProxyType::NonTransfer), - (OldProxyType::Governance, ProxyType::Governance), - (OldProxyType::Staking, ProxyType::Staking), - ( - OldProxyType::IdentityJudgement, - ProxyType::IdentityJudgement, - ), - ] - .into_iter() - { - assert_eq!(i.encode(), j.encode()); - } - assert!(ProxyType::decode(&mut &OldProxyType::SudoBalances.encode()[..]).is_err()); - } + use super::*; + + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] + pub enum OldProxyType { + Any, + NonTransfer, + Governance, + Staking, + SudoBalances, + IdentityJudgement, + } + + #[test] + fn proxy_type_decodes_correctly() { + for (i, j) in vec![ + (OldProxyType::Any, ProxyType::Any), + (OldProxyType::NonTransfer, ProxyType::NonTransfer), + (OldProxyType::Governance, ProxyType::Governance), + (OldProxyType::Staking, ProxyType::Staking), + (OldProxyType::IdentityJudgement, ProxyType::IdentityJudgement), + ] + .into_iter() + { + assert_eq!(i.encode(), j.encode()); + } + assert!(ProxyType::decode(&mut &OldProxyType::SudoBalances.encode()[..]).is_err()); + } } impl Default for ProxyType { - fn default() -> Self { - Self::Any - } + fn default() -> Self { + Self::Any + } } impl InstanceFilter for ProxyType { - fn filter(&self, c: &RuntimeCall) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => matches!( - c, - RuntimeCall::System(..) | + fn filter(&self, c: &RuntimeCall) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => matches!( + c, + RuntimeCall::System(..) | RuntimeCall::Scheduler(..) | RuntimeCall::Babe(..) | RuntimeCall::Timestamp(..) | @@ -1208,465 +1163,452 @@ impl InstanceFilter for ProxyType { RuntimeCall::VoterList(..) | RuntimeCall::NominationPools(..) | RuntimeCall::FastUnstake(..) - ), - ProxyType::Governance => matches!( - c, - RuntimeCall::Treasury(..) - | RuntimeCall::Bounties(..) - | RuntimeCall::Utility(..) - | RuntimeCall::ChildBounties(..) - | RuntimeCall::ConvictionVoting(..) - | RuntimeCall::Referenda(..) - | RuntimeCall::Whitelist(..) - ), - ProxyType::Staking => { - matches!( - c, - RuntimeCall::Staking(..) - | RuntimeCall::Session(..) - | RuntimeCall::Utility(..) - | RuntimeCall::FastUnstake(..) - | RuntimeCall::VoterList(..) - | RuntimeCall::NominationPools(..) - ) - } - ProxyType::NominationPools => { - matches!( - c, - RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..) - ) - } - ProxyType::IdentityJudgement => matches!( - c, - RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) - | RuntimeCall::Utility(..) - ), - ProxyType::CancelProxy => { - matches!( - c, - RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) - ) - } - ProxyType::Auction => matches!( - c, - RuntimeCall::Auctions(..) - | RuntimeCall::Crowdloan(..) - | RuntimeCall::Registrar(..) - | RuntimeCall::Slots(..) - ), - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } + ), + ProxyType::Governance => matches!( + c, + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::Whitelist(..) + ), + ProxyType::Staking => { + matches!( + c, + RuntimeCall::Staking(..) | + RuntimeCall::Session(..) | RuntimeCall::Utility(..) | + RuntimeCall::FastUnstake(..) | + RuntimeCall::VoterList(..) | + RuntimeCall::NominationPools(..) + ) + }, + ProxyType::NominationPools => { + matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) + }, + ProxyType::IdentityJudgement => matches!( + c, + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) + ), + ProxyType::CancelProxy => { + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) + }, + ProxyType::Auction => matches!( + c, + RuntimeCall::Auctions(..) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Registrar(..) | + RuntimeCall::Slots(..) + ), + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } } impl pallet_proxy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = MaxProxies; + type WeightInfo = weights::pallet_proxy::WeightInfo; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; } impl parachains_origin::Config for Runtime {} impl parachains_configuration::Config for Runtime { - type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; + type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; } impl parachains_shared::Config for Runtime {} impl parachains_session_info::Config for Runtime { - type ValidatorSet = Historical; + type ValidatorSet = Historical; } impl parachains_inclusion::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DisputesHandler = ParasDisputes; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type MessageQueue = MessageQueue; - type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type DisputesHandler = ParasDisputes; + type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { - pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); + pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); } impl parachains_paras::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::runtime_parachains_paras::WeightInfo; - type UnsignedPriority = ParasUnsignedPriority; - type QueueFootprinter = ParaInclusion; - type NextSessionRotation = Babe; - type OnNewHead = Registrar; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::runtime_parachains_paras::WeightInfo; + type UnsignedPriority = ParasUnsignedPriority; + type QueueFootprinter = ParaInclusion; + type NextSessionRotation = Babe; + type OnNewHead = Registrar; } parameter_types! { - /// Amount of weight that can be spent per block to service messages. - /// - /// # WARNING - /// - /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 8; + /// Amount of weight that can be spent per block to service messages. + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - meter: &mut WeightMeter, - id: &mut [u8; 32], - ) -> Result { - let para = match origin { - AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, - }; - xcm_builder::ProcessXcmMessage::< - Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, Junction::Parachain(para.into()), meter, id) - } + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + id: &mut [u8; 32], + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter, id) + } } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = MessageQueueHeapSize; - type MaxStale = MessageQueueMaxStale; - type ServiceWeight = MessageQueueServiceWeight; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = MessageProcessor; - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = ParaInclusion; - type QueuePausedQuery = (); - type WeightInfo = weights::pallet_message_queue::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = ParaInclusion; + type QueuePausedQuery = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type ChannelManager = EitherOf, GeneralAdmin>; - type Currency = Balances; - type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type ChannelManager = EitherOf, GeneralAdmin>; + type Currency = Balances; + type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } impl parachains_paras_inherent::Config for Runtime { - type WeightInfo = weights::runtime_parachains_paras_inherent::WeightInfo; + type WeightInfo = weights::runtime_parachains_paras_inherent::WeightInfo; } impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; + type AssignmentProvider = ParaAssignmentProvider; } impl parachains_assigner_parachains::Config for Runtime {} impl parachains_initializer::Config for Runtime { - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type ForceOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; + type ForceOrigin = EnsureRoot; + type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; } impl parachains_disputes::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes; - type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes; + type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; } impl parachains_slashing::Config for Runtime { - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleReports = parachains_slashing::SlashingReportHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; - type WeightInfo = weights::runtime_parachains_disputes_slashing::WeightInfo; - type BenchmarkingConfig = parachains_slashing::BenchConfig<1000>; + type KeyOwnerProofSystem = Historical; + type KeyOwnerProof = + >::Proof; + type KeyOwnerIdentification = >::IdentificationTuple; + type HandleReports = parachains_slashing::SlashingReportHandler< + Self::KeyOwnerIdentification, + Offences, + ReportLongevity, + >; + type WeightInfo = weights::runtime_parachains_disputes_slashing::WeightInfo; + type BenchmarkingConfig = parachains_slashing::BenchConfig<1000>; } parameter_types! { - // Mostly arbitrary deposit price, but should provide an adequate incentive not to spam reserve - // `ParaId`s. - pub const ParaDeposit: Balance = 100 * DOLLARS; - pub const ParaDataByteDeposit: Balance = deposit(0, 1); + // Mostly arbitrary deposit price, but should provide an adequate incentive not to spam reserve + // `ParaId`s. + pub const ParaDeposit: Balance = 100 * DOLLARS; + pub const ParaDataByteDeposit: Balance = deposit(0, 1); } impl paras_registrar::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type OnSwap = (Crowdloan, Slots); - type ParaDeposit = ParaDeposit; - type DataDepositPerByte = ParaDataByteDeposit; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type OnSwap = (Crowdloan, Slots); + type ParaDeposit = ParaDeposit; + type DataDepositPerByte = ParaDataByteDeposit; + type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; } parameter_types! { - // 12 weeks = 3 months per lease period -> 8 lease periods ~ 2 years - pub LeasePeriod: BlockNumber = prod_or_fast!(1 * WEEKS, 1 * DAYS, "DOT_LEASE_PERIOD"); + // 12 weeks = 3 months per lease period -> 8 lease periods ~ 2 years + pub LeasePeriod: BlockNumber = prod_or_fast!(12 * WEEKS, 12 * WEEKS, "DOT_LEASE_PERIOD"); + // Polkadot Genesis was on May 26, 2020. + // Target Parachain Onboarding Date: Dec 15, 2021. + // Difference is 568 days. + // We want a lease period to start on the target onboarding date. + // 568 % (12 * 7) = 64 day offset + pub LeaseOffset: BlockNumber = prod_or_fast!(64 * DAYS, 0, "DOT_LEASE_OFFSET"); } impl slots::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Registrar = Registrar; - type LeasePeriod = LeasePeriod; - type LeaseOffset = (); - type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type Registrar = Registrar; + type LeasePeriod = LeasePeriod; + type LeaseOffset = LeaseOffset; + type ForceOrigin = EitherOf, LeaseAdmin>; + type WeightInfo = weights::runtime_common_slots::WeightInfo; } parameter_types! { - pub const CrowdloanId: PalletId = PalletId(*b"py/cfund"); - // Accounts for 10_000 contributions, each using 48 bytes (16 bytes for balance, and 32 bytes - // for a memo). - pub const SubmissionDeposit: Balance = deposit(1, 480_000); - // The minimum crowdloan contribution. - pub const MinContribution: Balance = 5 * DOLLARS; - pub const RemoveKeysLimit: u32 = 1000; - // Allow 32 bytes for an additional memo to a crowdloan. - pub const MaxMemoLength: u8 = 32; + pub const CrowdloanId: PalletId = PalletId(*b"py/cfund"); + // Accounts for 10_000 contributions, each using 48 bytes (16 bytes for balance, and 32 bytes + // for a memo). + pub const SubmissionDeposit: Balance = deposit(1, 480_000); + // The minimum crowdloan contribution. + pub const MinContribution: Balance = 5 * DOLLARS; + pub const RemoveKeysLimit: u32 = 1000; + // Allow 32 bytes for an additional memo to a crowdloan. + pub const MaxMemoLength: u8 = 32; } impl crowdloan::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = CrowdloanId; - type SubmissionDeposit = SubmissionDeposit; - type MinContribution = MinContribution; - type RemoveKeysLimit = RemoveKeysLimit; - type Registrar = Registrar; - type Auctioneer = Auctions; - type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type PalletId = CrowdloanId; + type SubmissionDeposit = SubmissionDeposit; + type MinContribution = MinContribution; + type RemoveKeysLimit = RemoveKeysLimit; + type Registrar = Registrar; + type Auctioneer = Auctions; + type MaxMemoLength = MaxMemoLength; + type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; } parameter_types! { - // The average auction is 7 days long, so this will be 70% for ending period. - // 5 Days = 72000 Blocks @ 6 sec per block - pub const EndingPeriod: BlockNumber = 5 * DAYS; - // ~ 1000 samples per day -> ~ 20 blocks per sample -> 2 minute samples - pub const SampleLength: BlockNumber = 2 * MINUTES; + // The average auction is 7 days long, so this will be 70% for ending period. + // 5 Days = 72000 Blocks @ 6 sec per block + pub const EndingPeriod: BlockNumber = 5 * DAYS; + // ~ 1000 samples per day -> ~ 20 blocks per sample -> 2 minute samples + pub const SampleLength: BlockNumber = 2 * MINUTES; } impl auctions::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Leaser = Slots; - type Registrar = Registrar; - type EndingPeriod = EndingPeriod; - type SampleLength = SampleLength; - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Leaser = Slots; + type Registrar = Registrar; + type EndingPeriod = EndingPeriod; + type SampleLength = SampleLength; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; + type InitiateOrigin = EitherOf, AuctionAdmin>; + type WeightInfo = weights::runtime_common_auctions::WeightInfo; } parameter_types! { - pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); - // Allow pools that got slashed up to 90% to remain operational. - pub const MaxPointsToBalance: u8 = 10; + pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); + // Allow pools that got slashed up to 90% to remain operational. + pub const MaxPointsToBalance: u8 = 10; } impl pallet_nomination_pools::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type RuntimeFreezeReason = RuntimeFreezeReason; - type RewardCounter = FixedU128; - type BalanceToU256 = runtime_common::BalanceToU256; - type U256ToBalance = runtime_common::U256ToBalance; - type Staking = Staking; - type PostUnbondingPoolsWindow = frame_support::traits::ConstU32<4>; - type MaxMetadataLen = frame_support::traits::ConstU32<256>; - // we use the same number of allowed unlocking chunks as with staking. - type MaxUnbonding = ::MaxUnlockingChunks; - type PalletId = PoolsPalletId; - type MaxPointsToBalance = MaxPointsToBalance; - type WeightInfo = weights::pallet_nomination_pools::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; + type RewardCounter = FixedU128; + type BalanceToU256 = runtime_common::BalanceToU256; + type U256ToBalance = runtime_common::U256ToBalance; + type Staking = Staking; + type PostUnbondingPoolsWindow = frame_support::traits::ConstU32<4>; + type MaxMetadataLen = frame_support::traits::ConstU32<256>; + // we use the same number of allowed unlocking chunks as with staking. + type MaxUnbonding = ::MaxUnlockingChunks; + type PalletId = PoolsPalletId; + type MaxPointsToBalance = MaxPointsToBalance; + type WeightInfo = weights::pallet_nomination_pools::WeightInfo; } pub struct InitiateNominationPools; impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - // 5 PAS to join a pool. - pallet_nomination_pools::MinJoinBond::::put(5 * UNITS); - // 100 PAS to create a pool. - pallet_nomination_pools::MinCreateBond::::put(100 * UNITS); - - // Initialize with limits for now. - pallet_nomination_pools::MaxPools::::put(0); - pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); - pallet_nomination_pools::MaxPoolMembers::::put(0); - - log::info!(target: LOG_TARGET, "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: LOG_TARGET, "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // we use one as an indicator if this has already been set. + if pallet_nomination_pools::MaxPools::::get().is_none() { + // 5 DOT to join a pool. + pallet_nomination_pools::MinJoinBond::::put(5 * UNITS); + // 100 DOT to create a pool. + pallet_nomination_pools::MinCreateBond::::put(100 * UNITS); + + // Initialize with limits for now. + pallet_nomination_pools::MaxPools::::put(0); + pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); + pallet_nomination_pools::MaxPoolMembers::::put(0); + + log::info!(target: LOG_TARGET, "pools config initiated 🎉"); + ::DbWeight::get().reads_writes(1, 5) + } else { + log::info!(target: LOG_TARGET, "pools config already initiated 😏"); + ::DbWeight::get().reads(1) + } + } } impl pallet_asset_rate::Config for Runtime { - type WeightInfo = weights::pallet_asset_rate::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type CreateOrigin = EitherOfDiverse, Treasurer>; - type RemoveOrigin = EitherOfDiverse, Treasurer>; - type UpdateOrigin = EitherOfDiverse, Treasurer>; - type Currency = Balances; - type AssetKind = ::AssetKind; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EitherOfDiverse, Treasurer>; + type RemoveOrigin = EitherOfDiverse, Treasurer>; + type UpdateOrigin = EitherOfDiverse, Treasurer>; + type Currency = Balances; + type AssetKind = ::AssetKind; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; } -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = weights::pallet_sudo::WeightInfo; -} - -impl paras_sudo_wrapper::Config for Runtime {} - construct_runtime! { - pub enum Runtime - { - // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 1, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 10, - - // Babe must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, - - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 4, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 5, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 32, - - // Consensus support. - // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. - Authorship: pallet_authorship::{Pallet, Storage} = 6, - Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 7, - Offences: pallet_offences::{Pallet, Storage, Event} = 8, - Historical: session_historical::{Pallet} = 33, - - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 9, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 11, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 12, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 13, - - // OpenGov stuff. - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 19, - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, - Origins: pallet_custom_origins::{Origin} = 22, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 23, - - // Claims. Usable initially. - Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 24, - // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 25, - // Cunning utilities. Usable initially. - Utility: pallet_utility::{Pallet, Call, Event} = 26, - - // Identity. Late addition. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 28, - - // Proxy module. Late addition. - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 29, - - // Multisig dispatch. Late addition. - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 30, - - // Bounties modules. - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 34, - ChildBounties: pallet_child_bounties = 38, - - // Election pallet. Only works with staking, but placed here to maintain indices. - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 36, - - // Provides a semi-sorted list of nominators for staking. - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, - - // Nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, - - // Fast unstake pallet: extension to staking. - FastUnstake: pallet_fast_unstake = 40, - - // Parachains pallets. Start indices at 50 to leave room. - ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, - ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, - ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, - Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - Dmp: parachains_dmp::{Pallet, Storage} = 58, - // Ump 59 - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, - ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, - ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, - ParaAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64, - - // Parachain Onboarding Pallets. Start indices at 70 to leave room. - Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, - Slots: slots::{Pallet, Call, Storage, Event} = 71, - Auctions: auctions::{Pallet, Call, Storage, Event} = 72, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, - - // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, - - // Generalized message queue - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, - - // Asset rate. - AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, - - // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, - // MMR leaf construction must be after session in order to have a leaf's next_auth_set - // refer to block. See issue #160 for details. - Mmr: pallet_mmr = 201, - BeefyMmrLeaf: pallet_beefy_mmr = 202, - - // Sudo. - ParaSudoWrapper: paras_sudo_wrapper = 250, - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, - } + pub enum Runtime + { + // Basic stuff; balances is uncallable initially. + System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 1, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 10, + + // Babe must be before session. + Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, + + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, + Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 4, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 5, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 32, + + // Consensus support. + // Authorship must be before session in order to note author in the correct session and era + // for im-online and staking. + Authorship: pallet_authorship::{Pallet, Storage} = 6, + Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 7, + Offences: pallet_offences::{Pallet, Storage, Event} = 8, + Historical: session_historical::{Pallet} = 33, + + Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 9, + Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 11, + ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 12, + AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 13, + + // OpenGov stuff. + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 19, + ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, + Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, + Origins: pallet_custom_origins::{Origin} = 22, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 23, + + // Claims. Usable initially. + Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 24, + // Vesting. Usable initially, but removed once all vesting is finished. + Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 25, + // Cunning utilities. Usable initially. + Utility: pallet_utility::{Pallet, Call, Event} = 26, + + // Identity. Late addition. + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 28, + + // Proxy module. Late addition. + Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 29, + + // Multisig dispatch. Late addition. + Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 30, + + // Bounties modules. + Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 34, + ChildBounties: pallet_child_bounties = 38, + + // Election pallet. Only works with staking, but placed here to maintain indices. + ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 36, + + // Provides a semi-sorted list of nominators for staking. + VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, + + // Nomination pools: extension to staking. + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, + + // Fast unstake pallet: extension to staking. + FastUnstake: pallet_fast_unstake = 40, + + // Parachains pallets. Start indices at 50 to leave room. + ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, + Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, + ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, + ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, + ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, + ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, + Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, + Dmp: parachains_dmp::{Pallet, Storage} = 58, + // Ump 59 + Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, + ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, + ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, + ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, + ParaAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64, + + // Parachain Onboarding Pallets. Start indices at 70 to leave room. + Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, + Slots: slots::{Pallet, Call, Storage, Event} = 71, + Auctions: auctions::{Pallet, Call, Storage, Event} = 72, + Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, + + // Pallet for sending XCM. + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + + // Generalized message queue + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, + + // Asset rate. + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, + + // BEEFY Bridges support. + Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, + // MMR leaf construction must be after session in order to have a leaf's next_auth_set + // refer to block. See issue #160 for details. + Mmr: pallet_mmr = 201, + BeefyMmrLeaf: pallet_beefy_mmr = 202, + } } /// The address format for describing accounts. @@ -1681,22 +1623,22 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckMortality, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - claims::PrevalidateAttests, + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckMortality, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, + claims::PrevalidateAttests, ); pub struct NominationPoolsMigrationV4OldPallet; impl Get for NominationPoolsMigrationV4OldPallet { - fn get() -> Perbill { - Perbill::zero() - } + fn get() -> Perbill { + Perbill::zero() + } } /// All migrations that will run on the next runtime upgrade. @@ -1708,38 +1650,21 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::*; - - /// Upgrade Session keys to include BEEFY key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - fn on_runtime_upgrade() -> Weight { - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - } - - /// Unreleased migrations. Add new ones here: - pub type Unreleased = ( - // Upgrade SessionKeys to include BEEFY key - UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, - ); + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); } /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Migrations, + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, >; /// The payload being signed in transactions. @@ -1747,1144 +1672,1106 @@ pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] mod benches { - frame_benchmarking::define_benchmarks!( - // Paseo - // NOTE: Make sure to prefix these with `runtime_common::` so - // the that path resolves correctly in the generated file. - [runtime_common::auctions, Auctions] - [runtime_common::claims, Claims] - [runtime_common::crowdloan, Crowdloan] - [runtime_common::slots, Slots] - [runtime_common::paras_registrar, Registrar] - [runtime_parachains::configuration, Configuration] - [runtime_parachains::disputes, ParasDisputes] - [runtime_parachains::disputes::slashing, ParasSlashing] - [runtime_parachains::hrmp, Hrmp] - [runtime_parachains::inclusion, ParaInclusion] - [runtime_parachains::initializer, Initializer] - [runtime_parachains::paras, Paras] - [runtime_parachains::paras_inherent, ParaInherent] - // Substrate - [pallet_bags_list, VoterList] - [pallet_balances, Balances] - [frame_benchmarking::baseline, Baseline::] - [pallet_bounties, Bounties] - [pallet_child_bounties, ChildBounties] - [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] - [frame_election_provider_support, ElectionProviderBench::] - [pallet_fast_unstake, FastUnstake] - [pallet_identity, Identity] - [pallet_im_online, ImOnline] - [pallet_indices, Indices] - [pallet_message_queue, MessageQueue] - [pallet_multisig, Multisig] - [pallet_nomination_pools, NominationPoolsBench::] - [pallet_offences, OffencesBench::] - [pallet_preimage, Preimage] - [pallet_proxy, Proxy] - [pallet_scheduler, Scheduler] - [pallet_session, SessionBench::] - [pallet_staking, Staking] - [frame_system, SystemBench::] - [pallet_timestamp, Timestamp] - [pallet_treasury, Treasury] - [pallet_utility, Utility] - [pallet_vesting, Vesting] - [pallet_conviction_voting, ConvictionVoting] - [pallet_referenda, Referenda] - [pallet_whitelist, Whitelist] - [pallet_asset_rate, AssetRate] - // XCM - [pallet_xcm, XcmPallet] - [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] - [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] - // Sudo - [pallet_sudo, Sudo] - ); + frame_benchmarking::define_benchmarks!( + // Polkadot + // NOTE: Make sure to prefix these with `runtime_common::` so + // the that path resolves correctly in the generated file. + [runtime_common::auctions, Auctions] + [runtime_common::claims, Claims] + [runtime_common::crowdloan, Crowdloan] + [runtime_common::slots, Slots] + [runtime_common::paras_registrar, Registrar] + [runtime_parachains::configuration, Configuration] + [runtime_parachains::disputes, ParasDisputes] + [runtime_parachains::disputes::slashing, ParasSlashing] + [runtime_parachains::hrmp, Hrmp] + [runtime_parachains::inclusion, ParaInclusion] + [runtime_parachains::initializer, Initializer] + [runtime_parachains::paras, Paras] + [runtime_parachains::paras_inherent, ParaInherent] + // Substrate + [pallet_bags_list, VoterList] + [pallet_balances, Balances] + [frame_benchmarking::baseline, Baseline::] + [pallet_bounties, Bounties] + [pallet_child_bounties, ChildBounties] + [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] + [frame_election_provider_support, ElectionProviderBench::] + [pallet_fast_unstake, FastUnstake] + [pallet_identity, Identity] + [pallet_im_online, ImOnline] + [pallet_indices, Indices] + [pallet_message_queue, MessageQueue] + [pallet_multisig, Multisig] + [pallet_nomination_pools, NominationPoolsBench::] + [pallet_offences, OffencesBench::] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [pallet_session, SessionBench::] + [pallet_staking, Staking] + [frame_system, SystemBench::] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + [pallet_vesting, Vesting] + [pallet_conviction_voting, ConvictionVoting] + [pallet_referenda, Referenda] + [pallet_whitelist, Whitelist] + [pallet_asset_rate, AssetRate] + // XCM + [pallet_xcm, XcmPallet] + [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] + [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + ); } sp_api::impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl block_builder_api::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: inherents::InherentData, - ) -> inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl pallet_nomination_pools_runtime_api::NominationPoolsApi< - Block, - AccountId, - Balance, - > for Runtime { - fn pending_rewards(member: AccountId) -> Balance { - NominationPools::api_pending_rewards(member).unwrap_or_default() - } - - fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { - NominationPools::api_points_to_balance(pool_id, points) - } - - fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { - NominationPools::api_balance_to_points(pool_id, new_funds) - } - } - - impl pallet_staking_runtime_api::StakingApi for Runtime { - fn nominations_quota(balance: Balance) -> u32 { - Staking::api_nominations_quota(balance) - } - } - - impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl offchain_primitives::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl primitives::runtime_api::ParachainHost for Runtime { - fn validators() -> Vec { - parachains_runtime_api_impl::validators::() - } - - fn validator_groups() -> (Vec>, GroupRotationInfo) { - parachains_runtime_api_impl::validator_groups::() - } - - fn availability_cores() -> Vec> { - parachains_runtime_api_impl::availability_cores::() - } - - fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option> { - parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) - } - - fn assumed_validation_data( - para_id: ParaId, - expected_persisted_validation_data_hash: Hash, - ) -> Option<(PersistedValidationData, ValidationCodeHash)> { - parachains_runtime_api_impl::assumed_validation_data::( - para_id, - expected_persisted_validation_data_hash, - ) - } - - fn check_validation_outputs( - para_id: ParaId, - outputs: primitives::CandidateCommitments, - ) -> bool { - parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) - } - - fn session_index_for_child() -> SessionIndex { - parachains_runtime_api_impl::session_index_for_child::() - } - - fn validation_code(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option { - parachains_runtime_api_impl::validation_code::(para_id, assumption) - } - - fn candidate_pending_availability(para_id: ParaId) -> Option> { - parachains_runtime_api_impl::candidate_pending_availability::(para_id) - } - - fn candidate_events() -> Vec> { - parachains_runtime_api_impl::candidate_events::(|ev| { - match ev { - RuntimeEvent::ParaInclusion(ev) => { - Some(ev) - } - _ => None, - } - }) - } - - fn session_info(index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_info::(index) - } - - fn session_executor_params(session_index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_executor_params::(session_index) - } - - fn dmq_contents(recipient: ParaId) -> Vec> { - parachains_runtime_api_impl::dmq_contents::(recipient) - } - - fn inbound_hrmp_channels_contents( - recipient: ParaId - ) -> BTreeMap>> { - parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) - } - - fn validation_code_by_hash(hash: ValidationCodeHash) -> Option { - parachains_runtime_api_impl::validation_code_by_hash::(hash) - } - - fn on_chain_votes() -> Option> { - parachains_runtime_api_impl::on_chain_votes::() - } - - fn submit_pvf_check_statement( - stmt: primitives::PvfCheckStatement, - signature: primitives::ValidatorSignature, - ) { - parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) - } - - fn pvfs_require_precheck() -> Vec { - parachains_runtime_api_impl::pvfs_require_precheck::() - } - - fn validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option - { - parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) - } - - fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { - parachains_runtime_api_impl::get_session_disputes::() - } - - fn unapplied_slashes( - ) -> Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)> { - parachains_runtime_api_impl::unapplied_slashes::() - } - - fn key_ownership_proof( - validator_id: ValidatorId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) - .map(|p| p.encode()) - .map(slashing::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_dispute_lost( - dispute_proof: slashing::DisputeProof, - key_ownership_proof: slashing::OpaqueKeyOwnershipProof, - ) -> Option<()> { - parachains_runtime_api_impl::submit_unsigned_slashing_report::( - dispute_proof, - key_ownership_proof, - ) - } - } - - impl beefy_primitives::BeefyApi for Runtime { - fn beefy_genesis() -> Option { - Beefy::genesis_block() - } - - fn validator_set() -> Option> { - Beefy::validator_set() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< - BlockNumber, - BeefyId, - BeefySignature, - >, - key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Beefy::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: beefy_primitives::ValidatorSetId, - authority_id: BeefyId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(beefy_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl mmr::MmrApi for Runtime { - fn mmr_root() -> Result { - Ok(Mmr::mmr_root()) - } - - fn mmr_leaf_count() -> Result { - Ok(Mmr::mmr_leaves()) - } - - fn generate_proof( - block_numbers: Vec, - best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Mmr::generate_proof(block_numbers, best_known_block_number).map( - |(leaves, proof)| { - ( - leaves - .into_iter() - .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) - .collect(), - proof, - ) - }, - ) - } - - fn verify_proof(leaves: Vec, proof: mmr::Proof) - -> Result<(), mmr::Error> - { - let leaves = leaves.into_iter().map(|leaf| - leaf.into_opaque_leaf() - .try_decode() - .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; - Mmr::verify_leaves(leaves, proof) - } - - fn verify_proof_stateless( - root: mmr::Hash, - leaves: Vec, - proof: mmr::Proof - ) -> Result<(), mmr::Error> { - let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); - pallet_mmr::verify_leaves_proof::(root, nodes, proof) - } - } - - impl pallet_beefy_mmr::BeefyMmrApi for RuntimeApi { - fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet { - BeefyMmrLeaf::authority_set_proof() - } - - fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet { - BeefyMmrLeaf::next_authority_set_proof() - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> Vec<(GrandpaId, u64)> { - Grandpa::grandpa_authorities() - } - - fn current_set_id() -> fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - sp_runtime::traits::NumberFor, - >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Grandpa::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - authority_id: fg_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((fg_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(fg_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl babe_primitives::BabeApi for Runtime { - fn configuration() -> babe_primitives::BabeConfiguration { - let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); - babe_primitives::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: epoch_config.c, - authorities: Babe::authorities().to_vec(), - randomness: Babe::randomness(), - allowed_slots: epoch_config.allowed_slots, - } - } - - fn current_epoch_start() -> babe_primitives::Slot { - Babe::current_epoch_start() - } - - fn current_epoch() -> babe_primitives::Epoch { - Babe::current_epoch() - } - - fn next_epoch() -> babe_primitives::Epoch { - Babe::next_epoch() - } - - fn generate_key_ownership_proof( - _slot: babe_primitives::Slot, - authority_id: babe_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((babe_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(babe_primitives::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: babe_primitives::EquivocationProof<::Header>, - key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Babe::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - } - - impl authority_discovery_primitives::AuthorityDiscoveryApi for Runtime { - fn authorities() -> Vec { - parachains_runtime_api_impl::relevant_authority_ids::() - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< - Block, - Balance, - > for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi - for Runtime - { - fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_call_info(call, len) - } - fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { - TransactionPayment::query_call_fee_details(call, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() - } - - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - log::info!(target: LOG_TARGET, "try-runtime::on_runtime_upgrade polkadot."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, BlockWeights::get().max_block) - } - - fn execute_block( - block: Block, - state_root_check: bool, - signature_check: bool, - select: frame_try_runtime::TryStateSelect, - ) -> Weight { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. - Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_system_benchmarking::Pallet as SystemBench; - use frame_benchmarking::baseline::Pallet as Baseline; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - return (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result< - Vec, - sp_runtime::RuntimeString, - > { - use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; - use sp_storage::TrackedStorageKey; - // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. - // To get around that, we separated the benchmarks into its own crate. - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_system_benchmarking::Pallet as SystemBench; - use frame_benchmarking::baseline::Pallet as Baseline; - use xcm::latest::prelude::*; - use xcm_config::{XcmConfig, AssetHubLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; - - impl pallet_session_benchmarking::Config for Runtime {} - impl pallet_offences_benchmarking::Config for Runtime {} - impl pallet_election_provider_support_benchmarking::Config for Runtime {} - impl frame_system_benchmarking::Config for Runtime {} - impl frame_benchmarking::baseline::Config for Runtime {} - impl pallet_nomination_pools_benchmarking::Config for Runtime {} - impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} - - let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); - let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); - whitelist.push(treasury_key.to_vec().into()); - - parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( - TokenLocation::get(), - ExistentialDeposit::get() - ).into()); - pub ToParachain: ParaId = paseo_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - } - - impl pallet_xcm_benchmarks::Config for Runtime { - type XcmConfig = XcmConfig; - type AccountIdConverter = SovereignAccountOf; - type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< - XcmConfig, - ExistentialDepositMultiAsset, - xcm_config::PriceForChildParachainDelivery, - ToParachain, - (), - >; - fn valid_destination() -> Result { - Ok(AssetHubLocation::get()) - } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { - // Paseo only knows about PAS - vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() - } - } - - parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( - AssetHubLocation::get(), - MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } - )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - } - - impl pallet_xcm_benchmarks::fungible::Config for Runtime { - type TransactAsset = Balances; - - type CheckedAccount = LocalCheckAccount; - type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; - - fn get_multi_asset() -> MultiAsset { - MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1 * UNITS) - } - } - } - - impl pallet_xcm_benchmarks::generic::Config for Runtime { - type TransactAsset = Balances; - type RuntimeCall = RuntimeCall; - - fn worst_case_response() -> (u64, Response) { - (0u64, Response::Version(Default::default())) - } - - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { - // Paseo doesn't support asset exchanges - Err(BenchmarkError::Skip) - } - - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { - // The XCM executor of Paseo doesn't have a configured `UniversalAliases` - Err(BenchmarkError::Skip) - } - - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) - } - - fn subscribe_origin() -> Result { - Ok(AssetHubLocation::get()) - } - - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = AssetHubLocation::get(); - let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; - Ok((origin, ticket, assets)) - } - - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } - - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { - // Paseo doesn't support asset locking - Err(BenchmarkError::Skip) - } - - fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - // Paseo doesn't support exporting messages - Err(BenchmarkError::Skip) - } - - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { - // The XCM executor of Paseo doesn't have a configured `Aliasers` - Err(BenchmarkError::Skip) - } - } - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmarks!(params, batches); - - Ok(batches) - } - } + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block); + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } + } + + impl block_builder_api::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: inherents::InherentData, + ) -> inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl pallet_nomination_pools_runtime_api::NominationPoolsApi< + Block, + AccountId, + Balance, + > for Runtime { + fn pending_rewards(member: AccountId) -> Balance { + NominationPools::api_pending_rewards(member).unwrap_or_default() + } + + fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { + NominationPools::api_points_to_balance(pool_id, points) + } + + fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { + NominationPools::api_balance_to_points(pool_id, new_funds) + } + } + + impl pallet_staking_runtime_api::StakingApi for Runtime { + fn nominations_quota(balance: Balance) -> u32 { + Staking::api_nominations_quota(balance) + } + } + + impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl offchain_primitives::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl primitives::runtime_api::ParachainHost for Runtime { + fn validators() -> Vec { + parachains_runtime_api_impl::validators::() + } + + fn validator_groups() -> (Vec>, GroupRotationInfo) { + parachains_runtime_api_impl::validator_groups::() + } + + fn availability_cores() -> Vec> { + parachains_runtime_api_impl::availability_cores::() + } + + fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option> { + parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) + } + + fn assumed_validation_data( + para_id: ParaId, + expected_persisted_validation_data_hash: Hash, + ) -> Option<(PersistedValidationData, ValidationCodeHash)> { + parachains_runtime_api_impl::assumed_validation_data::( + para_id, + expected_persisted_validation_data_hash, + ) + } + + fn check_validation_outputs( + para_id: ParaId, + outputs: primitives::CandidateCommitments, + ) -> bool { + parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) + } + + fn session_index_for_child() -> SessionIndex { + parachains_runtime_api_impl::session_index_for_child::() + } + + fn validation_code(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option { + parachains_runtime_api_impl::validation_code::(para_id, assumption) + } + + fn candidate_pending_availability(para_id: ParaId) -> Option> { + parachains_runtime_api_impl::candidate_pending_availability::(para_id) + } + + fn candidate_events() -> Vec> { + parachains_runtime_api_impl::candidate_events::(|ev| { + match ev { + RuntimeEvent::ParaInclusion(ev) => { + Some(ev) + } + _ => None, + } + }) + } + + fn session_info(index: SessionIndex) -> Option { + parachains_runtime_api_impl::session_info::(index) + } + + fn session_executor_params(session_index: SessionIndex) -> Option { + parachains_runtime_api_impl::session_executor_params::(session_index) + } + + fn dmq_contents(recipient: ParaId) -> Vec> { + parachains_runtime_api_impl::dmq_contents::(recipient) + } + + fn inbound_hrmp_channels_contents( + recipient: ParaId + ) -> BTreeMap>> { + parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) + } + + fn validation_code_by_hash(hash: ValidationCodeHash) -> Option { + parachains_runtime_api_impl::validation_code_by_hash::(hash) + } + + fn on_chain_votes() -> Option> { + parachains_runtime_api_impl::on_chain_votes::() + } + + fn submit_pvf_check_statement( + stmt: primitives::PvfCheckStatement, + signature: primitives::ValidatorSignature, + ) { + parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) + } + + fn pvfs_require_precheck() -> Vec { + parachains_runtime_api_impl::pvfs_require_precheck::() + } + + fn validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option + { + parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) + } + + fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { + parachains_runtime_api_impl::get_session_disputes::() + } + + fn unapplied_slashes( + ) -> Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)> { + parachains_runtime_api_impl::unapplied_slashes::() + } + + fn key_ownership_proof( + validator_id: ValidatorId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) + .map(|p| p.encode()) + .map(slashing::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_dispute_lost( + dispute_proof: slashing::DisputeProof, + key_ownership_proof: slashing::OpaqueKeyOwnershipProof, + ) -> Option<()> { + parachains_runtime_api_impl::submit_unsigned_slashing_report::( + dispute_proof, + key_ownership_proof, + ) + } + } + + impl beefy_primitives::BeefyApi for Runtime { + fn beefy_genesis() -> Option { + Beefy::genesis_block() + } + + fn validator_set() -> Option> { + Beefy::validator_set() + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: beefy_primitives::EquivocationProof< + BlockNumber, + BeefyId, + BeefySignature, + >, + key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Beefy::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + + fn generate_key_ownership_proof( + _set_id: beefy_primitives::ValidatorSetId, + authority_id: BeefyId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(beefy_primitives::OpaqueKeyOwnershipProof::new) + } + } + + impl mmr::MmrApi for Runtime { + fn mmr_root() -> Result { + Ok(Mmr::mmr_root()) + } + + fn mmr_leaf_count() -> Result { + Ok(Mmr::mmr_leaves()) + } + + fn generate_proof( + block_numbers: Vec, + best_known_block_number: Option, + ) -> Result<(Vec, mmr::Proof), mmr::Error> { + Mmr::generate_proof(block_numbers, best_known_block_number).map( + |(leaves, proof)| { + ( + leaves + .into_iter() + .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) + .collect(), + proof, + ) + }, + ) + } + + fn verify_proof(leaves: Vec, proof: mmr::Proof) + -> Result<(), mmr::Error> + { + let leaves = leaves.into_iter().map(|leaf| + leaf.into_opaque_leaf() + .try_decode() + .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; + Mmr::verify_leaves(leaves, proof) + } + + fn verify_proof_stateless( + root: mmr::Hash, + leaves: Vec, + proof: mmr::Proof + ) -> Result<(), mmr::Error> { + let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); + pallet_mmr::verify_leaves_proof::(root, nodes, proof) + } + } + + impl pallet_beefy_mmr::BeefyMmrApi for RuntimeApi { + fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet { + BeefyMmrLeaf::authority_set_proof() + } + + fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet { + BeefyMmrLeaf::next_authority_set_proof() + } + } + + impl fg_primitives::GrandpaApi for Runtime { + fn grandpa_authorities() -> Vec<(GrandpaId, u64)> { + Grandpa::grandpa_authorities() + } + + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: fg_primitives::EquivocationProof< + ::Hash, + sp_runtime::traits::NumberFor, + >, + key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Grandpa::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + + fn generate_key_ownership_proof( + _set_id: fg_primitives::SetId, + authority_id: fg_primitives::AuthorityId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((fg_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(fg_primitives::OpaqueKeyOwnershipProof::new) + } + } + + impl babe_primitives::BabeApi for Runtime { + fn configuration() -> babe_primitives::BabeConfiguration { + let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); + babe_primitives::BabeConfiguration { + slot_duration: Babe::slot_duration(), + epoch_length: EpochDuration::get(), + c: epoch_config.c, + authorities: Babe::authorities().to_vec(), + randomness: Babe::randomness(), + allowed_slots: epoch_config.allowed_slots, + } + } + + fn current_epoch_start() -> babe_primitives::Slot { + Babe::current_epoch_start() + } + + fn current_epoch() -> babe_primitives::Epoch { + Babe::current_epoch() + } + + fn next_epoch() -> babe_primitives::Epoch { + Babe::next_epoch() + } + + fn generate_key_ownership_proof( + _slot: babe_primitives::Slot, + authority_id: babe_primitives::AuthorityId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((babe_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(babe_primitives::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: babe_primitives::EquivocationProof<::Header>, + key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Babe::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + } + + impl authority_discovery_primitives::AuthorityDiscoveryApi for Runtime { + fn authorities() -> Vec { + parachains_runtime_api_impl::relevant_authority_ids::() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, sp_core::crypto::KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + log::info!(target: LOG_TARGET, "try-runtime::on_runtime_upgrade polkadot."); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, BlockWeights::get().max_block) + } + + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + + use pallet_session_benchmarking::Pallet as SessionBench; + use pallet_offences_benchmarking::Pallet as OffencesBench; + use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use frame_system_benchmarking::Pallet as SystemBench; + use frame_benchmarking::baseline::Pallet as Baseline; + + let mut list = Vec::::new(); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + return (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result< + Vec, + sp_runtime::RuntimeString, + > { + use frame_support::traits::WhitelistedStorageKeys; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; + // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. + // To get around that, we separated the benchmarks into its own crate. + use pallet_session_benchmarking::Pallet as SessionBench; + use pallet_offences_benchmarking::Pallet as OffencesBench; + use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use frame_system_benchmarking::Pallet as SystemBench; + use frame_benchmarking::baseline::Pallet as Baseline; + use xcm::latest::prelude::*; + use xcm_config::{XcmConfig, AssetHubLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; + + impl pallet_session_benchmarking::Config for Runtime {} + impl pallet_offences_benchmarking::Config for Runtime {} + impl pallet_election_provider_support_benchmarking::Config for Runtime {} + impl frame_system_benchmarking::Config for Runtime {} + impl frame_benchmarking::baseline::Config for Runtime {} + impl pallet_nomination_pools_benchmarking::Config for Runtime {} + impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + + let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); + let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); + whitelist.push(treasury_key.to_vec().into()); + + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub ToParachain: ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + } + + impl pallet_xcm_benchmarks::Config for Runtime { + type XcmConfig = XcmConfig; + type AccountIdConverter = SovereignAccountOf; + type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositMultiAsset, + xcm_config::PriceForChildParachainDelivery, + ToParachain, + (), + >; + fn valid_destination() -> Result { + Ok(AssetHubLocation::get()) + } + fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + // Polkadot only knows about DOT + vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() + } + } + + parameter_types! { + pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + AssetHubLocation::get(), + MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } + )); + pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + } + + impl pallet_xcm_benchmarks::fungible::Config for Runtime { + type TransactAsset = Balances; + + type CheckedAccount = LocalCheckAccount; + type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; + + fn get_multi_asset() -> MultiAsset { + MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1 * UNITS) + } + } + } + + impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; + type RuntimeCall = RuntimeCall; + + fn worst_case_response() -> (u64, Response) { + (0u64, Response::Version(Default::default())) + } + + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + // Polkadot doesn't support asset exchanges + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + // The XCM executor of Polkadot doesn't have a configured `UniversalAliases` + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + } + + fn subscribe_origin() -> Result { + Ok(AssetHubLocation::get()) + } + + fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + let origin = AssetHubLocation::get(); + let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let ticket = MultiLocation { parents: 0, interior: Here }; + Ok((origin, ticket, assets)) + } + + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + // Polkadot doesn't support asset locking + Err(BenchmarkError::Skip) + } + + fn export_message_origin_and_destination( + ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + // Polkadot doesn't support exporting messages + Err(BenchmarkError::Skip) + } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + // The XCM executor of Polkadot doesn't have a configured `Aliasers` + Err(BenchmarkError::Skip) + } + } + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + + add_benchmarks!(params, batches); + + Ok(batches) + } + } } #[cfg(test)] mod test_fees { - use super::*; - use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; - use keyring::Sr25519Keyring::{Alice, Charlie}; - use pallet_transaction_payment::Multiplier; - use runtime_common::MinimumMultiplier; - use separator::Separatable; - use sp_runtime::{assert_eq_error_rate, FixedPointNumber, MultiAddress, MultiSignature}; - - #[test] - fn payout_weight_portion() { - use pallet_staking::WeightInfo; - let payout_weight = - ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), - ) - .ref_time() as f64; - let block_weight = BlockWeights::get().max_block.ref_time() as f64; - - println!( - "a full payout takes {:.2} of the block weight [{} / {}]", - payout_weight / block_weight, - payout_weight, - block_weight - ); - assert!(payout_weight * 2f64 < block_weight); - } - - #[test] - fn block_cost() { - let max_block_weight = BlockWeights::get().max_block; - let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); - - let fee_with_multiplier = |m: Multiplier| { - println!( + use super::*; + use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; + use keyring::Sr25519Keyring::{Alice, Charlie}; + use pallet_transaction_payment::Multiplier; + use runtime_common::MinimumMultiplier; + use separator::Separatable; + use sp_runtime::{assert_eq_error_rate, FixedPointNumber, MultiAddress, MultiSignature}; + + #[test] + fn payout_weight_portion() { + use pallet_staking::WeightInfo; + let payout_weight = + ::WeightInfo::payout_stakers_alive_staked( + MaxNominatorRewardedPerValidator::get(), + ) + .ref_time() as f64; + let block_weight = BlockWeights::get().max_block.ref_time() as f64; + + println!( + "a full payout takes {:.2} of the block weight [{} / {}]", + payout_weight / block_weight, + payout_weight, + block_weight + ); + assert!(payout_weight * 2f64 < block_weight); + } + + #[test] + fn block_cost() { + let max_block_weight = BlockWeights::get().max_block; + let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); + + let fee_with_multiplier = |m: Multiplier| { + println!( "Full Block weight == {} // multiplier: {:?} // WeightToFee(full_block) == {} plank", max_block_weight, m, m.saturating_mul_int(raw_fee).separated_string(), ); - }; - fee_with_multiplier(MinimumMultiplier::get()); - fee_with_multiplier(Multiplier::from_rational(1, 2)); - fee_with_multiplier(Multiplier::from_u32(1)); - fee_with_multiplier(Multiplier::from_u32(2)); - } - - #[test] - fn transfer_cost_min_multiplier() { - let min_multiplier = MinimumMultiplier::get(); - let call = pallet_balances::Call::::transfer_keep_alive { - dest: Charlie.to_account_id().into(), - value: Default::default(), - }; - let info = call.get_dispatch_info(); - println!("call = {:?} / info = {:?}", call, info); - // convert to runtime call. - let call = RuntimeCall::Balances(call); - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::immortal()), - frame_system::CheckNonce::::from(1), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - claims::PrevalidateAttests::::new(), - ); - let uxt = UncheckedExtrinsic { - function: call, - signature: Some(( - MultiAddress::Id(Alice.to_account_id()), - MultiSignature::Sr25519(Alice.sign(b"foo")), - extra, - )), - }; - let len = uxt.encoded_size(); - - let mut ext = sp_io::TestExternalities::new_empty(); - let mut test_with_multiplier = |m: Multiplier| { - ext.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::put(m); - let fee = TransactionPayment::query_fee_details(uxt.clone(), len as u32); - println!( - "multiplier = {:?} // fee details = {:?} // final fee = {:?}", - pallet_transaction_payment::NextFeeMultiplier::::get(), - fee, - fee.final_fee().separated_string(), - ); - }); - }; - - test_with_multiplier(min_multiplier); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_0u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_00u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000u128)); - test_with_multiplier(Multiplier::saturating_from_rational( - 1u128, - 1_000_000_000u128, - )); - } - - #[test] - fn nominator_limit() { - use pallet_election_provider_multi_phase::WeightInfo; - // starting point of the nominators. - let target_voters: u32 = 50_000; - - // assuming we want around 5k candidates and 1k active validators. (March 31, 2021) - let all_targets: u32 = 5_000; - let desired: u32 = 1_000; - let weight_with = |active| { - ::WeightInfo::submit_unsigned( - active, - all_targets, - active, - desired, - ) - }; - - let mut active = target_voters; - while weight_with(active).all_lte(OffchainSolutionWeightLimit::get()) - || active == target_voters - { - active += 1; - } - - println!( - "can support {} nominators to yield a weight of {}", - active, - weight_with(active) - ); - assert!( - active > target_voters, - "we need to reevaluate the weight of the election system" - ); - } - - #[test] - fn signed_deposit_is_sensible() { - // ensure this number does not change, or that it is checked after each change. - // a 1 MB solution should take (40 + 10) DOTs of deposit. - let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); - assert_eq_error_rate!(deposit, 50 * DOLLARS, DOLLARS); - } + }; + fee_with_multiplier(MinimumMultiplier::get()); + fee_with_multiplier(Multiplier::from_rational(1, 2)); + fee_with_multiplier(Multiplier::from_u32(1)); + fee_with_multiplier(Multiplier::from_u32(2)); + } + + #[test] + fn transfer_cost_min_multiplier() { + let min_multiplier = MinimumMultiplier::get(); + let call = pallet_balances::Call::::transfer_keep_alive { + dest: Charlie.to_account_id().into(), + value: Default::default(), + }; + let info = call.get_dispatch_info(); + println!("call = {:?} / info = {:?}", call, info); + // convert to runtime call. + let call = RuntimeCall::Balances(call); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from(generic::Era::immortal()), + frame_system::CheckNonce::::from(1), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + claims::PrevalidateAttests::::new(), + ); + let uxt = UncheckedExtrinsic { + function: call, + signature: Some(( + MultiAddress::Id(Alice.to_account_id()), + MultiSignature::Sr25519(Alice.sign(b"foo")), + extra, + )), + }; + let len = uxt.encoded_size(); + + let mut ext = sp_io::TestExternalities::new_empty(); + let mut test_with_multiplier = |m: Multiplier| { + ext.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::put(m); + let fee = TransactionPayment::query_fee_details(uxt.clone(), len as u32); + println!( + "multiplier = {:?} // fee details = {:?} // final fee = {:?}", + pallet_transaction_payment::NextFeeMultiplier::::get(), + fee, + fee.final_fee().separated_string(), + ); + }); + }; + + test_with_multiplier(min_multiplier); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_0u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_00u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000_000u128)); + } + + #[test] + fn nominator_limit() { + use pallet_election_provider_multi_phase::WeightInfo; + // starting point of the nominators. + let target_voters: u32 = 50_000; + + // assuming we want around 5k candidates and 1k active validators. (March 31, 2021) + let all_targets: u32 = 5_000; + let desired: u32 = 1_000; + let weight_with = |active| { + ::WeightInfo::submit_unsigned( + active, + all_targets, + active, + desired, + ) + }; + + let mut active = target_voters; + while weight_with(active).all_lte(OffchainSolutionWeightLimit::get()) || + active == target_voters + { + active += 1; + } + + println!("can support {} nominators to yield a weight of {}", active, weight_with(active)); + assert!(active > target_voters, "we need to reevaluate the weight of the election system"); + } + + #[test] + fn signed_deposit_is_sensible() { + // ensure this number does not change, or that it is checked after each change. + // a 1 MB solution should take (40 + 10) DOTs of deposit. + let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); + assert_eq_error_rate!(deposit, 50 * DOLLARS, DOLLARS); + } } #[cfg(test)] mod test { - use std::collections::HashSet; - - use super::*; - use frame_support::traits::WhitelistedStorageKeys; - use scale_info::TypeInfo; - use sp_core::hexdisplay::HexDisplay; - - #[test] - fn call_size() { - RuntimeCall::assert_size_under(256); - } - - #[test] - fn check_whitelist() { - let whitelist: HashSet = AllPalletsWithSystem::whitelisted_storage_keys() - .iter() - .map(|e| HexDisplay::from(&e.key).to_string()) - .collect(); - - // Block number - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac") - ); - // Total issuance - assert!( - whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80") - ); - // Execution phase - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a") - ); - // Event count - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850") - ); - // System events - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") - ); - // XcmPallet VersionDiscoveryQueue - assert!( - whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1") - ); - // XcmPallet SafeXcmVersion - assert!( - whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4") - ); - } - - #[test] - fn check_treasury_pallet_id() { - assert_eq!( - ::index() as u8, - paseo_runtime_constants::TREASURY_PALLET_ID - ); - } - - #[test] - fn ensure_xcm_metadata_is_correct() { - let path = xcm::VersionedXcm::<()>::type_info().path; - // Ensure that the name doesn't include `staging` (from the pallet name) - assert_eq!(vec!["xcm", "VersionedXcm"], path.segments); - } + use std::collections::HashSet; + + use super::*; + use frame_support::traits::WhitelistedStorageKeys; + use scale_info::TypeInfo; + use sp_core::hexdisplay::HexDisplay; + + #[test] + fn call_size() { + RuntimeCall::assert_size_under(256); + } + + #[test] + fn check_whitelist() { + let whitelist: HashSet = AllPalletsWithSystem::whitelisted_storage_keys() + .iter() + .map(|e| HexDisplay::from(&e.key).to_string()) + .collect(); + + // Block number + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac") + ); + // Total issuance + assert!( + whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80") + ); + // Execution phase + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a") + ); + // Event count + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850") + ); + // System events + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") + ); + // XcmPallet VersionDiscoveryQueue + assert!( + whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1") + ); + // XcmPallet SafeXcmVersion + assert!( + whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4") + ); + } + + #[test] + fn check_treasury_pallet_id() { + assert_eq!( + ::index() as u8, + polkadot_runtime_constants::TREASURY_PALLET_ID + ); + } + + #[test] + fn ensure_xcm_metadata_is_correct() { + let path = xcm::VersionedXcm::<()>::type_info().path; + // Ensure that the name doesn't include `staging` (from the pallet name) + assert_eq!(vec!["xcm", "VersionedXcm"], path.segments); + } } #[cfg(test)] mod multiplier_tests { - use super::*; - use frame_support::{ - dispatch::DispatchInfo, - traits::{OnFinalize, PalletInfoAccess}, - }; - use runtime_common::{MinimumMultiplier, TargetBlockFullness}; - use separator::Separatable; - use sp_runtime::traits::Convert; - - fn run_with_system_weight(w: Weight, mut assertions: F) - where - F: FnMut() -> (), - { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - t.execute_with(|| { - System::set_block_consumed_resources(w, 0); - assertions() - }); - } - - #[test] - fn multiplier_can_grow_from_zero() { - let minimum_multiplier = MinimumMultiplier::get(); - let target = TargetBlockFullness::get() - * BlockWeights::get() - .get(DispatchClass::Normal) - .max_total - .unwrap(); - // if the min is too small, then this will not change, and we are doomed forever. - // the weight is 1/100th bigger than target. - run_with_system_weight(target.saturating_mul(101) / 100, || { - let next = SlowAdjustingFeeUpdate::::convert(minimum_multiplier); - assert!( - next > minimum_multiplier, - "{:?} !>= {:?}", - next, - minimum_multiplier - ); - }) - } - - #[test] - fn fast_unstake_estimate() { - use pallet_fast_unstake::WeightInfo; - let block_time = BlockWeights::get().max_block.ref_time() as f32; - let on_idle = weights::pallet_fast_unstake::WeightInfo::::on_idle_check( - 300, - ::BatchSize::get(), - ) - .ref_time() as f32; - println!( - "ratio of block weight for full batch fast-unstake {}", - on_idle / block_time - ); - assert!(on_idle / block_time <= 0.5f32) - } - - #[test] - fn treasury_pallet_index_is_correct() { - assert_eq!( - TREASURY_PALLET_ID, - ::index() as u8 - ); - } - - #[test] - #[ignore] - fn multiplier_growth_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = MinimumMultiplier::get(); - let block_weight = BlockWeights::get() - .get(DispatchClass::Normal) - .max_total - .unwrap(); - let mut blocks = 0; - let mut fees_paid = 0; - - frame_system::Pallet::::set_block_consumed_resources(Weight::MAX, 0); - let info = DispatchInfo { - weight: Weight::MAX, - ..Default::default() - }; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(MinimumMultiplier::get()); - }); - - while multiplier <= Multiplier::from_u32(1) { - t.execute_with(|| { - // imagine this tx was called. - let fee = TransactionPayment::compute_fee(0, &info, 0); - fees_paid += fee; - - // this will update the multiplier. - System::set_block_consumed_resources(block_weight, 0); - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next > multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!( - "block = {} / multiplier {:?} / fee = {:?} / fess so far {:?}", - blocks, - multiplier, - fee.separated_string(), - fees_paid.separated_string() - ); - }); - blocks += 1; - } - } - - #[test] - #[ignore] - fn multiplier_cool_down_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = Multiplier::from_u32(2); - let mut blocks = 0; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(multiplier); - }); - - while multiplier > Multiplier::from_u32(0) { - t.execute_with(|| { - // this will update the multiplier. - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next < multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!("block = {} / multiplier {:?}", blocks, multiplier); - }); - blocks += 1; - } - } + use super::*; + use frame_support::{ + dispatch::DispatchInfo, + traits::{OnFinalize, PalletInfoAccess}, + }; + use runtime_common::{MinimumMultiplier, TargetBlockFullness}; + use separator::Separatable; + use sp_runtime::traits::Convert; + + fn run_with_system_weight(w: Weight, mut assertions: F) + where + F: FnMut() -> (), + { + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + t.execute_with(|| { + System::set_block_consumed_resources(w, 0); + assertions() + }); + } + + #[test] + fn multiplier_can_grow_from_zero() { + let minimum_multiplier = MinimumMultiplier::get(); + let target = TargetBlockFullness::get() * + BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); + // if the min is too small, then this will not change, and we are doomed forever. + // the weight is 1/100th bigger than target. + run_with_system_weight(target.saturating_mul(101) / 100, || { + let next = SlowAdjustingFeeUpdate::::convert(minimum_multiplier); + assert!(next > minimum_multiplier, "{:?} !>= {:?}", next, minimum_multiplier); + }) + } + + #[test] + fn fast_unstake_estimate() { + use pallet_fast_unstake::WeightInfo; + let block_time = BlockWeights::get().max_block.ref_time() as f32; + let on_idle = weights::pallet_fast_unstake::WeightInfo::::on_idle_check( + 300, + ::BatchSize::get(), + ) + .ref_time() as f32; + println!("ratio of block weight for full batch fast-unstake {}", on_idle / block_time); + assert!(on_idle / block_time <= 0.5f32) + } + + #[test] + fn treasury_pallet_index_is_correct() { + assert_eq!(TREASURY_PALLET_ID, ::index() as u8); + } + + #[test] + #[ignore] + fn multiplier_growth_simulator() { + // assume the multiplier is initially set to its minimum. We update it with values twice the + //target (target is 25%, thus 50%) and we see at which point it reaches 1. + let mut multiplier = MinimumMultiplier::get(); + let block_weight = BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); + let mut blocks = 0; + let mut fees_paid = 0; + + frame_system::Pallet::::set_block_consumed_resources(Weight::MAX, 0); + let info = DispatchInfo { weight: Weight::MAX, ..Default::default() }; + + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + // set the minimum + t.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::set(MinimumMultiplier::get()); + }); + + while multiplier <= Multiplier::from_u32(1) { + t.execute_with(|| { + // imagine this tx was called. + let fee = TransactionPayment::compute_fee(0, &info, 0); + fees_paid += fee; + + // this will update the multiplier. + System::set_block_consumed_resources(block_weight, 0); + TransactionPayment::on_finalize(1); + let next = TransactionPayment::next_fee_multiplier(); + + assert!(next > multiplier, "{:?} !>= {:?}", next, multiplier); + multiplier = next; + + println!( + "block = {} / multiplier {:?} / fee = {:?} / fess so far {:?}", + blocks, + multiplier, + fee.separated_string(), + fees_paid.separated_string() + ); + }); + blocks += 1; + } + } + + #[test] + #[ignore] + fn multiplier_cool_down_simulator() { + // assume the multiplier is initially set to its minimum. We update it with values twice the + //target (target is 25%, thus 50%) and we see at which point it reaches 1. + let mut multiplier = Multiplier::from_u32(2); + let mut blocks = 0; + + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + // set the minimum + t.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::set(multiplier); + }); + + while multiplier > Multiplier::from_u32(0) { + t.execute_with(|| { + // this will update the multiplier. + TransactionPayment::on_finalize(1); + let next = TransactionPayment::next_fee_multiplier(); + + assert!(next < multiplier, "{:?} !>= {:?}", next, multiplier); + multiplier = next; + + println!("block = {} / multiplier {:?}", blocks, multiplier); + }); + blocks += 1; + } + } } #[cfg(all(test, feature = "try-runtime"))] mod remote_tests { - use super::*; - use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; - use remote_externalities::{ - Builder, Mode, OfflineConfig, OnlineConfig, RemoteExternalities, SnapshotConfig, Transport, - }; - use std::env::var; - - async fn remote_ext_test_setup() -> RemoteExternalities { - let transport: Transport = var("WS") - .unwrap_or("wss://paseo.rpc.amforc.com:443".to_string()) - .into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { - state_snapshot: state_snapshot.clone(), - }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { - transport, - ..Default::default() - }) - }) - .build() - .await - .unwrap() - } - - #[tokio::test] - async fn dispatch_all_proposals() { - if var("RUN_OPENGOV_TEST").is_err() { - return; - } - - sp_tracing::try_init_simple(); - let mut ext = remote_ext_test_setup().await; - ext.execute_with(|| { + use super::*; + use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; + use remote_externalities::{ + Builder, Mode, OfflineConfig, OnlineConfig, RemoteExternalities, SnapshotConfig, Transport, + }; + use std::env::var; + + async fn remote_ext_test_setup() -> RemoteExternalities { + let transport: Transport = + var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into(); + let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); + Builder::::default() + .mode(if let Some(state_snapshot) = maybe_state_snapshot { + Mode::OfflineOrElseOnline( + OfflineConfig { state_snapshot: state_snapshot.clone() }, + OnlineConfig { + transport, + state_snapshot: Some(state_snapshot), + ..Default::default() + }, + ) + } else { + Mode::Online(OnlineConfig { transport, ..Default::default() }) + }) + .build() + .await + .unwrap() + } + + #[tokio::test] + async fn dispatch_all_proposals() { + if var("RUN_OPENGOV_TEST").is_err() { + return + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; + ext.execute_with(|| { type Ref = pallet_referenda::ReferendumInfoOf; type RefStatus = pallet_referenda::ReferendumStatusOf; use sp_runtime::traits::Dispatchable; @@ -2920,51 +2807,45 @@ mod remote_tests { log::info!(target: LOG_TARGET, "outcome of dispatch with origin {:?}: {:?}", origin, dispatch_result); } }); - } - - #[tokio::test] - async fn run_migrations() { - if var("RUN_MIGRATION_TESTS").is_err() { - return; - } - - sp_tracing::try_init_simple(); - let mut ext = remote_ext_test_setup().await; - ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); - } - - #[tokio::test] - #[ignore = "this test is meant to be executed manually"] - async fn try_fast_unstake_all() { - sp_tracing::try_init_simple(); - let transport: Transport = var("WS") - .unwrap_or("wss://paseo.rpc.amforc.com:443".to_string()) - .into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { - state_snapshot: state_snapshot.clone(), - }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { - transport, - ..Default::default() - }) - }) - .build() - .await - .unwrap(); - ext.execute_with(|| { - pallet_fast_unstake::ErasToCheckPerBlock::::put(1); - runtime_common::try_runtime::migrate_all_inactive_nominators::() - }); - } + } + + #[tokio::test] + async fn run_migrations() { + if var("RUN_MIGRATION_TESTS").is_err() { + return + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; + ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); + } + + #[tokio::test] + #[ignore = "this test is meant to be executed manually"] + async fn try_fast_unstake_all() { + sp_tracing::try_init_simple(); + let transport: Transport = + var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into(); + let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); + let mut ext = Builder::::default() + .mode(if let Some(state_snapshot) = maybe_state_snapshot { + Mode::OfflineOrElseOnline( + OfflineConfig { state_snapshot: state_snapshot.clone() }, + OnlineConfig { + transport, + state_snapshot: Some(state_snapshot), + ..Default::default() + }, + ) + } else { + Mode::Online(OnlineConfig { transport, ..Default::default() }) + }) + .build() + .await + .unwrap(); + ext.execute_with(|| { + pallet_fast_unstake::ErasToCheckPerBlock::::put(1); + runtime_common::try_runtime::migrate_all_inactive_nominators::() + }); + } } diff --git a/relay/paseo/src/weights/frame_benchmarking_baseline.rs b/relay/paseo/src/weights/frame_benchmarking_baseline.rs index 0f35670..0c59ab7 100644 --- a/relay/paseo/src/weights/frame_benchmarking_baseline.rs +++ b/relay/paseo/src/weights/frame_benchmarking_baseline.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `frame_benchmarking::baseline` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_benchmarking::baseline // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,8 +56,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 220_000 picoseconds. - Weight::from_parts(338_692, 0) + // Minimum execution time: 177_000 picoseconds. + Weight::from_parts(221_399, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -61,8 +65,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 220_000 picoseconds. - Weight::from_parts(250_372, 0) + // Minimum execution time: 177_000 picoseconds. + Weight::from_parts(216_190, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -70,8 +74,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 218_000 picoseconds. - Weight::from_parts(274_048, 0) + // Minimum execution time: 175_000 picoseconds. + Weight::from_parts(216_992, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -79,16 +83,16 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 213_000 picoseconds. - Weight::from_parts(285_730, 0) + // Minimum execution time: 174_000 picoseconds. + Weight::from_parts(214_459, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 28_799_059_000 picoseconds. - Weight::from_parts(29_695_824_000, 0) + // Minimum execution time: 23_624_666_000 picoseconds. + Weight::from_parts(23_655_548_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -96,10 +100,10 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 280_000 picoseconds. - Weight::from_parts(12_209_807, 0) + // Minimum execution time: 209_000 picoseconds. + Weight::from_parts(2_608_443, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 109_646 - .saturating_add(Weight::from_parts(50_662_579, 0).saturating_mul(i.into())) + // Standard Error: 7_022 + .saturating_add(Weight::from_parts(54_864_888, 0).saturating_mul(i.into())) } } diff --git a/relay/paseo/src/weights/frame_election_provider_support.rs b/relay/paseo/src/weights/frame_election_provider_support.rs index 15a9759..938a4e9 100644 --- a/relay/paseo/src/weights/frame_election_provider_support.rs +++ b/relay/paseo/src/weights/frame_election_provider_support.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `frame_election_provider_support` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_election_provider_support // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,13 +58,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_708_233_000 picoseconds. - Weight::from_parts(7_801_181_000, 0) + // Minimum execution time: 6_632_757_000 picoseconds. + Weight::from_parts(6_762_010_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 165_025 - .saturating_add(Weight::from_parts(6_528_087, 0).saturating_mul(v.into())) - // Standard Error: 16_871_577 - .saturating_add(Weight::from_parts(1_661_785_177, 0).saturating_mul(d.into())) + // Standard Error: 140_567 + .saturating_add(Weight::from_parts(5_972_557, 0).saturating_mul(v.into())) + // Standard Error: 14_371_162 + .saturating_add(Weight::from_parts(1_406_671_378, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -69,12 +73,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_578_287_000 picoseconds. - Weight::from_parts(5_982_833_000, 0) + // Minimum execution time: 4_614_245_000 picoseconds. + Weight::from_parts(4_692_729_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 151_733 - .saturating_add(Weight::from_parts(5_797_906, 0).saturating_mul(v.into())) - // Standard Error: 15_512_678 - .saturating_add(Weight::from_parts(1_576_793_993, 0).saturating_mul(d.into())) + // Standard Error: 124_019 + .saturating_add(Weight::from_parts(4_969_480, 0).saturating_mul(v.into())) + // Standard Error: 12_679_314 + .saturating_add(Weight::from_parts(1_363_382_275, 0).saturating_mul(d.into())) } } diff --git a/relay/paseo/src/weights/frame_system.rs b/relay/paseo/src/weights/frame_system.rs index 59b2bd7..d63eb07 100644 --- a/relay/paseo/src/weights/frame_system.rs +++ b/relay/paseo/src/weights/frame_system.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=frame_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,22 +56,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_969_000 picoseconds. - Weight::from_parts(2_011_000, 0) + // Minimum execution time: 1_734_000 picoseconds. + Weight::from_parts(316_599, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(546, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(389, 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: 5_620_000 picoseconds. - Weight::from_parts(51_110_255, 0) + // Minimum execution time: 5_133_000 picoseconds. + Weight::from_parts(40_368_105, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_858, 0).saturating_mul(b.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_704, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -77,8 +81,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_527_000 picoseconds. - Weight::from_parts(3_877_000, 0) + // Minimum execution time: 3_070_000 picoseconds. + Weight::from_parts(3_214_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -91,8 +95,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 100_955_625_000 picoseconds. - Weight::from_parts(105_325_819_000, 0) + // Minimum execution time: 105_482_283_000 picoseconds. + Weight::from_parts(112_062_428_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -104,11 +108,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_176_000 picoseconds. - Weight::from_parts(2_406_000, 0) + // Minimum execution time: 1_906_000 picoseconds. + Weight::from_parts(1_978_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_316 - .saturating_add(Weight::from_parts(961_397, 0).saturating_mul(i.into())) + // Standard Error: 2_137 + .saturating_add(Weight::from_parts(758_762, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -118,11 +122,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_076_000 picoseconds. - Weight::from_parts(2_182_000, 0) + // Minimum execution time: 1_970_000 picoseconds. + Weight::from_parts(2_027_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_072 - .saturating_add(Weight::from_parts(664_313, 0).saturating_mul(i.into())) + // Standard Error: 1_055 + .saturating_add(Weight::from_parts(565_043, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -130,13 +134,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `78 + p * (69 ±0)` + // Measured: `83 + p * (69 ±0)` // Estimated: `79 + p * (70 ±0)` - // Minimum execution time: 4_147_000 picoseconds. - Weight::from_parts(4_331_000, 0) + // Minimum execution time: 3_732_000 picoseconds. + Weight::from_parts(3_887_000, 0) .saturating_add(Weight::from_parts(0, 79)) - // Standard Error: 2_058 - .saturating_add(Weight::from_parts(1_305_219, 0).saturating_mul(p.into())) + // Standard Error: 1_740 + .saturating_add(Weight::from_parts(1_216_574, 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())) diff --git a/relay/paseo/src/weights/mod.rs b/relay/paseo/src/weights/mod.rs index dcf19ba..2e5c22c 100644 --- a/relay/paseo/src/weights/mod.rs +++ b/relay/paseo/src/weights/mod.rs @@ -37,7 +37,6 @@ pub mod pallet_referenda; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_staking; -pub mod pallet_sudo; pub mod pallet_timestamp; pub mod pallet_treasury; pub mod pallet_utility; diff --git a/relay/paseo/src/weights/pallet_asset_rate.rs b/relay/paseo/src/weights/pallet_asset_rate.rs index 85fd233..e5925b4 100644 --- a/relay/paseo/src/weights/pallet_asset_rate.rs +++ b/relay/paseo/src/weights/pallet_asset_rate.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_asset_rate` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_asset_rate // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +57,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `4703` - // Minimum execution time: 11_853_000 picoseconds. - Weight::from_parts(12_304_000, 0) + // Minimum execution time: 10_307_000 picoseconds. + Weight::from_parts(10_684_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +69,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `4703` - // Minimum execution time: 12_114_000 picoseconds. - Weight::from_parts(12_605_000, 0) + // Minimum execution time: 10_710_000 picoseconds. + Weight::from_parts(11_008_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +81,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `4703` - // Minimum execution time: 13_253_000 picoseconds. - Weight::from_parts(13_548_000, 0) + // Minimum execution time: 11_443_000 picoseconds. + Weight::from_parts(11_757_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_bags_list.rs b/relay/paseo/src/weights/pallet_bags_list.rs index 898d257..191b113 100644 --- a/relay/paseo/src/weights/pallet_bags_list.rs +++ b/relay/paseo/src/weights/pallet_bags_list.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_bags_list` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bags_list // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,10 +61,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn rebag_non_terminal() -> Weight { // Proof Size summary in bytes: - // Measured: `1618` + // Measured: `1690` // Estimated: `11506` - // Minimum execution time: 61_123_000 picoseconds. - Weight::from_parts(64_860_000, 0) + // Minimum execution time: 52_919_000 picoseconds. + Weight::from_parts(55_123_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -75,10 +79,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn rebag_terminal() -> Weight { // Proof Size summary in bytes: - // Measured: `1512` + // Measured: `1587` // Estimated: `8877` - // Minimum execution time: 59_235_000 picoseconds. - Weight::from_parts(61_019_000, 0) + // Minimum execution time: 51_869_000 picoseconds. + Weight::from_parts(53_897_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -95,10 +99,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn put_in_front_of() -> Weight { // Proof Size summary in bytes: - // Measured: `1823` + // Measured: `1895` // Estimated: `11506` - // Minimum execution time: 69_757_000 picoseconds. - Weight::from_parts(74_360_000, 0) + // Minimum execution time: 60_248_000 picoseconds. + Weight::from_parts(62_125_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(6)) diff --git a/relay/paseo/src/weights/pallet_balances.rs b/relay/paseo/src/weights/pallet_balances.rs index 33037be..f29983f 100644 --- a/relay/paseo/src/weights/pallet_balances.rs +++ b/relay/paseo/src/weights/pallet_balances.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_balances // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +57,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 60_240_000 picoseconds. - Weight::from_parts(93_535_000, 0) + // Minimum execution time: 43_206_000 picoseconds. + Weight::from_parts(44_062_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +69,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 42_952_000 picoseconds. - Weight::from_parts(62_623_000, 0) + // Minimum execution time: 34_046_000 picoseconds. + Weight::from_parts(34_656_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +81,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 17_332_000 picoseconds. - Weight::from_parts(27_325_000, 0) + // Minimum execution time: 12_780_000 picoseconds. + Weight::from_parts(13_175_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +93,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 20_346_000 picoseconds. - Weight::from_parts(21_005_000, 0) + // Minimum execution time: 17_600_000 picoseconds. + Weight::from_parts(18_029_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,8 +105,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 52_358_000 picoseconds. - Weight::from_parts(53_400_000, 0) + // Minimum execution time: 44_877_000 picoseconds. + Weight::from_parts(45_716_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -113,8 +117,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 50_476_000 picoseconds. - Weight::from_parts(51_213_000, 0) + // Minimum execution time: 42_540_000 picoseconds. + Weight::from_parts(43_226_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -125,8 +129,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 17_726_000 picoseconds. - Weight::from_parts(18_378_000, 0) + // Minimum execution time: 15_158_000 picoseconds. + Weight::from_parts(15_461_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -138,11 +142,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (135 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 17_165_000 picoseconds. - Weight::from_parts(17_769_000, 0) + // Minimum execution time: 14_834_000 picoseconds. + Weight::from_parts(14_907_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 54_152 - .saturating_add(Weight::from_parts(16_060_961, 0).saturating_mul(u.into())) + // Standard Error: 16_310 + .saturating_add(Weight::from_parts(13_363_661, 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())) diff --git a/relay/paseo/src/weights/pallet_bounties.rs b/relay/paseo/src/weights/pallet_bounties.rs index 9add7ef..e80fcc9 100644 --- a/relay/paseo/src/weights/pallet_bounties.rs +++ b/relay/paseo/src/weights/pallet_bounties.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_bounties` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_bounties // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,11 +64,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3593` - // Minimum execution time: 25_293_000 picoseconds. - Weight::from_parts(26_724_173, 0) + // Minimum execution time: 22_171_000 picoseconds. + Weight::from_parts(23_262_533, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(856, 0).saturating_mul(d.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(716, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -76,8 +80,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3642` - // Minimum execution time: 13_293_000 picoseconds. - Weight::from_parts(13_770_000, 0) + // Minimum execution time: 11_054_000 picoseconds. + Weight::from_parts(11_803_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -88,8 +92,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3642` - // Minimum execution time: 12_717_000 picoseconds. - Weight::from_parts(13_212_000, 0) + // Minimum execution time: 11_621_000 picoseconds. + Weight::from_parts(13_074_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -102,8 +106,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `465` // Estimated: `3642` - // Minimum execution time: 40_180_000 picoseconds. - Weight::from_parts(41_094_000, 0) + // Minimum execution time: 35_720_000 picoseconds. + Weight::from_parts(37_626_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -116,8 +120,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `461` // Estimated: `3642` - // Minimum execution time: 28_026_000 picoseconds. - Weight::from_parts(28_875_000, 0) + // Minimum execution time: 24_657_000 picoseconds. + Weight::from_parts(25_111_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -130,8 +134,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `368` // Estimated: `3642` - // Minimum execution time: 16_381_000 picoseconds. - Weight::from_parts(16_915_000, 0) + // Minimum execution time: 14_117_000 picoseconds. + Weight::from_parts(14_681_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -148,8 +152,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `732` // Estimated: `8799` - // Minimum execution time: 115_726_000 picoseconds. - Weight::from_parts(117_468_000, 0) + // Minimum execution time: 99_057_000 picoseconds. + Weight::from_parts(100_479_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -166,8 +170,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3642` - // Minimum execution time: 41_807_000 picoseconds. - Weight::from_parts(43_512_000, 0) + // Minimum execution time: 35_839_000 picoseconds. + Weight::from_parts(37_327_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -184,8 +188,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `648` // Estimated: `6196` - // Minimum execution time: 78_207_000 picoseconds. - Weight::from_parts(79_832_000, 0) + // Minimum execution time: 66_715_000 picoseconds. + Weight::from_parts(68_687_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -196,8 +200,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `325` // Estimated: `3642` - // Minimum execution time: 13_018_000 picoseconds. - Weight::from_parts(13_492_000, 0) + // Minimum execution time: 11_227_000 picoseconds. + Weight::from_parts(11_605_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -213,11 +217,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + b * (297 ±0)` // Estimated: `1887 + b * (5206 ±0)` - // Minimum execution time: 3_315_000 picoseconds. - Weight::from_parts(952_528, 0) + // Minimum execution time: 2_778_000 picoseconds. + Weight::from_parts(2_822_000, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 129_157 - .saturating_add(Weight::from_parts(37_485_563, 0).saturating_mul(b.into())) + // Standard Error: 20_518 + .saturating_add(Weight::from_parts(32_863_783, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_child_bounties.rs b/relay/paseo/src/weights/pallet_child_bounties.rs index 7c0d796..4cbddcd 100644 --- a/relay/paseo/src/weights/pallet_child_bounties.rs +++ b/relay/paseo/src/weights/pallet_child_bounties.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_child_bounties` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_child_bounties // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,11 +68,11 @@ impl pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo. //! Autogenerated weights for `pallet_conviction_voting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_conviction_voting // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,10 +65,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: - // Measured: `13446` + // Measured: `13480` // Estimated: `42428` - // Minimum execution time: 139_930_000 picoseconds. - Weight::from_parts(147_828_000, 0) + // Minimum execution time: 135_170_000 picoseconds. + Weight::from_parts(151_888_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -83,10 +87,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: - // Measured: `14167` + // Measured: `14201` // Estimated: `83866` - // Minimum execution time: 220_313_000 picoseconds. - Weight::from_parts(230_502_000, 0) + // Minimum execution time: 210_510_000 picoseconds. + Weight::from_parts(223_689_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -101,8 +105,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13919` // Estimated: `83866` - // Minimum execution time: 191_326_000 picoseconds. - Weight::from_parts(197_047_000, 0) + // Minimum execution time: 182_641_000 picoseconds. + Weight::from_parts(195_724_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -115,8 +119,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13005` // Estimated: `30706` - // Minimum execution time: 78_962_000 picoseconds. - Weight::from_parts(85_475_000, 0) + // Minimum execution time: 80_827_000 picoseconds. + Weight::from_parts(88_978_000, 0) .saturating_add(Weight::from_parts(0, 30706)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -136,13 +140,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// The range of component `r` is `[0, 512]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `29641 + r * (365 ±0)` + // Measured: `29675 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 71_927_000 picoseconds. - Weight::from_parts(1_764_881_721, 0) + // Minimum execution time: 70_172_000 picoseconds. + Weight::from_parts(1_764_097_330, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 183_337 - .saturating_add(Weight::from_parts(48_336_721, 0).saturating_mul(r.into())) + // Standard Error: 159_254 + .saturating_add(Weight::from_parts(43_395_230, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -160,11 +164,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `29556 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 40_074_000 picoseconds. - Weight::from_parts(1_855_922_537, 0) + // Minimum execution time: 38_933_000 picoseconds. + Weight::from_parts(1_690_655_508, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 195_801 - .saturating_add(Weight::from_parts(46_793_153, 0).saturating_mul(r.into())) + // Standard Error: 155_609 + .saturating_add(Weight::from_parts(43_452_998, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -181,10 +185,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `12218` + // Measured: `12252` // Estimated: `30706` - // Minimum execution time: 101_636_000 picoseconds. - Weight::from_parts(108_166_000, 0) + // Minimum execution time: 104_676_000 picoseconds. + Weight::from_parts(112_870_000, 0) .saturating_add(Weight::from_parts(0, 30706)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs b/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs index 544fda2..1d4de5c 100644 --- a/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs +++ b/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_election_provider_multi_phase` //! diff --git a/relay/paseo/src/weights/pallet_fast_unstake.rs b/relay/paseo/src/weights/pallet_fast_unstake.rs index cb1c955..99a6014 100644 --- a/relay/paseo/src/weights/pallet_fast_unstake.rs +++ b/relay/paseo/src/weights/pallet_fast_unstake.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_fast_unstake` //! diff --git a/relay/paseo/src/weights/pallet_identity.rs b/relay/paseo/src/weights/pallet_identity.rs index ffb8844..758715c 100644 --- a/relay/paseo/src/weights/pallet_identity.rs +++ b/relay/paseo/src/weights/pallet_identity.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_identity` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_identity // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,11 +58,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_168_000 picoseconds. - Weight::from_parts(9_788_078, 0) + // Minimum execution time: 7_733_000 picoseconds. + Weight::from_parts(8_366_649, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_435 - .saturating_add(Weight::from_parts(90_912, 0).saturating_mul(r.into())) + // Standard Error: 1_475 + .saturating_add(Weight::from_parts(87_533, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,15 +70,17 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(_r: u32, x: u32, ) -> Weight { + fn set_identity(r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 31_611_000 picoseconds. - Weight::from_parts(37_116_530, 0) + // Minimum execution time: 27_475_000 picoseconds. + Weight::from_parts(24_816_235, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_148 - .saturating_add(Weight::from_parts(586_610, 0).saturating_mul(x.into())) + // Standard Error: 3_842 + .saturating_add(Weight::from_parts(168_829, 0).saturating_mul(r.into())) + // Standard Error: 749 + .saturating_add(Weight::from_parts(461_025, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -89,11 +95,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 9_753_000 picoseconds. - Weight::from_parts(26_124_406, 0) + // Minimum execution time: 8_375_000 picoseconds. + Weight::from_parts(18_446_361, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 21_172 - .saturating_add(Weight::from_parts(3_627_282, 0).saturating_mul(s.into())) + // Standard Error: 4_019 + .saturating_add(Weight::from_parts(3_087_659, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -111,11 +117,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `194 + p * (32 ±0)` // Estimated: `11003` - // Minimum execution time: 9_516_000 picoseconds. - Weight::from_parts(23_177_675, 0) + // Minimum execution time: 8_419_000 picoseconds. + Weight::from_parts(19_014_707, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_869 - .saturating_add(Weight::from_parts(1_491_585, 0).saturating_mul(p.into())) + // Standard Error: 2_738 + .saturating_add(Weight::from_parts(1_295_234, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -129,17 +135,19 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(_r: u32, s: u32, x: u32, ) -> Weight { + fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 59_811_000 picoseconds. - Weight::from_parts(57_605_796, 0) + // Minimum execution time: 52_441_000 picoseconds. + Weight::from_parts(28_075_401, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_262 - .saturating_add(Weight::from_parts(1_421_699, 0).saturating_mul(s.into())) - // Standard Error: 10_262 - .saturating_add(Weight::from_parts(238_788, 0).saturating_mul(x.into())) + // Standard Error: 10_929 + .saturating_add(Weight::from_parts(134_695, 0).saturating_mul(r.into())) + // Standard Error: 2_134 + .saturating_add(Weight::from_parts(1_291_235, 0).saturating_mul(s.into())) + // Standard Error: 2_134 + .saturating_add(Weight::from_parts(259_478, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -154,13 +162,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 33_619_000 picoseconds. - Weight::from_parts(8_016_306, 0) + // Minimum execution time: 26_848_000 picoseconds. + Weight::from_parts(25_011_542, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 102_023 - .saturating_add(Weight::from_parts(1_192_071, 0).saturating_mul(r.into())) - // Standard Error: 19_906 - .saturating_add(Weight::from_parts(755_574, 0).saturating_mul(x.into())) + // Standard Error: 3_649 + .saturating_add(Weight::from_parts(157_213, 0).saturating_mul(r.into())) + // Standard Error: 712 + .saturating_add(Weight::from_parts(495_951, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -172,13 +180,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398 + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 29_031_000 picoseconds. - Weight::from_parts(25_066_080, 0) + // Minimum execution time: 24_370_000 picoseconds. + Weight::from_parts(23_616_593, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 34_931 - .saturating_add(Weight::from_parts(306_513, 0).saturating_mul(r.into())) - // Standard Error: 6_815 - .saturating_add(Weight::from_parts(585_608, 0).saturating_mul(x.into())) + // Standard Error: 2_838 + .saturating_add(Weight::from_parts(91_214, 0).saturating_mul(r.into())) + // Standard Error: 553 + .saturating_add(Weight::from_parts(472_533, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -189,24 +197,26 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_685_000 picoseconds. - Weight::from_parts(8_211_002, 0) + // Minimum execution time: 5_515_000 picoseconds. + Weight::from_parts(6_052_251, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 8_581 - .saturating_add(Weight::from_parts(26_535, 0).saturating_mul(r.into())) + // Standard Error: 918 + .saturating_add(Weight::from_parts(73_223, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:1) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - fn set_account_id(_r: u32, ) -> Weight { + fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_932_000 picoseconds. - Weight::from_parts(9_640_024, 0) + // Minimum execution time: 5_911_000 picoseconds. + Weight::from_parts(6_258_125, 0) .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 973 + .saturating_add(Weight::from_parts(70_894, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -217,11 +227,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_570_000 picoseconds. - Weight::from_parts(6_887_060, 0) + // Minimum execution time: 5_690_000 picoseconds. + Weight::from_parts(6_049_149, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 884 - .saturating_add(Weight::from_parts(72_380, 0).saturating_mul(r.into())) + // Standard Error: 1_039 + .saturating_add(Weight::from_parts(73_621, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -235,13 +245,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 22_698_000 picoseconds. - Weight::from_parts(23_342_511, 0) + // Minimum execution time: 19_558_000 picoseconds. + Weight::from_parts(18_348_326, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 40_423 - .saturating_add(Weight::from_parts(294_270, 0).saturating_mul(r.into())) - // Standard Error: 7_479 - .saturating_add(Weight::from_parts(874_288, 0).saturating_mul(x.into())) + // Standard Error: 4_288 + .saturating_add(Weight::from_parts(128_899, 0).saturating_mul(r.into())) + // Standard Error: 793 + .saturating_add(Weight::from_parts(761_648, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -260,15 +270,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 75_440_000 picoseconds. - Weight::from_parts(33_066_227, 0) + // Minimum execution time: 66_002_000 picoseconds. + Weight::from_parts(39_371_039, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 148_020 - .saturating_add(Weight::from_parts(1_566_835, 0).saturating_mul(r.into())) - // Standard Error: 28_906 - .saturating_add(Weight::from_parts(1_699_927, 0).saturating_mul(s.into())) - // Standard Error: 28_906 - .saturating_add(Weight::from_parts(203_087, 0).saturating_mul(x.into())) + // Standard Error: 13_673 + .saturating_add(Weight::from_parts(238_248, 0).saturating_mul(r.into())) + // Standard Error: 2_670 + .saturating_add(Weight::from_parts(1_322_628, 0).saturating_mul(s.into())) + // Standard Error: 2_670 + .saturating_add(Weight::from_parts(294_550, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -284,11 +294,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` // Estimated: `11003` - // Minimum execution time: 28_104_000 picoseconds. - Weight::from_parts(35_085_457, 0) + // Minimum execution time: 24_323_000 picoseconds. + Weight::from_parts(27_243_349, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_605 - .saturating_add(Weight::from_parts(96_391, 0).saturating_mul(s.into())) + // Standard Error: 1_483 + .saturating_add(Weight::from_parts(119_971, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -301,11 +311,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` // Estimated: `11003` - // Minimum execution time: 13_534_000 picoseconds. - Weight::from_parts(17_733_031, 0) + // Minimum execution time: 11_716_000 picoseconds. + Weight::from_parts(15_075_277, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_391 - .saturating_add(Weight::from_parts(51_894, 0).saturating_mul(s.into())) + // Standard Error: 834 + .saturating_add(Weight::from_parts(41_631, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -320,11 +330,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` // Estimated: `11003` - // Minimum execution time: 36_477_000 picoseconds. - Weight::from_parts(42_936_754, 0) + // Minimum execution time: 29_421_000 picoseconds. + Weight::from_parts(30_979_411, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 9_086 - .saturating_add(Weight::from_parts(37_403, 0).saturating_mul(s.into())) + // Standard Error: 913 + .saturating_add(Weight::from_parts(90_615, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -339,11 +349,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 26_501_000 picoseconds. - Weight::from_parts(29_298_882, 0) + // Minimum execution time: 22_936_000 picoseconds. + Weight::from_parts(24_517_892, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 1_377 - .saturating_add(Weight::from_parts(84_386, 0).saturating_mul(s.into())) + // Standard Error: 879 + .saturating_add(Weight::from_parts(77_322, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_im_online.rs b/relay/paseo/src/weights/pallet_im_online.rs index eff7348..3e20819 100644 --- a/relay/paseo/src/weights/pallet_im_online.rs +++ b/relay/paseo/src/weights/pallet_im_online.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_im_online` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_im_online // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,13 +64,13 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `394 + k * (32 ±0)` + // Measured: `559 + k * (32 ±0)` // Estimated: `321487 + k * (1761 ±0)` - // Minimum execution time: 74_758_000 picoseconds. - Weight::from_parts(93_999_287, 0) + // Minimum execution time: 76_514_000 picoseconds. + Weight::from_parts(93_114_641, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 691 - .saturating_add(Weight::from_parts(35_893, 0).saturating_mul(k.into())) + // Standard Error: 522 + .saturating_add(Weight::from_parts(31_583, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 1761).saturating_mul(k.into())) diff --git a/relay/paseo/src/weights/pallet_indices.rs b/relay/paseo/src/weights/pallet_indices.rs index 04161fd..7b62b08 100644 --- a/relay/paseo/src/weights/pallet_indices.rs +++ b/relay/paseo/src/weights/pallet_indices.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_indices` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_indices // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +57,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3534` - // Minimum execution time: 22_167_000 picoseconds. - Weight::from_parts(22_667_000, 0) + // Minimum execution time: 18_413_000 picoseconds. + Weight::from_parts(18_725_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -67,8 +71,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 34_591_000 picoseconds. - Weight::from_parts(35_552_000, 0) + // Minimum execution time: 28_869_000 picoseconds. + Weight::from_parts(29_383_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -79,8 +83,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 23_038_000 picoseconds. - Weight::from_parts(25_037_000, 0) + // Minimum execution time: 19_653_000 picoseconds. + Weight::from_parts(19_961_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -93,8 +97,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 27_317_000 picoseconds. - Weight::from_parts(41_943_000, 0) + // Minimum execution time: 21_448_000 picoseconds. + Weight::from_parts(21_944_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -105,8 +109,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 25_345_000 picoseconds. - Weight::from_parts(35_990_000, 0) + // Minimum execution time: 20_655_000 picoseconds. + Weight::from_parts(21_071_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_message_queue.rs b/relay/paseo/src/weights/pallet_message_queue.rs index 8e422ab..dd801c2 100644 --- a/relay/paseo/src/weights/pallet_message_queue.rs +++ b/relay/paseo/src/weights/pallet_message_queue.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_message_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_message_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +59,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 15_288_000 picoseconds. - Weight::from_parts(15_742_000, 0) + // Minimum execution time: 12_343_000 picoseconds. + Weight::from_parts(12_772_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,8 +73,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 13_623_000 picoseconds. - Weight::from_parts(14_350_000, 0) + // Minimum execution time: 11_195_000 picoseconds. + Weight::from_parts(11_693_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -81,8 +85,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `42` // Estimated: `3520` - // Minimum execution time: 4_658_000 picoseconds. - Weight::from_parts(4_804_000, 0) + // Minimum execution time: 3_701_000 picoseconds. + Weight::from_parts(3_935_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -93,8 +97,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 6_732_000 picoseconds. - Weight::from_parts(7_027_000, 0) + // Minimum execution time: 5_526_000 picoseconds. + Weight::from_parts(5_764_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -105,8 +109,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 6_934_000 picoseconds. - Weight::from_parts(7_278_000, 0) + // Minimum execution time: 5_563_000 picoseconds. + Weight::from_parts(5_795_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -115,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 103_616_000 picoseconds. - Weight::from_parts(104_387_000, 0) + // Minimum execution time: 91_091_000 picoseconds. + Weight::from_parts(91_979_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) @@ -127,8 +131,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `220` // Estimated: `3520` - // Minimum execution time: 7_253_000 picoseconds. - Weight::from_parts(7_654_000, 0) + // Minimum execution time: 6_223_000 picoseconds. + Weight::from_parts(6_490_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -145,8 +149,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 69_480_000 picoseconds. - Weight::from_parts(70_836_000, 0) + // Minimum execution time: 55_947_000 picoseconds. + Weight::from_parts(56_791_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -163,8 +167,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 86_857_000 picoseconds. - Weight::from_parts(88_634_000, 0) + // Minimum execution time: 71_122_000 picoseconds. + Weight::from_parts(72_402_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -181,8 +185,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 130_288_000 picoseconds. - Weight::from_parts(132_689_000, 0) + // Minimum execution time: 113_425_000 picoseconds. + Weight::from_parts(115_258_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/relay/paseo/src/weights/pallet_multisig.rs b/relay/paseo/src/weights/pallet_multisig.rs index cf53499..557ef18 100644 --- a/relay/paseo/src/weights/pallet_multisig.rs +++ b/relay/paseo/src/weights/pallet_multisig.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_multisig` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_multisig // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,11 +56,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_891_000 picoseconds. - Weight::from_parts(13_805_132, 0) + // Minimum execution time: 12_662_000 picoseconds. + Weight::from_parts(13_481_934, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 37 - .saturating_add(Weight::from_parts(954, 0).saturating_mul(z.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(554, 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`) @@ -66,13 +70,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 45_889_000 picoseconds. - Weight::from_parts(39_499_549, 0) + // Minimum execution time: 41_446_000 picoseconds. + Weight::from_parts(28_224_090, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 5_810 - .saturating_add(Weight::from_parts(97_917, 0).saturating_mul(s.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(2_007, 0).saturating_mul(z.into())) + // Standard Error: 923 + .saturating_add(Weight::from_parts(142_413, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_538, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -84,13 +88,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 28_775_000 picoseconds. - Weight::from_parts(20_967_664, 0) + // Minimum execution time: 25_377_000 picoseconds. + Weight::from_parts(16_607_084, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 4_204 - .saturating_add(Weight::from_parts(123_813, 0).saturating_mul(s.into())) - // Standard Error: 41 - .saturating_add(Weight::from_parts(1_645, 0).saturating_mul(z.into())) + // Standard Error: 782 + .saturating_add(Weight::from_parts(106_377, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_473, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,13 +108,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `392 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 52_547_000 picoseconds. - Weight::from_parts(38_933_896, 0) + // Minimum execution time: 45_986_000 picoseconds. + Weight::from_parts(34_083_317, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 4_178 - .saturating_add(Weight::from_parts(174_768, 0).saturating_mul(s.into())) - // Standard Error: 40 - .saturating_add(Weight::from_parts(1_830, 0).saturating_mul(z.into())) + // Standard Error: 1_360 + .saturating_add(Weight::from_parts(159_314, 0).saturating_mul(s.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_495, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -121,11 +125,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 29_233_000 picoseconds. - Weight::from_parts(34_332_536, 0) + // Minimum execution time: 25_804_000 picoseconds. + Weight::from_parts(27_560_338, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_774 - .saturating_add(Weight::from_parts(125_814, 0).saturating_mul(s.into())) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(139_434, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,11 +140,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 16_485_000 picoseconds. - Weight::from_parts(18_041_032, 0) + // Minimum execution time: 14_894_000 picoseconds. + Weight::from_parts(15_336_125, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_683 - .saturating_add(Weight::from_parts(114_082, 0).saturating_mul(s.into())) + // Standard Error: 513 + .saturating_add(Weight::from_parts(106_933, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -151,11 +155,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `458 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 31_747_000 picoseconds. - Weight::from_parts(34_365_754, 0) + // Minimum execution time: 27_780_000 picoseconds. + Weight::from_parts(30_590_352, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 9_080 - .saturating_add(Weight::from_parts(191_673, 0).saturating_mul(s.into())) + // Standard Error: 1_169 + .saturating_add(Weight::from_parts(129_442, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/pallet_nomination_pools.rs b/relay/paseo/src/weights/pallet_nomination_pools.rs index 1d00915..7dc54be 100644 --- a/relay/paseo/src/weights/pallet_nomination_pools.rs +++ b/relay/paseo/src/weights/pallet_nomination_pools.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_nomination_pools` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_nomination_pools // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -81,10 +85,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn join() -> Weight { // Proof Size summary in bytes: - // Measured: `3323` + // Measured: `3362` // Estimated: `8877` - // Minimum execution time: 212_767_000 picoseconds. - Weight::from_parts(218_193_000, 0) + // Minimum execution time: 174_388_000 picoseconds. + Weight::from_parts(178_674_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -115,10 +119,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn bond_extra_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `3333` + // Measured: `3372` // Estimated: `8877` - // Minimum execution time: 218_279_000 picoseconds. - Weight::from_parts(275_792_000, 0) + // Minimum execution time: 177_448_000 picoseconds. + Weight::from_parts(181_217_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(13)) @@ -143,7 +147,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `VoterList::ListNodes` (r:3 w:3) + /// Storage: `VoterList::ListNodes` (r:2 w:2) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) @@ -151,13 +155,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn bond_extra_other() -> Weight { // Proof Size summary in bytes: - // Measured: `3398` - // Estimated: `8877` - // Minimum execution time: 252_687_000 picoseconds. - Weight::from_parts(269_137_000, 0) - .saturating_add(Weight::from_parts(0, 8877)) - .saturating_add(T::DbWeight::get().reads(18)) - .saturating_add(T::DbWeight::get().writes(14)) + // Measured: `3282` + // Estimated: `8799` + // Minimum execution time: 199_890_000 picoseconds. + Weight::from_parts(202_310_000, 0) + .saturating_add(Weight::from_parts(0, 8799)) + .saturating_add(T::DbWeight::get().reads(17)) + .saturating_add(T::DbWeight::get().writes(13)) } /// Storage: `NominationPools::ClaimPermissions` (r:1 w:0) /// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) @@ -175,8 +179,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1137` // Estimated: `4182` - // Minimum execution time: 84_960_000 picoseconds. - Weight::from_parts(86_875_000, 0) + // Minimum execution time: 69_782_000 picoseconds. + Weight::from_parts(71_578_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -215,10 +219,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::CounterForSubPoolsStorage` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn unbond() -> Weight { // Proof Size summary in bytes: - // Measured: `3540` + // Measured: `3552` // Estimated: `8877` - // Minimum execution time: 188_264_000 picoseconds. - Weight::from_parts(192_845_000, 0) + // Minimum execution time: 157_954_000 picoseconds. + Weight::from_parts(161_556_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -240,13 +244,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1712` + // Measured: `1816` // Estimated: `4764` - // Minimum execution time: 76_506_000 picoseconds. - Weight::from_parts(79_008_176, 0) + // Minimum execution time: 64_861_000 picoseconds. + Weight::from_parts(66_636_015, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_321 - .saturating_add(Weight::from_parts(54_443, 0).saturating_mul(s.into())) + // Standard Error: 1_180 + .saturating_add(Weight::from_parts(61_338, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -277,13 +281,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2102` + // Measured: `2206` // Estimated: `4764` - // Minimum execution time: 146_288_000 picoseconds. - Weight::from_parts(144_992_030, 0) + // Minimum execution time: 121_755_000 picoseconds. + Weight::from_parts(125_922_454, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 16_708 - .saturating_add(Weight::from_parts(319_264, 0).saturating_mul(s.into())) + // Standard Error: 2_036 + .saturating_add(Weight::from_parts(79_306, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -336,10 +340,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(_s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2357` + // Measured: `2666` // Estimated: `8538` - // Minimum execution time: 268_143_000 picoseconds. - Weight::from_parts(310_303_626, 0) + // Minimum execution time: 225_288_000 picoseconds. + Weight::from_parts(232_333_445, 0) .saturating_add(Weight::from_parts(0, 8538)) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(20)) @@ -392,10 +396,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `1069` + // Measured: `1067` // Estimated: `8538` - // Minimum execution time: 195_286_000 picoseconds. - Weight::from_parts(198_468_000, 0) + // Minimum execution time: 167_182_000 picoseconds. + Weight::from_parts(170_727_000, 0) .saturating_add(Weight::from_parts(0, 8538)) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(17)) @@ -427,13 +431,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1678` + // Measured: `1866` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 69_864_000 picoseconds. - Weight::from_parts(72_654_153, 0) + // Minimum execution time: 59_258_000 picoseconds. + Weight::from_parts(60_008_870, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 22_836 - .saturating_add(Weight::from_parts(1_693_268, 0).saturating_mul(n.into())) + // Standard Error: 7_414 + .saturating_add(Weight::from_parts(1_499_161, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -447,10 +451,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) fn set_state() -> Weight { // Proof Size summary in bytes: - // Measured: `1331` + // Measured: `1401` // Estimated: `4556` - // Minimum execution time: 35_385_000 picoseconds. - Weight::from_parts(36_886_000, 0) + // Minimum execution time: 30_820_000 picoseconds. + Weight::from_parts(31_524_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -466,11 +470,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3735` - // Minimum execution time: 14_097_000 picoseconds. - Weight::from_parts(14_788_816, 0) + // Minimum execution time: 12_106_000 picoseconds. + Weight::from_parts(12_748_197, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 335 - .saturating_add(Weight::from_parts(5_405, 0).saturating_mul(n.into())) + // Standard Error: 104 + .saturating_add(Weight::from_parts(1_161, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -490,8 +494,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_125_000 picoseconds. - Weight::from_parts(4_587_000, 0) + // Minimum execution time: 3_530_000 picoseconds. + Weight::from_parts(3_782_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -501,8 +505,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 18_460_000 picoseconds. - Weight::from_parts(21_983_000, 0) + // Minimum execution time: 15_534_000 picoseconds. + Weight::from_parts(16_277_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -527,10 +531,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill() -> Weight { // Proof Size summary in bytes: - // Measured: `1891` + // Measured: `2035` // Estimated: `4556` - // Minimum execution time: 68_921_000 picoseconds. - Weight::from_parts(76_581_000, 0) + // Minimum execution time: 58_635_000 picoseconds. + Weight::from_parts(60_271_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -547,8 +551,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `736` // Estimated: `3685` - // Minimum execution time: 40_468_000 picoseconds. - Weight::from_parts(42_234_000, 0) + // Minimum execution time: 30_926_000 picoseconds. + Weight::from_parts(32_075_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -561,8 +565,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `537` // Estimated: `3685` - // Minimum execution time: 18_657_000 picoseconds. - Weight::from_parts(21_457_000, 0) + // Minimum execution time: 15_241_000 picoseconds. + Weight::from_parts(15_969_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -573,8 +577,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 18_363_000 picoseconds. - Weight::from_parts(19_781_000, 0) + // Minimum execution time: 15_128_000 picoseconds. + Weight::from_parts(15_851_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -587,8 +591,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `508` // Estimated: `4182` - // Minimum execution time: 16_182_000 picoseconds. - Weight::from_parts(19_155_000, 0) + // Minimum execution time: 13_529_000 picoseconds. + Weight::from_parts(13_982_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -605,8 +609,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `934` // Estimated: `3685` - // Minimum execution time: 75_220_000 picoseconds. - Weight::from_parts(101_950_000, 0) + // Minimum execution time: 58_511_000 picoseconds. + Weight::from_parts(59_408_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -621,10 +625,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn adjust_pool_deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `866` + // Measured: `946` // Estimated: `4764` - // Minimum execution time: 77_947_000 picoseconds. - Weight::from_parts(83_319_000, 0) + // Minimum execution time: 64_007_000 picoseconds. + Weight::from_parts(65_129_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/relay/paseo/src/weights/pallet_offences.rs b/relay/paseo/src/weights/pallet_offences.rs index f0a9d7d..ceb53fb 100644 --- a/relay/paseo/src/weights/pallet_offences.rs +++ b/relay/paseo/src/weights/pallet_offences.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_offences` //! diff --git a/relay/paseo/src/weights/pallet_preimage.rs b/relay/paseo/src/weights/pallet_preimage.rs index 6f29788..6b58e5b 100644 --- a/relay/paseo/src/weights/pallet_preimage.rs +++ b/relay/paseo/src/weights/pallet_preimage.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_preimage` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_preimage // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,11 +64,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 46_596_000 picoseconds. - Weight::from_parts(101_522_510, 0) + // Minimum execution time: 41_264_000 picoseconds. + Weight::from_parts(115_478_709, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 16 - .saturating_add(Weight::from_parts(2_733, 0).saturating_mul(s.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(2_194, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -79,11 +83,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 15_864_000 picoseconds. - Weight::from_parts(16_694_000, 0) + // Minimum execution time: 14_315_000 picoseconds. + Weight::from_parts(14_443_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_774, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_479, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -98,11 +102,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 15_396_000 picoseconds. - Weight::from_parts(15_652_000, 0) + // Minimum execution time: 13_600_000 picoseconds. + Weight::from_parts(13_949_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(2_740, 0).saturating_mul(s.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_480, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -118,8 +122,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `244` // Estimated: `3556` - // Minimum execution time: 61_897_000 picoseconds. - Weight::from_parts(65_378_000, 0) + // Minimum execution time: 55_238_000 picoseconds. + Weight::from_parts(64_350_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -134,8 +138,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 33_842_000 picoseconds. - Weight::from_parts(39_427_000, 0) + // Minimum execution time: 27_749_000 picoseconds. + Weight::from_parts(35_028_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -148,8 +152,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `188` // Estimated: `3556` - // Minimum execution time: 29_030_000 picoseconds. - Weight::from_parts(31_264_000, 0) + // Minimum execution time: 19_990_000 picoseconds. + Weight::from_parts(22_808_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -162,8 +166,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 20_217_000 picoseconds. - Weight::from_parts(21_693_000, 0) + // Minimum execution time: 13_287_000 picoseconds. + Weight::from_parts(16_042_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -176,8 +180,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 16_547_000 picoseconds. - Weight::from_parts(18_609_000, 0) + // Minimum execution time: 14_047_000 picoseconds. + Weight::from_parts(15_342_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -190,8 +194,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 10_783_000 picoseconds. - Weight::from_parts(11_805_000, 0) + // Minimum execution time: 9_567_000 picoseconds. + Weight::from_parts(10_026_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -206,8 +210,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 25_399_000 picoseconds. - Weight::from_parts(27_383_000, 0) + // Minimum execution time: 20_373_000 picoseconds. + Weight::from_parts(23_910_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -220,8 +224,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 11_070_000 picoseconds. - Weight::from_parts(11_762_000, 0) + // Minimum execution time: 9_800_000 picoseconds. + Weight::from_parts(10_450_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -234,8 +238,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 10_430_000 picoseconds. - Weight::from_parts(11_035_000, 0) + // Minimum execution time: 9_735_000 picoseconds. + Weight::from_parts(10_477_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -253,11 +257,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + n * (227 ±0)` // Estimated: `990 + n * (2603 ±0)` - // Minimum execution time: 53_413_000 picoseconds. - Weight::from_parts(53_924_000, 0) + // Minimum execution time: 46_578_000 picoseconds. + Weight::from_parts(46_893_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 187_520 - .saturating_add(Weight::from_parts(57_834_767, 0).saturating_mul(n.into())) + // Standard Error: 54_208 + .saturating_add(Weight::from_parts(49_770_526, 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, 2603).saturating_mul(n.into())) diff --git a/relay/paseo/src/weights/pallet_proxy.rs b/relay/paseo/src/weights/pallet_proxy.rs index b19cbe4..1233c30 100644 --- a/relay/paseo/src/weights/pallet_proxy.rs +++ b/relay/paseo/src/weights/pallet_proxy.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_proxy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_proxy // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,13 +54,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Storage: `Proxy::Proxies` (r:1 w:0) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn proxy(_p: u32, ) -> Weight { + fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 13_452_000 picoseconds. - Weight::from_parts(16_097_177, 0) + // Minimum execution time: 12_025_000 picoseconds. + Weight::from_parts(12_596_335, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 854 + .saturating_add(Weight::from_parts(34_955, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -71,13 +77,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `416 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 38_678_000 picoseconds. - Weight::from_parts(38_002_542, 0) + // Minimum execution time: 32_295_000 picoseconds. + Weight::from_parts(32_939_511, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 15_091 - .saturating_add(Weight::from_parts(171_490, 0).saturating_mul(a.into())) - // Standard Error: 15_592 - .saturating_add(Weight::from_parts(130_713, 0).saturating_mul(p.into())) + // Standard Error: 2_384 + .saturating_add(Weight::from_parts(135_401, 0).saturating_mul(a.into())) + // Standard Error: 2_463 + .saturating_add(Weight::from_parts(38_145, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +97,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `331 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 24_121_000 picoseconds. - Weight::from_parts(26_734_045, 0) + // Minimum execution time: 19_936_000 picoseconds. + Weight::from_parts(20_165_711, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 4_546 - .saturating_add(Weight::from_parts(88_770, 0).saturating_mul(a.into())) - // Standard Error: 4_697 - .saturating_add(Weight::from_parts(7_143, 0).saturating_mul(p.into())) + // Standard Error: 2_093 + .saturating_add(Weight::from_parts(145_791, 0).saturating_mul(a.into())) + // Standard Error: 2_163 + .saturating_add(Weight::from_parts(9_018, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -111,13 +117,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `331 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 23_443_000 picoseconds. - Weight::from_parts(23_785_662, 0) + // Minimum execution time: 19_872_000 picoseconds. + Weight::from_parts(20_398_560, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 8_777 - .saturating_add(Weight::from_parts(172_749, 0).saturating_mul(a.into())) - // Standard Error: 9_069 - .saturating_add(Weight::from_parts(61_486, 0).saturating_mul(p.into())) + // Standard Error: 2_496 + .saturating_add(Weight::from_parts(136_204, 0).saturating_mul(a.into())) + // Standard Error: 2_579 + .saturating_add(Weight::from_parts(9_044, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -133,13 +139,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 34_551_000 picoseconds. - Weight::from_parts(34_728_693, 0) + // Minimum execution time: 29_565_000 picoseconds. + Weight::from_parts(29_853_281, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 11_759 - .saturating_add(Weight::from_parts(198_085, 0).saturating_mul(a.into())) - // Standard Error: 12_150 - .saturating_add(Weight::from_parts(31_273, 0).saturating_mul(p.into())) + // Standard Error: 1_913 + .saturating_add(Weight::from_parts(139_102, 0).saturating_mul(a.into())) + // Standard Error: 1_977 + .saturating_add(Weight::from_parts(32_951, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -150,11 +156,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_738_000 picoseconds. - Weight::from_parts(23_426_323, 0) + // Minimum execution time: 19_634_000 picoseconds. + Weight::from_parts(20_304_683, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_007 - .saturating_add(Weight::from_parts(48_681, 0).saturating_mul(p.into())) + // Standard Error: 924 + .saturating_add(Weight::from_parts(34_868, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,11 +171,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_499_000 picoseconds. - Weight::from_parts(23_643_958, 0) + // Minimum execution time: 19_497_000 picoseconds. + Weight::from_parts(20_481_952, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_765 - .saturating_add(Weight::from_parts(50_161, 0).saturating_mul(p.into())) + // Standard Error: 1_506 + .saturating_add(Weight::from_parts(36_598, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,24 +186,26 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 21_158_000 picoseconds. - Weight::from_parts(21_983_601, 0) + // Minimum execution time: 17_813_000 picoseconds. + Weight::from_parts(18_486_997, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_505 - .saturating_add(Weight::from_parts(50_322, 0).saturating_mul(p.into())) + // Standard Error: 1_239 + .saturating_add(Weight::from_parts(41_601, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(_p: u32, ) -> Weight { + fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `4706` - // Minimum execution time: 23_646_000 picoseconds. - Weight::from_parts(24_989_761, 0) + // Minimum execution time: 20_252_000 picoseconds. + Weight::from_parts(21_007_321, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_178 + .saturating_add(Weight::from_parts(16_876, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -208,11 +216,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `126 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_150_000 picoseconds. - Weight::from_parts(22_367_724, 0) + // Minimum execution time: 18_774_000 picoseconds. + Weight::from_parts(19_624_167, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 7_381 - .saturating_add(Weight::from_parts(129_420, 0).saturating_mul(p.into())) + // Standard Error: 1_031 + .saturating_add(Weight::from_parts(25_173, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/pallet_referenda.rs b/relay/paseo/src/weights/pallet_referenda.rs index 9432d4c..6b01a21 100644 --- a/relay/paseo/src/weights/pallet_referenda.rs +++ b/relay/paseo/src/weights/pallet_referenda.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_referenda` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_referenda // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +61,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `42428` - // Minimum execution time: 34_179_000 picoseconds. - Weight::from_parts(35_538_000, 0) + // Minimum execution time: 29_169_000 picoseconds. + Weight::from_parts(30_199_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -71,8 +75,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 50_738_000 picoseconds. - Weight::from_parts(58_407_000, 0) + // Minimum execution time: 42_683_000 picoseconds. + Weight::from_parts(43_679_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -89,8 +93,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3226` // Estimated: `42428` - // Minimum execution time: 69_138_000 picoseconds. - Weight::from_parts(75_368_000, 0) + // Minimum execution time: 58_827_000 picoseconds. + Weight::from_parts(60_473_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -107,8 +111,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3246` // Estimated: `42428` - // Minimum execution time: 65_081_000 picoseconds. - Weight::from_parts(67_683_000, 0) + // Minimum execution time: 58_025_000 picoseconds. + Weight::from_parts(60_216_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -123,8 +127,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 59_711_000 picoseconds. - Weight::from_parts(61_067_000, 0) + // Minimum execution time: 51_660_000 picoseconds. + Weight::from_parts(52_527_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -139,8 +143,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 57_660_000 picoseconds. - Weight::from_parts(59_280_000, 0) + // Minimum execution time: 49_530_000 picoseconds. + Weight::from_parts(50_475_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -151,8 +155,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `4401` - // Minimum execution time: 27_573_000 picoseconds. - Weight::from_parts(28_410_000, 0) + // Minimum execution time: 23_690_000 picoseconds. + Weight::from_parts(24_092_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -163,8 +167,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `4401` - // Minimum execution time: 27_591_000 picoseconds. - Weight::from_parts(28_491_000, 0) + // Minimum execution time: 23_781_000 picoseconds. + Weight::from_parts(24_439_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -177,8 +181,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `83866` - // Minimum execution time: 33_826_000 picoseconds. - Weight::from_parts(34_280_000, 0) + // Minimum execution time: 29_541_000 picoseconds. + Weight::from_parts(30_127_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -193,8 +197,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `588` // Estimated: `83866` - // Minimum execution time: 93_648_000 picoseconds. - Weight::from_parts(95_524_000, 0) + // Minimum execution time: 80_515_000 picoseconds. + Weight::from_parts(81_934_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -207,8 +211,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `102` // Estimated: `5477` - // Minimum execution time: 9_934_000 picoseconds. - Weight::from_parts(10_314_000, 0) + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_936_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -223,8 +227,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 49_273_000 picoseconds. - Weight::from_parts(51_293_000, 0) + // Minimum execution time: 42_731_000 picoseconds. + Weight::from_parts(44_633_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -239,8 +243,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 52_207_000 picoseconds. - Weight::from_parts(56_128_000, 0) + // Minimum execution time: 43_808_000 picoseconds. + Weight::from_parts(46_328_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -253,8 +257,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 26_144_000 picoseconds. - Weight::from_parts(27_483_000, 0) + // Minimum execution time: 23_217_000 picoseconds. + Weight::from_parts(24_659_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -267,8 +271,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 24_352_000 picoseconds. - Weight::from_parts(25_630_000, 0) + // Minimum execution time: 22_404_000 picoseconds. + Weight::from_parts(24_822_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -283,8 +287,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2943` // Estimated: `5477` - // Minimum execution time: 29_829_000 picoseconds. - Weight::from_parts(31_249_000, 0) + // Minimum execution time: 26_067_000 picoseconds. + Weight::from_parts(27_467_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -299,8 +303,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2963` // Estimated: `5477` - // Minimum execution time: 29_620_000 picoseconds. - Weight::from_parts(30_851_000, 0) + // Minimum execution time: 26_529_000 picoseconds. + Weight::from_parts(28_025_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -313,8 +317,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299` // Estimated: `42428` - // Minimum execution time: 22_548_000 picoseconds. - Weight::from_parts(23_336_000, 0) + // Minimum execution time: 19_930_000 picoseconds. + Weight::from_parts(20_495_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -327,8 +331,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 22_357_000 picoseconds. - Weight::from_parts(23_214_000, 0) + // Minimum execution time: 20_146_000 picoseconds. + Weight::from_parts(20_732_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -339,8 +343,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `4401` - // Minimum execution time: 14_414_000 picoseconds. - Weight::from_parts(15_048_000, 0) + // Minimum execution time: 12_239_000 picoseconds. + Weight::from_parts(12_683_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -355,8 +359,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 29_440_000 picoseconds. - Weight::from_parts(30_655_000, 0) + // Minimum execution time: 25_979_000 picoseconds. + Weight::from_parts(26_647_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -371,8 +375,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 31_772_000 picoseconds. - Weight::from_parts(32_430_000, 0) + // Minimum execution time: 27_336_000 picoseconds. + Weight::from_parts(28_182_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -385,8 +389,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 29_556_000 picoseconds. - Weight::from_parts(29_895_000, 0) + // Minimum execution time: 25_446_000 picoseconds. + Weight::from_parts(26_330_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -399,8 +403,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `383` // Estimated: `42428` - // Minimum execution time: 29_409_000 picoseconds. - Weight::from_parts(30_060_000, 0) + // Minimum execution time: 25_367_000 picoseconds. + Weight::from_parts(26_296_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -413,8 +417,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 28_317_000 picoseconds. - Weight::from_parts(29_076_000, 0) + // Minimum execution time: 24_458_000 picoseconds. + Weight::from_parts(25_279_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -427,8 +431,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `42428` - // Minimum execution time: 27_300_000 picoseconds. - Weight::from_parts(28_103_000, 0) + // Minimum execution time: 23_750_000 picoseconds. + Weight::from_parts(24_454_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -443,8 +447,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `83866` - // Minimum execution time: 39_999_000 picoseconds. - Weight::from_parts(41_028_000, 0) + // Minimum execution time: 34_731_000 picoseconds. + Weight::from_parts(35_568_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -457,8 +461,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 29_128_000 picoseconds. - Weight::from_parts(30_107_000, 0) + // Minimum execution time: 25_328_000 picoseconds. + Weight::from_parts(26_100_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -475,8 +479,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4401` - // Minimum execution time: 20_341_000 picoseconds. - Weight::from_parts(20_993_000, 0) + // Minimum execution time: 17_516_000 picoseconds. + Weight::from_parts(18_338_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -489,8 +493,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `283` // Estimated: `4401` - // Minimum execution time: 15_991_000 picoseconds. - Weight::from_parts(16_446_000, 0) + // Minimum execution time: 13_876_000 picoseconds. + Weight::from_parts(14_399_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_scheduler.rs b/relay/paseo/src/weights/pallet_scheduler.rs index c13511f..36061f4 100644 --- a/relay/paseo/src/weights/pallet_scheduler.rs +++ b/relay/paseo/src/weights/pallet_scheduler.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_scheduler // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +57,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1489` - // Minimum execution time: 3_476_000 picoseconds. - Weight::from_parts(3_700_000, 0) + // Minimum execution time: 3_119_000 picoseconds. + Weight::from_parts(3_304_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -66,11 +70,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 4_022_000 picoseconds. - Weight::from_parts(6_238_863, 0) + // Minimum execution time: 3_512_000 picoseconds. + Weight::from_parts(5_807_625, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 2_852 - .saturating_add(Weight::from_parts(923_604, 0).saturating_mul(s.into())) + // Standard Error: 1_525 + .saturating_add(Weight::from_parts(812_636, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +82,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_845_000 picoseconds. - Weight::from_parts(4_179_000, 0) + // Minimum execution time: 3_517_000 picoseconds. + Weight::from_parts(3_623_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -93,11 +97,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 19_100_000 picoseconds. - Weight::from_parts(19_418_000, 0) + // Minimum execution time: 16_822_000 picoseconds. + Weight::from_parts(16_920_000, 0) .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_294, 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())) @@ -108,8 +112,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_657_000 picoseconds. - Weight::from_parts(8_395_000, 0) + // Minimum execution time: 4_746_000 picoseconds. + Weight::from_parts(5_046_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -117,24 +121,24 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_586_000 picoseconds. - Weight::from_parts(7_600_000, 0) + // Minimum execution time: 3_655_000 picoseconds. + Weight::from_parts(4_264_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: 3_327_000 picoseconds. - Weight::from_parts(4_267_000, 0) + // Minimum execution time: 2_290_000 picoseconds. + Weight::from_parts(2_516_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: 3_496_000 picoseconds. - Weight::from_parts(4_350_000, 0) + // Minimum execution time: 2_221_000 picoseconds. + Weight::from_parts(2_429_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -144,11 +148,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 16_739_000 picoseconds. - Weight::from_parts(26_945_521, 0) + // Minimum execution time: 9_935_000 picoseconds. + Weight::from_parts(12_025_044, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 18_837 - .saturating_add(Weight::from_parts(733_842, 0).saturating_mul(s.into())) + // Standard Error: 1_898 + .saturating_add(Weight::from_parts(840_406, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -161,11 +165,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 17_060_000 picoseconds. - Weight::from_parts(14_836_720, 0) + // Minimum execution time: 14_350_000 picoseconds. + Weight::from_parts(12_961_113, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_576 - .saturating_add(Weight::from_parts(1_738_548, 0).saturating_mul(s.into())) + // Standard Error: 2_598 + .saturating_add(Weight::from_parts(1_540_140, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -178,11 +182,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `293 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 14_641_000 picoseconds. - Weight::from_parts(17_926_133, 0) + // Minimum execution time: 12_775_000 picoseconds. + Weight::from_parts(15_812_724, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 6_689 - .saturating_add(Weight::from_parts(1_001_047, 0).saturating_mul(s.into())) + // Standard Error: 2_587 + .saturating_add(Weight::from_parts(862_721, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -195,11 +199,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `319 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 18_408_000 picoseconds. - Weight::from_parts(20_751_089, 0) + // Minimum execution time: 16_065_000 picoseconds. + Weight::from_parts(15_269_187, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 18_134 - .saturating_add(Weight::from_parts(1_770_656, 0).saturating_mul(s.into())) + // Standard Error: 1_860 + .saturating_add(Weight::from_parts(1_545_609, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_session.rs b/relay/paseo/src/weights/pallet_session.rs index 7df93c0..f119bfb 100644 --- a/relay/paseo/src/weights/pallet_session.rs +++ b/relay/paseo/src/weights/pallet_session.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_session` //! diff --git a/relay/paseo/src/weights/pallet_staking.rs b/relay/paseo/src/weights/pallet_staking.rs index 437c37f..8eca02a 100644 --- a/relay/paseo/src/weights/pallet_staking.rs +++ b/relay/paseo/src/weights/pallet_staking.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_staking` //! diff --git a/relay/paseo/src/weights/pallet_sudo.rs b/relay/paseo/src/weights/pallet_sudo.rs deleted file mode 100644 index 4a04727..0000000 --- a/relay/paseo/src/weights/pallet_sudo.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Autogenerated weights for `pallet_sudo` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024 - -// Executed Command: -// target/production/polkadot -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json -// --pallet=pallet_sudo -// --chain=rococo-dev -// --header=./polkadot/file_header.txt -// --output=./polkadot/runtime/rococo/src/weights/ - -#![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: `132` - // Estimated: `1517` - // Minimum execution time: 8_432_000 picoseconds. - Weight::from_parts(8_757_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: `132` - // Estimated: `1517` - // Minimum execution time: 9_167_000 picoseconds. - Weight::from_parts(9_397_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: `132` - // Estimated: `1517` - // Minimum execution time: 9_133_000 picoseconds. - Weight::from_parts(9_573_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - } -} \ No newline at end of file diff --git a/relay/paseo/src/weights/pallet_timestamp.rs b/relay/paseo/src/weights/pallet_timestamp.rs index 98cb8b6..9626be2 100644 --- a/relay/paseo/src/weights/pallet_timestamp.rs +++ b/relay/paseo/src/weights/pallet_timestamp.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_timestamp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +59,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `1493` - // Minimum execution time: 7_454_000 picoseconds. - Weight::from_parts(7_665_000, 0) + // Minimum execution time: 6_413_000 picoseconds. + Weight::from_parts(6_660_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +69,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 3_856_000 picoseconds. - Weight::from_parts(4_024_000, 0) + // Minimum execution time: 3_204_000 picoseconds. + Weight::from_parts(3_415_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/relay/paseo/src/weights/pallet_treasury.rs b/relay/paseo/src/weights/pallet_treasury.rs index 0651247..d4b34de 100644 --- a/relay/paseo/src/weights/pallet_treasury.rs +++ b/relay/paseo/src/weights/pallet_treasury.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_treasury` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_treasury // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +61,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `1887` - // Minimum execution time: 12_918_000 picoseconds. - Weight::from_parts(21_195_000, 0) + // Minimum execution time: 10_292_000 picoseconds. + Weight::from_parts(10_755_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -71,8 +75,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `143` // Estimated: `1489` - // Minimum execution time: 25_333_000 picoseconds. - Weight::from_parts(31_773_000, 0) + // Minimum execution time: 21_095_000 picoseconds. + Weight::from_parts(21_734_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -85,8 +89,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `301` // Estimated: `3593` - // Minimum execution time: 37_664_000 picoseconds. - Weight::from_parts(42_560_000, 0) + // Minimum execution time: 31_718_000 picoseconds. + Weight::from_parts(32_646_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -100,11 +104,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `470 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 9_079_000 picoseconds. - Weight::from_parts(14_150_902, 0) + // Minimum execution time: 7_362_000 picoseconds. + Weight::from_parts(9_257_989, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 3_131 - .saturating_add(Weight::from_parts(73_638, 0).saturating_mul(p.into())) + // Standard Error: 1_701 + .saturating_add(Weight::from_parts(104_627, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +118,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `1887` - // Minimum execution time: 6_548_000 picoseconds. - Weight::from_parts(6_993_000, 0) + // Minimum execution time: 5_852_000 picoseconds. + Weight::from_parts(6_141_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -135,11 +139,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `285 + p * (251 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 31_333_000 picoseconds. - Weight::from_parts(77_903_529, 0) + // Minimum execution time: 28_051_000 picoseconds. + Weight::from_parts(23_853_733, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 360_560 - .saturating_add(Weight::from_parts(37_514_620, 0).saturating_mul(p.into())) + // Standard Error: 15_468 + .saturating_add(Weight::from_parts(32_207_413, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -156,8 +160,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115` // Estimated: `4703` - // Minimum execution time: 18_662_000 picoseconds. - Weight::from_parts(19_406_000, 0) + // Minimum execution time: 17_364_000 picoseconds. + Weight::from_parts(17_972_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -180,8 +184,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `254` // Estimated: `5318` - // Minimum execution time: 44_538_000 picoseconds. - Weight::from_parts(45_907_000, 0) + // Minimum execution time: 40_883_000 picoseconds. + Weight::from_parts(41_991_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -194,8 +198,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `5318` - // Minimum execution time: 22_907_000 picoseconds. - Weight::from_parts(23_604_000, 0) + // Minimum execution time: 20_488_000 picoseconds. + Weight::from_parts(21_324_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -206,8 +210,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `178` // Estimated: `5318` - // Minimum execution time: 13_455_000 picoseconds. - Weight::from_parts(13_985_000, 0) + // Minimum execution time: 12_268_000 picoseconds. + Weight::from_parts(12_888_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_utility.rs b/relay/paseo/src/weights/pallet_utility.rs index f554de6..6a95486 100644 --- a/relay/paseo/src/weights/pallet_utility.rs +++ b/relay/paseo/src/weights/pallet_utility.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_utility // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,18 +56,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_624_000 picoseconds. - Weight::from_parts(12_155_000, 0) + // Minimum execution time: 4_453_000 picoseconds. + Weight::from_parts(5_295_358, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 9_482 - .saturating_add(Weight::from_parts(3_961_102, 0).saturating_mul(c.into())) + // Standard Error: 5_024 + .saturating_add(Weight::from_parts(3_453_064, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_974_000 picoseconds. - Weight::from_parts(5_099_000, 0) + // Minimum execution time: 4_264_000 picoseconds. + Weight::from_parts(4_520_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -71,18 +75,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_010_000 picoseconds. - Weight::from_parts(5_078_000, 0) + // Minimum execution time: 4_360_000 picoseconds. + Weight::from_parts(6_086_702, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 9_046 - .saturating_add(Weight::from_parts(4_214_897, 0).saturating_mul(c.into())) + // Standard Error: 3_531 + .saturating_add(Weight::from_parts(3_737_967, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_649_000 picoseconds. - Weight::from_parts(8_105_000, 0) + // Minimum execution time: 6_489_000 picoseconds. + Weight::from_parts(6_811_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -90,10 +94,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_945_000 picoseconds. - Weight::from_parts(42_325_739, 0) + // Minimum execution time: 4_510_000 picoseconds. + Weight::from_parts(18_022_183, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_025 - .saturating_add(Weight::from_parts(3_794_091, 0).saturating_mul(c.into())) + // Standard Error: 4_452 + .saturating_add(Weight::from_parts(3_425_050, 0).saturating_mul(c.into())) } } diff --git a/relay/paseo/src/weights/pallet_vesting.rs b/relay/paseo/src/weights/pallet_vesting.rs index 902caae..41831b8 100644 --- a/relay/paseo/src/weights/pallet_vesting.rs +++ b/relay/paseo/src/weights/pallet_vesting.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_vesting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_vesting // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,13 +63,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 37_782_000 picoseconds. - Weight::from_parts(37_209_164, 0) + // Minimum execution time: 31_405_000 picoseconds. + Weight::from_parts(30_840_736, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 5_763 - .saturating_add(Weight::from_parts(52_944, 0).saturating_mul(l.into())) - // Standard Error: 10_254 - .saturating_add(Weight::from_parts(106_176, 0).saturating_mul(s.into())) + // Standard Error: 1_079 + .saturating_add(Weight::from_parts(43_542, 0).saturating_mul(l.into())) + // Standard Error: 1_919 + .saturating_add(Weight::from_parts(68_078, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -77,13 +81,17 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_unlocked(_l: u32, _s: u32, ) -> Weight { + fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 40_415_000 picoseconds. - Weight::from_parts(48_730_072, 0) + // Minimum execution time: 33_688_000 picoseconds. + Weight::from_parts(34_504_027, 0) .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 1_565 + .saturating_add(Weight::from_parts(12_940, 0).saturating_mul(l.into())) + // Standard Error: 2_785 + .saturating_add(Weight::from_parts(51_071, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -101,13 +109,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 39_796_000 picoseconds. - Weight::from_parts(39_991_208, 0) + // Minimum execution time: 33_180_000 picoseconds. + Weight::from_parts(32_321_116, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 4_129 - .saturating_add(Weight::from_parts(39_477, 0).saturating_mul(l.into())) - // Standard Error: 7_347 - .saturating_add(Weight::from_parts(83_697, 0).saturating_mul(s.into())) + // Standard Error: 1_426 + .saturating_add(Weight::from_parts(49_121, 0).saturating_mul(l.into())) + // Standard Error: 2_537 + .saturating_add(Weight::from_parts(86_619, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -125,13 +133,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 42_209_000 picoseconds. - Weight::from_parts(41_379_744, 0) + // Minimum execution time: 35_454_000 picoseconds. + Weight::from_parts(34_966_137, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 11_512 - .saturating_add(Weight::from_parts(36_983, 0).saturating_mul(l.into())) - // Standard Error: 20_483 - .saturating_add(Weight::from_parts(199_047, 0).saturating_mul(s.into())) + // Standard Error: 1_241 + .saturating_add(Weight::from_parts(40_990, 0).saturating_mul(l.into())) + // Standard Error: 2_208 + .saturating_add(Weight::from_parts(73_858, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -145,15 +153,17 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. - fn vested_transfer(_l: u32, s: u32, ) -> Weight { + fn vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `522 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 77_662_000 picoseconds. - Weight::from_parts(84_425_317, 0) + // Minimum execution time: 65_630_000 picoseconds. + Weight::from_parts(66_625_551, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 18_272 - .saturating_add(Weight::from_parts(58_344, 0).saturating_mul(s.into())) + // Standard Error: 2_383 + .saturating_add(Weight::from_parts(37_953, 0).saturating_mul(l.into())) + // Standard Error: 4_239 + .saturating_add(Weight::from_parts(83_215, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -171,13 +181,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `625 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 79_098_000 picoseconds. - Weight::from_parts(74_973_773, 0) + // Minimum execution time: 66_782_000 picoseconds. + Weight::from_parts(67_144_629, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 12_272 - .saturating_add(Weight::from_parts(143_548, 0).saturating_mul(l.into())) - // Standard Error: 21_835 - .saturating_add(Weight::from_parts(276_360, 0).saturating_mul(s.into())) + // Standard Error: 1_855 + .saturating_add(Weight::from_parts(58_537, 0).saturating_mul(l.into())) + // Standard Error: 3_301 + .saturating_add(Weight::from_parts(98_271, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -195,13 +205,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 40_907_000 picoseconds. - Weight::from_parts(36_294_741, 0) + // Minimum execution time: 34_170_000 picoseconds. + Weight::from_parts(33_344_840, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 15_221 - .saturating_add(Weight::from_parts(190_813, 0).saturating_mul(l.into())) - // Standard Error: 28_109 - .saturating_add(Weight::from_parts(214_102, 0).saturating_mul(s.into())) + // Standard Error: 1_452 + .saturating_add(Weight::from_parts(41_128, 0).saturating_mul(l.into())) + // Standard Error: 2_681 + .saturating_add(Weight::from_parts(76_971, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -219,13 +229,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 43_928_000 picoseconds. - Weight::from_parts(34_100_621, 0) + // Minimum execution time: 36_360_000 picoseconds. + Weight::from_parts(35_601_232, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 22_781 - .saturating_add(Weight::from_parts(170_121, 0).saturating_mul(l.into())) - // Standard Error: 42_072 - .saturating_add(Weight::from_parts(534_360, 0).saturating_mul(s.into())) + // Standard Error: 1_851 + .saturating_add(Weight::from_parts(36_717, 0).saturating_mul(l.into())) + // Standard Error: 3_420 + .saturating_add(Weight::from_parts(84_786, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/relay/paseo/src/weights/pallet_whitelist.rs b/relay/paseo/src/weights/pallet_whitelist.rs index 74e7216..802c551 100644 --- a/relay/paseo/src/weights/pallet_whitelist.rs +++ b/relay/paseo/src/weights/pallet_whitelist.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_whitelist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_whitelist // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +61,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `118` // Estimated: `3556` - // Minimum execution time: 19_350_000 picoseconds. - Weight::from_parts(19_846_000, 0) + // Minimum execution time: 16_438_000 picoseconds. + Weight::from_parts(17_010_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -73,8 +77,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `247` // Estimated: `3556` - // Minimum execution time: 18_925_000 picoseconds. - Weight::from_parts(19_435_000, 0) + // Minimum execution time: 15_790_000 picoseconds. + Weight::from_parts(16_296_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -92,11 +96,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `323 + n * (1 ±0)` // Estimated: `3787 + n * (1 ±0)` - // Minimum execution time: 30_362_000 picoseconds. - Weight::from_parts(30_817_000, 0) + // Minimum execution time: 26_102_000 picoseconds. + Weight::from_parts(28_436_000, 0) .saturating_add(Weight::from_parts(0, 3787)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_702, 0).saturating_mul(n.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_349, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -112,11 +116,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `247` // Estimated: `3556` - // Minimum execution time: 22_714_000 picoseconds. - Weight::from_parts(23_915_095, 0) + // Minimum execution time: 19_423_000 picoseconds. + Weight::from_parts(20_061_587, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_757, 0).saturating_mul(n.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_470, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_xcm.rs b/relay/paseo/src/weights/pallet_xcm.rs index 0a4c648..6296c77 100644 --- a/relay/paseo/src/weights/pallet_xcm.rs +++ b/relay/paseo/src/weights/pallet_xcm.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_xcm // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +63,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 33_065_000 picoseconds. - Weight::from_parts(33_845_000, 0) + // Minimum execution time: 28_308_000 picoseconds. + Weight::from_parts(29_143_000, 0) .saturating_add(Weight::from_parts(0, 3541)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,16 +73,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_161_000 picoseconds. - Weight::from_parts(20_523_000, 0) + // Minimum execution time: 17_253_000 picoseconds. + Weight::from_parts(17_815_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_143_000 picoseconds. - Weight::from_parts(20_929_000, 0) + // Minimum execution time: 16_956_000 picoseconds. + Weight::from_parts(17_260_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Benchmark::Override` (r:0 w:0) @@ -97,8 +101,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_574_000 picoseconds. - Weight::from_parts(8_963_000, 0) + // Minimum execution time: 7_620_000 picoseconds. + Weight::from_parts(7_948_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -106,8 +110,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_309_000 picoseconds. - Weight::from_parts(2_555_000, 0) + // Minimum execution time: 2_163_000 picoseconds. + Weight::from_parts(2_292_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1) @@ -128,8 +132,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 36_645_000 picoseconds. - Weight::from_parts(38_032_000, 0) + // Minimum execution time: 31_554_000 picoseconds. + Weight::from_parts(32_308_000, 0) .saturating_add(Weight::from_parts(0, 3541)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -150,8 +154,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `256` // Estimated: `3721` - // Minimum execution time: 44_307_000 picoseconds. - Weight::from_parts(45_937_000, 0) + // Minimum execution time: 37_442_000 picoseconds. + Weight::from_parts(38_651_000, 0) .saturating_add(Weight::from_parts(0, 3721)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -162,8 +166,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_391_000 picoseconds. - Weight::from_parts(2_623_000, 0) + // Minimum execution time: 2_115_000 picoseconds. + Weight::from_parts(2_354_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,8 +177,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `26` // Estimated: `10916` - // Minimum execution time: 16_873_000 picoseconds. - Weight::from_parts(17_240_000, 0) + // Minimum execution time: 14_347_000 picoseconds. + Weight::from_parts(14_884_000, 0) .saturating_add(Weight::from_parts(0, 10916)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -185,8 +189,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `30` // Estimated: `10920` - // Minimum execution time: 16_827_000 picoseconds. - Weight::from_parts(17_291_000, 0) + // Minimum execution time: 14_542_000 picoseconds. + Weight::from_parts(14_846_000, 0) .saturating_add(Weight::from_parts(0, 10920)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -197,8 +201,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `13405` - // Minimum execution time: 18_079_000 picoseconds. - Weight::from_parts(19_032_000, 0) + // Minimum execution time: 16_274_000 picoseconds. + Weight::from_parts(16_460_000, 0) .saturating_add(Weight::from_parts(0, 13405)) .saturating_add(T::DbWeight::get().reads(5)) } @@ -216,8 +220,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `112` // Estimated: `6052` - // Minimum execution time: 34_768_000 picoseconds. - Weight::from_parts(35_950_000, 0) + // Minimum execution time: 30_015_000 picoseconds. + Weight::from_parts(30_950_000, 0) .saturating_add(Weight::from_parts(0, 6052)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) @@ -228,8 +232,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `8484` - // Minimum execution time: 10_789_000 picoseconds. - Weight::from_parts(11_535_000, 0) + // Minimum execution time: 9_517_000 picoseconds. + Weight::from_parts(9_811_000, 0) .saturating_add(Weight::from_parts(0, 8484)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -239,8 +243,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `37` // Estimated: `10927` - // Minimum execution time: 17_327_000 picoseconds. - Weight::from_parts(17_825_000, 0) + // Minimum execution time: 14_861_000 picoseconds. + Weight::from_parts(15_225_000, 0) .saturating_add(Weight::from_parts(0, 10927)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -259,8 +263,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116` // Estimated: `11006` - // Minimum execution time: 43_294_000 picoseconds. - Weight::from_parts(43_963_000, 0) + // Minimum execution time: 37_179_000 picoseconds. + Weight::from_parts(38_146_000, 0) .saturating_add(Weight::from_parts(0, 11006)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/relay/paseo/src/weights/runtime_common_auctions.rs b/relay/paseo/src/weights/runtime_common_auctions.rs index fe14155..5be0852 100644 --- a/relay/paseo/src/weights/runtime_common_auctions.rs +++ b/relay/paseo/src/weights/runtime_common_auctions.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_common::auctions` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::auctions // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +59,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 15_487_000 picoseconds. - Weight::from_parts(16_211_000, 0) + // Minimum execution time: 7_727_000 picoseconds. + Weight::from_parts(8_026_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -79,8 +83,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `695` // Estimated: `6060` - // Minimum execution time: 93_120_000 picoseconds. - Weight::from_parts(105_213_000, 0) + // Minimum execution time: 84_718_000 picoseconds. + Weight::from_parts(91_673_000, 0) .saturating_add(Weight::from_parts(0, 6060)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -109,10 +113,10 @@ impl runtime_common::auctions::WeightInfo for WeightInf /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `6946951` + // Measured: `6946955` // Estimated: `15822990` - // Minimum execution time: 7_863_664_000 picoseconds. - Weight::from_parts(8_515_161_000, 0) + // Minimum execution time: 7_298_217_000 picoseconds. + Weight::from_parts(7_924_190_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3687)) .saturating_add(T::DbWeight::get().writes(3682)) @@ -129,8 +133,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_968_033_000 picoseconds. - Weight::from_parts(6_372_198_000, 0) + // Minimum execution time: 5_676_822_000 picoseconds. + Weight::from_parts(6_267_314_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3673)) .saturating_add(T::DbWeight::get().writes(3673)) diff --git a/relay/paseo/src/weights/runtime_common_claims.rs b/relay/paseo/src/weights/runtime_common_claims.rs index 4462b3c..1fb3ad9 100644 --- a/relay/paseo/src/weights/runtime_common_claims.rs +++ b/relay/paseo/src/weights/runtime_common_claims.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_common::claims` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::claims // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,10 +69,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim() -> Weight { // Proof Size summary in bytes: - // Measured: `620` + // Measured: `578` // Estimated: `4764` - // Minimum execution time: 230_256_000 picoseconds. - Weight::from_parts(260_822_000, 0) + // Minimum execution time: 202_961_000 picoseconds. + Weight::from_parts(233_627_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -85,8 +89,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `182` // Estimated: `1667` - // Minimum execution time: 14_592_000 picoseconds. - Weight::from_parts(15_621_000, 0) + // Minimum execution time: 12_352_000 picoseconds. + Weight::from_parts(15_063_000, 0) .saturating_add(Weight::from_parts(0, 1667)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -109,10 +113,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim_attest() -> Weight { // Proof Size summary in bytes: - // Measured: `620` + // Measured: `578` // Estimated: `4764` - // Minimum execution time: 231_228_000 picoseconds. - Weight::from_parts(263_872_000, 0) + // Minimum execution time: 204_842_000 picoseconds. + Weight::from_parts(227_728_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -137,10 +141,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn attest() -> Weight { // Proof Size summary in bytes: - // Measured: `694` + // Measured: `652` // Estimated: `4764` - // Minimum execution time: 118_201_000 picoseconds. - Weight::from_parts(141_675_000, 0) + // Minimum execution time: 105_101_000 picoseconds. + Weight::from_parts(130_265_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -157,8 +161,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `406` // Estimated: `3871` - // Minimum execution time: 35_234_000 picoseconds. - Weight::from_parts(47_044_000, 0) + // Minimum execution time: 32_946_000 picoseconds. + Weight::from_parts(36_670_000, 0) .saturating_add(Weight::from_parts(0, 3871)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/relay/paseo/src/weights/runtime_common_crowdloan.rs b/relay/paseo/src/weights/runtime_common_crowdloan.rs index 5b28167..11f0bab 100644 --- a/relay/paseo/src/weights/runtime_common_crowdloan.rs +++ b/relay/paseo/src/weights/runtime_common_crowdloan.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_common::crowdloan` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::crowdloan // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,8 +65,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `415` // Estimated: `3880` - // Minimum execution time: 59_578_000 picoseconds. - Weight::from_parts(64_274_000, 0) + // Minimum execution time: 49_379_000 picoseconds. + Weight::from_parts(66_396_000, 0) .saturating_add(Weight::from_parts(0, 3880)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -85,8 +89,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `497` // Estimated: `3962` - // Minimum execution time: 169_303_000 picoseconds. - Weight::from_parts(173_974_000, 0) + // Minimum execution time: 137_292_000 picoseconds. + Weight::from_parts(144_195_000, 0) .saturating_add(Weight::from_parts(0, 3962)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -101,8 +105,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `687` // Estimated: `6196` - // Minimum execution time: 95_037_000 picoseconds. - Weight::from_parts(107_518_000, 0) + // Minimum execution time: 92_857_000 picoseconds. + Weight::from_parts(99_607_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -114,11 +118,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `125 + k * (189 ±0)` // Estimated: `138 + k * (189 ±0)` - // Minimum execution time: 80_938_000 picoseconds. - Weight::from_parts(86_900_000, 0) + // Minimum execution time: 76_640_000 picoseconds. + Weight::from_parts(80_548_000, 0) .saturating_add(Weight::from_parts(0, 138)) - // Standard Error: 46_926 - .saturating_add(Weight::from_parts(46_902_741, 0).saturating_mul(k.into())) + // Standard Error: 23_577 + .saturating_add(Weight::from_parts(40_454_538, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -133,8 +137,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `515` // Estimated: `6196` - // Minimum execution time: 59_022_000 picoseconds. - Weight::from_parts(61_191_000, 0) + // Minimum execution time: 49_925_000 picoseconds. + Weight::from_parts(58_641_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -145,8 +149,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 28_409_000 picoseconds. - Weight::from_parts(31_897_000, 0) + // Minimum execution time: 22_397_000 picoseconds. + Weight::from_parts(28_269_000, 0) .saturating_add(Weight::from_parts(0, 3700)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -159,8 +163,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 51_910_000 picoseconds. - Weight::from_parts(58_611_000, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(42_988_000, 0) .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -173,8 +177,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `239` // Estimated: `3704` - // Minimum execution time: 29_243_000 picoseconds. - Weight::from_parts(32_172_000, 0) + // Minimum execution time: 24_470_000 picoseconds. + Weight::from_parts(31_209_000, 0) .saturating_add(Weight::from_parts(0, 3704)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -204,11 +208,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `164 + n * (356 ±0)` // Estimated: `5385 + n * (2832 ±0)` - // Minimum execution time: 143_769_000 picoseconds. - Weight::from_parts(12_748_655, 0) + // Minimum execution time: 121_731_000 picoseconds. + Weight::from_parts(14_348_244, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 119_020 - .saturating_add(Weight::from_parts(63_546_710, 0).saturating_mul(n.into())) + // Standard Error: 48_878 + .saturating_add(Weight::from_parts(55_109_373, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/runtime_common_paras_registrar.rs b/relay/paseo/src/weights/runtime_common_paras_registrar.rs index 4e172b1..42d14e6 100644 --- a/relay/paseo/src/weights/runtime_common_paras_registrar.rs +++ b/relay/paseo/src/weights/runtime_common_paras_registrar.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_common::paras_registrar` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::paras_registrar // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +61,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 26_787_000 picoseconds. - Weight::from_parts(28_307_000, 0) + // Minimum execution time: 22_997_000 picoseconds. + Weight::from_parts(23_646_000, 0) .saturating_add(Weight::from_parts(0, 3535)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,11 +87,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`) fn register() -> Weight { // Proof Size summary in bytes: - // Measured: `353` - // Estimated: `3818` - // Minimum execution time: 8_559_329_000 picoseconds. - Weight::from_parts(8_685_268_000, 0) - .saturating_add(Weight::from_parts(0, 3818)) + // Measured: `390` + // Estimated: `3855` + // Minimum execution time: 6_962_183_000 picoseconds. + Weight::from_parts(7_350_365_000, 0) + .saturating_add(Weight::from_parts(0, 3855)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -111,11 +115,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_register() -> Weight { // Proof Size summary in bytes: - // Measured: `243` - // Estimated: `3708` - // Minimum execution time: 8_340_129_000 picoseconds. - Weight::from_parts(8_504_314_000, 0) - .saturating_add(Weight::from_parts(0, 3708)) + // Measured: `280` + // Estimated: `3745` + // Minimum execution time: 6_834_072_000 picoseconds. + Weight::from_parts(7_204_347_000, 0) + .saturating_add(Weight::from_parts(0, 3745)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -135,11 +139,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `500` - // Estimated: `3965` - // Minimum execution time: 67_832_000 picoseconds. - Weight::from_parts(71_166_000, 0) - .saturating_add(Weight::from_parts(0, 3965)) + // Measured: `504` + // Estimated: `3969` + // Minimum execution time: 56_112_000 picoseconds. + Weight::from_parts(62_891_000, 0) + .saturating_add(Weight::from_parts(0, 3969)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -159,11 +163,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap() -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `6711` - // Minimum execution time: 72_375_000 picoseconds. - Weight::from_parts(78_797_000, 0) - .saturating_add(Weight::from_parts(0, 6711)) + // Measured: `775` + // Estimated: `6715` + // Minimum execution time: 66_400_000 picoseconds. + Weight::from_parts(77_994_000, 0) + .saturating_add(Weight::from_parts(0, 6715)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -188,13 +192,13 @@ impl runtime_common::paras_registrar::WeightInfo for We /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `201` - // Estimated: `3666` - // Minimum execution time: 38_786_000 picoseconds. - Weight::from_parts(343_116_696, 0) - .saturating_add(Weight::from_parts(0, 3666)) - // Standard Error: 22 - .saturating_add(Weight::from_parts(2_417, 0).saturating_mul(b.into())) + // Measured: `238` + // Estimated: `3703` + // Minimum execution time: 33_122_000 picoseconds. + Weight::from_parts(203_059_387, 0) + .saturating_add(Weight::from_parts(0, 3703)) + // Standard Error: 13 + .saturating_add(Weight::from_parts(2_018, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -205,11 +209,11 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_653_000 picoseconds. - Weight::from_parts(7_723_000, 0) + // Minimum execution time: 6_614_000 picoseconds. + Weight::from_parts(5_881_578, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_223, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(980, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/paseo/src/weights/runtime_common_slots.rs b/relay/paseo/src/weights/runtime_common_slots.rs index 1527cc2..aad7121 100644 --- a/relay/paseo/src/weights/runtime_common_slots.rs +++ b/relay/paseo/src/weights/runtime_common_slots.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_common::slots` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_common::slots // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,8 +59,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `553 + c * (20 ±0) + t * (234 ±0)` - // Estimated: `4024 + c * (2496 ±0) + t * (2709 ±0)` - // Minimum execution time: 801_460_000 picoseconds. - Weight::from_parts(809_874_000, 0) - .saturating_add(Weight::from_parts(0, 4024)) - // Standard Error: 96_620 - .saturating_add(Weight::from_parts(3_236_613, 0).saturating_mul(c.into())) - // Standard Error: 96_620 - .saturating_add(Weight::from_parts(9_930_496, 0).saturating_mul(t.into())) + // Measured: `557 + c * (20 ±0) + t * (234 ±0)` + // Estimated: `4028 + c * (2496 ±0) + t * (2709 ±0)` + // Minimum execution time: 709_290_000 picoseconds. + Weight::from_parts(721_642_000, 0) + .saturating_add(Weight::from_parts(0, 4028)) + // Standard Error: 86_997 + .saturating_add(Weight::from_parts(2_876_796, 0).saturating_mul(c.into())) + // Standard Error: 86_997 + .saturating_add(Weight::from_parts(9_088_187, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) @@ -101,8 +105,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `546` - // Estimated: `4011` - // Minimum execution time: 29_884_000 picoseconds. - Weight::from_parts(32_515_000, 0) - .saturating_add(Weight::from_parts(0, 4011)) + // Measured: `550` + // Estimated: `4015` + // Minimum execution time: 28_188_000 picoseconds. + Weight::from_parts(34_661_000, 0) + .saturating_add(Weight::from_parts(0, 4015)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/runtime_parachains_configuration.rs b/relay/paseo/src/weights/runtime_parachains_configuration.rs index 9f75eb1..c35f148 100644 --- a/relay/paseo/src/weights/runtime_parachains_configuration.rs +++ b/relay/paseo/src/weights/runtime_parachains_configuration.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::configuration` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::configuration // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,11 +59,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_block_number() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 8_720_000 picoseconds. - Weight::from_parts(9_112_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_858_000 picoseconds. + Weight::from_parts(8_405_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,11 +75,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 8_744_000 picoseconds. - Weight::from_parts(8_951_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_704_000 picoseconds. + Weight::from_parts(8_276_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -87,11 +91,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_option_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 8_753_000 picoseconds. - Weight::from_parts(9_168_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_854_000 picoseconds. + Weight::from_parts(8_141_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,11 +117,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 8_695_000 picoseconds. - Weight::from_parts(9_077_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_745_000 picoseconds. + Weight::from_parts(8_117_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -129,11 +133,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_executor_params() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 10_980_000 picoseconds. - Weight::from_parts(11_289_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 9_780_000 picoseconds. + Weight::from_parts(10_108_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -145,11 +149,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_perbill() -> Weight { // Proof Size summary in bytes: - // Measured: `151` - // Estimated: `1636` - // Minimum execution time: 8_888_000 picoseconds. - Weight::from_parts(9_055_000, 0) - .saturating_add(Weight::from_parts(0, 1636)) + // Measured: `155` + // Estimated: `1640` + // Minimum execution time: 7_778_000 picoseconds. + Weight::from_parts(7_994_000, 0) + .saturating_add(Weight::from_parts(0, 1640)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/runtime_parachains_disputes.rs b/relay/paseo/src/weights/runtime_parachains_disputes.rs index c144e27..887d949 100644 --- a/relay/paseo/src/weights/runtime_parachains_disputes.rs +++ b/relay/paseo/src/weights/runtime_parachains_disputes.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::disputes` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::disputes // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,8 +57,8 @@ impl runtime_parachains::disputes::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_416_000 picoseconds. - Weight::from_parts(2_779_000, 0) + // Minimum execution time: 2_118_000 picoseconds. + Weight::from_parts(2_288_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs b/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs index bd3812f..05e4797 100644 --- a/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs +++ b/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! diff --git a/relay/paseo/src/weights/runtime_parachains_hrmp.rs b/relay/paseo/src/weights/runtime_parachains_hrmp.rs index 6279854..49c03a7 100644 --- a/relay/paseo/src/weights/runtime_parachains_hrmp.rs +++ b/relay/paseo/src/weights/runtime_parachains_hrmp.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::hrmp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::hrmp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -67,8 +71,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383` // Estimated: `3848` - // Minimum execution time: 36_910_000 picoseconds. - Weight::from_parts(37_613_000, 0) + // Minimum execution time: 31_833_000 picoseconds. + Weight::from_parts(32_774_000, 0) .saturating_add(Weight::from_parts(0, 3848)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -87,8 +91,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `373` // Estimated: `3838` - // Minimum execution time: 34_407_000 picoseconds. - Weight::from_parts(35_492_000, 0) + // Minimum execution time: 30_175_000 picoseconds. + Weight::from_parts(31_047_000, 0) .saturating_add(Weight::from_parts(0, 3838)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -107,8 +111,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `486` // Estimated: `3951` - // Minimum execution time: 35_889_000 picoseconds. - Weight::from_parts(37_339_000, 0) + // Minimum execution time: 30_960_000 picoseconds. + Weight::from_parts(31_882_000, 0) .saturating_add(Weight::from_parts(0, 3951)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -131,13 +135,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `231 + e * (100 ±0) + i * (100 ±0)` // Estimated: `3693 + e * (2575 ±0) + i * (2575 ±0)` - // Minimum execution time: 1_350_496_000 picoseconds. - Weight::from_parts(1_361_960_000, 0) + // Minimum execution time: 1_191_776_000 picoseconds. + Weight::from_parts(1_208_323_000, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 130_537 - .saturating_add(Weight::from_parts(4_099_149, 0).saturating_mul(i.into())) - // Standard Error: 130_537 - .saturating_add(Weight::from_parts(4_422_961, 0).saturating_mul(e.into())) + // Standard Error: 112_675 + .saturating_add(Weight::from_parts(3_778_292, 0).saturating_mul(i.into())) + // Standard Error: 112_675 + .saturating_add(Weight::from_parts(3_675_422, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(e.into()))) @@ -168,11 +172,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `459 + c * (136 ±0)` // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 7_417_000 picoseconds. - Weight::from_parts(17_914_687, 0) + // Minimum execution time: 5_905_000 picoseconds. + Weight::from_parts(5_998_000, 0) .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 120_447 - .saturating_add(Weight::from_parts(23_713_659, 0).saturating_mul(c.into())) + // Standard Error: 20_615 + .saturating_add(Weight::from_parts(21_192_166, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -196,11 +200,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `302 + c * (124 ±0)` // Estimated: `1762 + c * (2600 ±0)` - // Minimum execution time: 5_939_000 picoseconds. - Weight::from_parts(6_083_000, 0) + // Minimum execution time: 5_206_000 picoseconds. + Weight::from_parts(5_369_000, 0) .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 37_097 - .saturating_add(Weight::from_parts(14_867_885, 0).saturating_mul(c.into())) + // Standard Error: 14_972 + .saturating_add(Weight::from_parts(13_053_974, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -218,11 +222,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `993 + c * (13 ±0)` // Estimated: `4262 + c * (15 ±0)` - // Minimum execution time: 20_702_000 picoseconds. - Weight::from_parts(34_731_147, 0) + // Minimum execution time: 17_426_000 picoseconds. + Weight::from_parts(26_106_849, 0) .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 7_762 - .saturating_add(Weight::from_parts(157_831, 0).saturating_mul(c.into())) + // Standard Error: 3_736 + .saturating_add(Weight::from_parts(178_806, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(c.into())) @@ -236,11 +240,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `210 + c * (63 ±0)` // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 4_221_000 picoseconds. - Weight::from_parts(10_164_001, 0) + // Minimum execution time: 3_609_000 picoseconds. + Weight::from_parts(3_888_793, 0) .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 18_501 - .saturating_add(Weight::from_parts(3_704_856, 0).saturating_mul(c.into())) + // Standard Error: 6_285 + .saturating_add(Weight::from_parts(3_345_275, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -272,11 +276,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383 + c * (235 ±0)` // Estimated: `6323 + c * (235 ±0)` - // Minimum execution time: 51_616_000 picoseconds. - Weight::from_parts(53_530_702, 0) + // Minimum execution time: 44_625_000 picoseconds. + Weight::from_parts(46_553_391, 0) .saturating_add(Weight::from_parts(0, 6323)) - // Standard Error: 127_887 - .saturating_add(Weight::from_parts(15_625_397, 0).saturating_mul(c.into())) + // Standard Error: 115_564 + .saturating_add(Weight::from_parts(13_044_408, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 235).saturating_mul(c.into())) @@ -305,8 +309,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383` // Estimated: `6323` - // Minimum execution time: 51_271_000 picoseconds. - Weight::from_parts(52_617_000, 0) + // Minimum execution time: 45_093_000 picoseconds. + Weight::from_parts(46_061_000, 0) .saturating_add(Weight::from_parts(0, 6323)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -317,8 +321,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `230` // Estimated: `3695` - // Minimum execution time: 13_778_000 picoseconds. - Weight::from_parts(14_342_000, 0) + // Minimum execution time: 12_021_000 picoseconds. + Weight::from_parts(12_673_000, 0) .saturating_add(Weight::from_parts(0, 3695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/runtime_parachains_inclusion.rs b/relay/paseo/src/weights/runtime_parachains_inclusion.rs index 44d49e1..01749dd 100644 --- a/relay/paseo/src/weights/runtime_parachains_inclusion.rs +++ b/relay/paseo/src/weights/runtime_parachains_inclusion.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::inclusion` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::inclusion // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -60,11 +64,11 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Proof Size summary in bytes: // Measured: `65761` // Estimated: `69051` - // Minimum execution time: 137_610_000 picoseconds. - Weight::from_parts(146_970_000, 0) + // Minimum execution time: 115_958_000 picoseconds. + Weight::from_parts(116_536_000, 0) .saturating_add(Weight::from_parts(0, 69051)) - // Standard Error: 116_303 - .saturating_add(Weight::from_parts(122_019_644, 0).saturating_mul(i.into())) + // Standard Error: 73_958 + .saturating_add(Weight::from_parts(104_854_920, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) diff --git a/relay/paseo/src/weights/runtime_parachains_initializer.rs b/relay/paseo/src/weights/runtime_parachains_initializer.rs index c6fa0e2..11c2bc8 100644 --- a/relay/paseo/src/weights/runtime_parachains_initializer.rs +++ b/relay/paseo/src/weights/runtime_parachains_initializer.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::initializer` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::initializer // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,11 +58,11 @@ impl runtime_parachains::initializer::WeightInfo for We // Proof Size summary in bytes: // Measured: `0 + d * (11 ±0)` // Estimated: `1480 + d * (11 ±0)` - // Minimum execution time: 3_373_000 picoseconds. - Weight::from_parts(3_540_000, 0) + // Minimum execution time: 2_807_000 picoseconds. + Weight::from_parts(3_029_000, 0) .saturating_add(Weight::from_parts(0, 1480)) - // Standard Error: 24 - .saturating_add(Weight::from_parts(3_040, 0).saturating_mul(d.into())) + // Standard Error: 18 + .saturating_add(Weight::from_parts(2_845, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 11).saturating_mul(d.into())) diff --git a/relay/paseo/src/weights/runtime_parachains_paras.rs b/relay/paseo/src/weights/runtime_parachains_paras.rs index 10819b9..6679e32 100644 --- a/relay/paseo/src/weights/runtime_parachains_paras.rs +++ b/relay/paseo/src/weights/runtime_parachains_paras.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::paras` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,11 +68,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `8309` // Estimated: `11774` - // Minimum execution time: 31_492_000 picoseconds. - Weight::from_parts(139_897_361, 0) + // Minimum execution time: 27_533_000 picoseconds. + Weight::from_parts(182_880_491, 0) .saturating_add(Weight::from_parts(0, 11774)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(2_405, 0).saturating_mul(c.into())) + // Standard Error: 15 + .saturating_add(Weight::from_parts(2_106, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -79,11 +83,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_207_000 picoseconds. - Weight::from_parts(7_634_000, 0) + // Minimum execution time: 6_199_000 picoseconds. + Weight::from_parts(1_090_465, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(989, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Paras::MostRecentContext` (r:0 w:1) @@ -92,8 +96,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_436_000 picoseconds. - Weight::from_parts(3_817_000, 0) + // Minimum execution time: 3_078_000 picoseconds. + Weight::from_parts(3_324_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -118,13 +122,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `8452` - // Estimated: `11917` - // Minimum execution time: 46_159_000 picoseconds. - Weight::from_parts(47_385_000, 0) - .saturating_add(Weight::from_parts(0, 11917)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_715, 0).saturating_mul(c.into())) + // Measured: `8489` + // Estimated: `11954` + // Minimum execution time: 40_192_000 picoseconds. + Weight::from_parts(40_857_000, 0) + .saturating_add(Weight::from_parts(0, 11954)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(2_617, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -143,11 +147,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `137` // Estimated: `3602` - // Minimum execution time: 16_876_000 picoseconds. - Weight::from_parts(46_282_638, 0) + // Minimum execution time: 14_795_000 picoseconds. + Weight::from_parts(13_935_047, 0) .saturating_add(Weight::from_parts(0, 3602)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(1_276, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_001, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -157,11 +161,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_queue_action() -> Weight { // Proof Size summary in bytes: - // Measured: `4312` - // Estimated: `7777` - // Minimum execution time: 19_078_000 picoseconds. - Weight::from_parts(19_899_000, 0) - .saturating_add(Weight::from_parts(0, 7777)) + // Measured: `4316` + // Estimated: `7781` + // Minimum execution time: 16_330_000 picoseconds. + Weight::from_parts(17_420_000, 0) + .saturating_add(Weight::from_parts(0, 7781)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,11 +182,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `683` // Estimated: `4148` - // Minimum execution time: 84_721_000 picoseconds. - Weight::from_parts(92_001_769, 0) + // Minimum execution time: 75_830_000 picoseconds. + Weight::from_parts(90_916_387, 0) .saturating_add(Weight::from_parts(0, 4148)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_081, 0).saturating_mul(c.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_838, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -194,8 +198,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `28` // Estimated: `3493` - // Minimum execution time: 6_196_000 picoseconds. - Weight::from_parts(6_517_000, 0) + // Minimum execution time: 5_484_000 picoseconds. + Weight::from_parts(5_831_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -210,8 +214,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 120_340_000 picoseconds. - Weight::from_parts(125_764_000, 0) + // Minimum execution time: 117_087_000 picoseconds. + Weight::from_parts(123_396_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -234,8 +238,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `27360` // Estimated: `30825` - // Minimum execution time: 790_964_000 picoseconds. - Weight::from_parts(845_596_000, 0) + // Minimum execution time: 676_418_000 picoseconds. + Weight::from_parts(695_817_000, 0) .saturating_add(Weight::from_parts(0, 30825)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(104)) @@ -250,8 +254,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `27338` // Estimated: `30803` - // Minimum execution time: 113_886_000 picoseconds. - Weight::from_parts(122_601_000, 0) + // Minimum execution time: 112_738_000 picoseconds. + Weight::from_parts(123_853_000, 0) .saturating_add(Weight::from_parts(0, 30803)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -270,8 +274,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26728` // Estimated: `30193` - // Minimum execution time: 625_871_000 picoseconds. - Weight::from_parts(640_987_000, 0) + // Minimum execution time: 531_484_000 picoseconds. + Weight::from_parts(544_896_000, 0) .saturating_add(Weight::from_parts(0, 30193)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -286,8 +290,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 112_652_000 picoseconds. - Weight::from_parts(121_202_000, 0) + // Minimum execution time: 106_905_000 picoseconds. + Weight::from_parts(115_573_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs b/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs index dfeeb9e..e62d5ca 100644 --- a/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `runtime_parachains::paras_inherent` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=runtime_parachains::paras_inherent // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -114,13 +118,13 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `50548` - // Estimated: `56488 + v * (23 ±0)` - // Minimum execution time: 932_953_000 picoseconds. - Weight::from_parts(526_795_302, 0) - .saturating_add(Weight::from_parts(0, 56488)) - // Standard Error: 72_522 - .saturating_add(Weight::from_parts(46_746_979, 0).saturating_mul(v.into())) + // Measured: `50688` + // Estimated: `56628 + v * (23 ±0)` + // Minimum execution time: 999_695_000 picoseconds. + Weight::from_parts(471_453_373, 0) + .saturating_add(Weight::from_parts(0, 56628)) + // Standard Error: 16_808 + .saturating_add(Weight::from_parts(56_410_136, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(28)) .saturating_add(T::DbWeight::get().writes(16)) .saturating_add(Weight::from_parts(0, 23).saturating_mul(v.into())) @@ -189,11 +193,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`) fn enter_bitfields() -> Weight { // Proof Size summary in bytes: - // Measured: `42382` - // Estimated: `48322` - // Minimum execution time: 494_300_000 picoseconds. - Weight::from_parts(528_096_000, 0) - .saturating_add(Weight::from_parts(0, 48322)) + // Measured: `42490` + // Estimated: `48430` + // Minimum execution time: 463_424_000 picoseconds. + Weight::from_parts(498_761_000, 0) + .saturating_add(Weight::from_parts(0, 48430)) .saturating_add(T::DbWeight::get().reads(26)) .saturating_add(T::DbWeight::get().writes(17)) } @@ -266,13 +270,13 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `42454` - // Estimated: `48394` - // Minimum execution time: 5_947_455_000 picoseconds. - Weight::from_parts(1_374_173_170, 0) - .saturating_add(Weight::from_parts(0, 48394)) - // Standard Error: 190_770 - .saturating_add(Weight::from_parts(46_394_740, 0).saturating_mul(v.into())) + // Measured: `42562` + // Estimated: `48502` + // Minimum execution time: 6_803_855_000 picoseconds. + Weight::from_parts(1_241_293_919, 0) + .saturating_add(Weight::from_parts(0, 48502)) + // Standard Error: 29_086 + .saturating_add(Weight::from_parts(55_587_595, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(29)) .saturating_add(T::DbWeight::get().writes(16)) } @@ -348,11 +352,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`) fn enter_backed_candidate_code_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `42481` - // Estimated: `48421` - // Minimum execution time: 38_853_623_000 picoseconds. - Weight::from_parts(42_860_796_000, 0) - .saturating_add(Weight::from_parts(0, 48421)) + // Measured: `42589` + // Estimated: `48529` + // Minimum execution time: 36_855_906_000 picoseconds. + Weight::from_parts(39_589_210_000, 0) + .saturating_add(Weight::from_parts(0, 48529)) .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().writes(16)) } diff --git a/relay/paseo/src/weights/xcm/mod.rs b/relay/paseo/src/weights/xcm/mod.rs index ffee002..98c12fa 100644 --- a/relay/paseo/src/weights/xcm/mod.rs +++ b/relay/paseo/src/weights/xcm/mod.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . mod pallet_xcm_benchmarks_fungible; mod pallet_xcm_benchmarks_generic; @@ -25,272 +25,265 @@ use xcm::{latest::prelude::*, DoubleEncoded}; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmBalancesWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -/// Types of asset supported by the Paseo runtime. +/// Types of asset supported by the Polkadot runtime. pub enum AssetTypes { - /// An asset backed by `pallet-balances`. - Balances, - /// Unknown asset. - Unknown, + /// An asset backed by `pallet-balances`. + Balances, + /// Unknown asset. + Unknown, } impl From<&MultiAsset> for AssetTypes { - fn from(asset: &MultiAsset) -> Self { - match asset { - MultiAsset { - id: - Concrete(MultiLocation { - parents: 0, - interior: Here, - }), - .. - } => AssetTypes::Balances, - _ => AssetTypes::Unknown, - } - } + fn from(asset: &MultiAsset) -> Self { + match asset { + MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), .. } => + AssetTypes::Balances, + _ => AssetTypes::Unknown, + } + } } trait WeighMultiAssets { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; } -// Paseo only knows about one asset, the balances pallet. +// Polkadot only knows about one asset, the balances pallet. const MAX_ASSETS: u64 = 1; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { - match self { - Self::Definite(assets) => assets - .inner() - .into_iter() - .map(From::from) - .map(|t| match t { - AssetTypes::Balances => balances_weight, - AssetTypes::Unknown => Weight::MAX, - }) - .fold(Weight::zero(), |acc, x| acc.saturating_add(x)), - // We don't support any NFTs on Paseo, so these two variants will always match - // only 1 kind of fungible asset. - Self::Wild(AllOf { .. } | AllOfCounted { .. }) => balances_weight, - Self::Wild(AllCounted(count)) => { - balances_weight.saturating_mul(MAX_ASSETS.min(*count as u64)) - } - Self::Wild(All) => balances_weight.saturating_mul(MAX_ASSETS), - } - } + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { + match self { + Self::Definite(assets) => assets + .inner() + .into_iter() + .map(From::from) + .map(|t| match t { + AssetTypes::Balances => balances_weight, + AssetTypes::Unknown => Weight::MAX, + }) + .fold(Weight::zero(), |acc, x| acc.saturating_add(x)), + // We don't support any NFTs on Polkadot, so these two variants will always match + // only 1 kind of fungible asset. + Self::Wild(AllOf { .. } | AllOfCounted { .. }) => balances_weight, + Self::Wild(AllCounted(count)) => + balances_weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + Self::Wild(All) => balances_weight.saturating_mul(MAX_ASSETS), + } + } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { - self.inner() - .into_iter() - .map(|m| >::from(m)) - .map(|t| match t { - AssetTypes::Balances => balances_weight, - AssetTypes::Unknown => Weight::MAX, - }) - .fold(Weight::zero(), |acc, x| acc.saturating_add(x)) - } + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { + self.inner() + .into_iter() + .map(|m| >::from(m)) + .map(|t| match t { + AssetTypes::Balances => balances_weight, + AssetTypes::Unknown => Weight::MAX, + }) + .fold(Weight::zero(), |acc, x| acc.saturating_add(x)) + } } pub struct PolkadotXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for PolkadotXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) - } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) - } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) - } - fn query_response( - _query_id: &u64, - _response: &Response, - _max_weight: &Weight, - _querier: &Option, - ) -> Weight { - XcmGeneric::::query_response() - } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) - } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) - } - fn transact( - _origin_kind: &OriginKind, - _require_weight_at_most: &Weight, - _call: &DoubleEncoded, - ) -> Weight { - XcmGeneric::::transact() - } - fn hrmp_new_channel_open_request( - _sender: &u32, - _max_message_size: &u32, - _max_capacity: &u32, - ) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn hrmp_channel_accepted(_recipient: &u32) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn clear_origin() -> Weight { - XcmGeneric::::clear_origin() - } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { - XcmGeneric::::descend_origin() - } - fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::report_error() - } + fn withdraw_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) + } + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) + } + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) + } + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() + } + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) + } + fn transfer_reserve_asset( + assets: &MultiAssets, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) + } + fn transact( + _origin_kind: &OriginKind, + _require_weight_at_most: &Weight, + _call: &DoubleEncoded, + ) -> Weight { + XcmGeneric::::transact() + } + fn hrmp_new_channel_open_request( + _sender: &u32, + _max_message_size: &u32, + _max_capacity: &u32, + ) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() + } + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() + } + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() + } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) - } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) - } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { - // Paseo does not currently support exchange asset operations - Weight::MAX - } - fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, - _reserve: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) - } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) - } - fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { - XcmGeneric::::report_holding() - } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { - XcmGeneric::::buy_execution() - } - fn refund_surplus() -> Weight { - XcmGeneric::::refund_surplus() - } - fn set_error_handler(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_error_handler() - } - fn set_appendix(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_appendix() - } - fn clear_error() -> Weight { - XcmGeneric::::clear_error() - } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { - XcmGeneric::::claim_asset() - } - fn trap(_code: &u64) -> Weight { - XcmGeneric::::trap() - } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { - XcmGeneric::::subscribe_version() - } - fn unsubscribe_version() -> Weight { - XcmGeneric::::unsubscribe_version() - } - fn burn_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmGeneric::::burn_asset()) - } - fn expect_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmGeneric::::expect_asset()) - } - fn expect_origin(_origin: &Option) -> Weight { - XcmGeneric::::expect_origin() - } - fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { - XcmGeneric::::expect_error() - } - fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { - XcmGeneric::::expect_transact_status() - } - fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::query_pallet() - } - fn expect_pallet( - _index: &u32, - _name: &Vec, - _module_name: &Vec, - _crate_major: &u32, - _min_crate_minor: &u32, - ) -> Weight { - XcmGeneric::::expect_pallet() - } - fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::report_transact_status() - } - fn clear_transact_status() -> Weight { - XcmGeneric::::clear_transact_status() - } - fn universal_origin(_: &Junction) -> Weight { - // Paseo does not currently support universal origin operations - Weight::MAX - } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { - // Paseo relay should not support export message operations - Weight::MAX - } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Paseo does not currently support asset locking operations - Weight::MAX - } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Paseo does not currently support asset locking operations - Weight::MAX - } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Paseo does not currently support asset locking operations - Weight::MAX - } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Paseo does not currently support asset locking operations - Weight::MAX - } - fn set_fees_mode(_: &bool) -> Weight { - XcmGeneric::::set_fees_mode() - } - fn set_topic(_topic: &[u8; 32]) -> Weight { - XcmGeneric::::set_topic() - } - fn clear_topic() -> Weight { - XcmGeneric::::clear_topic() - } - fn alias_origin(_: &MultiLocation) -> Weight { - // XCM Executor does not currently support alias origin operations - Weight::MAX - } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { - XcmGeneric::::unpaid_execution() - } + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) + } + fn deposit_reserve_asset( + assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) + } + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + // Polkadot does not currently support exchange asset operations + Weight::MAX + } + fn initiate_reserve_withdraw( + assets: &MultiAssetFilter, + _reserve: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) + } + fn initiate_teleport( + assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) + } + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { + XcmGeneric::::expect_transact_status() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + // Polkadot does not currently support universal origin operations + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + // Polkadot relay should not support export message operations + Weight::MAX + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Polkadot does not currently support asset locking operations + Weight::MAX + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Polkadot does not currently support asset locking operations + Weight::MAX + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Polkadot does not currently support asset locking operations + Weight::MAX + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Polkadot does not currently support asset locking operations + Weight::MAX + } + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() + } + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() + } + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() + } + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX + } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() + } } #[test] fn all_counted_has_a_sane_weight_upper_limit() { - let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); - let weight = Weight::from_parts(1000, 1000); + let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); + let weight = Weight::from_parts(1000, 1000); - assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); + assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); } diff --git a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 474f9b4..ee7d6d2 100644 --- a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,40 +1,44 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot +// ../polkadot-sdk/target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json -// --steps=50 -// --repeat=20 +// --chain=../polkadot-chain-spec.json +// --steps +// 50 +// --repeat +// 20 // --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/xcm/pallet_xcm_benchmarks_fungible.rs -// --header=./file_header.txt +// --output +// ./polkadot-weights/ +// --header +// ./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,24 +53,24 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - pub fn withdraw_asset() -> Weight { + pub(crate) fn withdraw_asset() -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 26_107_000 picoseconds. - Weight::from_parts(26_841_000, 0) + // Minimum execution time: 18_964_000 picoseconds. + Weight::from_parts(19_310_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`) - pub fn transfer_asset() -> Weight { + pub(crate) fn transfer_asset() -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `6196` - // Minimum execution time: 51_518_000 picoseconds. - Weight::from_parts(52_458_000, 0) + // Minimum execution time: 41_557_000 picoseconds. + Weight::from_parts(42_146_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -81,19 +85,19 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn transfer_reserve_asset() -> Weight { + pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `177` // Estimated: `6196` - // Minimum execution time: 92_794_000 picoseconds. - Weight::from_parts(95_103_000, 0) + // Minimum execution time: 75_309_000 picoseconds. + Weight::from_parts(77_079_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn reserve_asset_deposited() -> Weight { + pub(crate) fn reserve_asset_deposited() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -111,60 +115,62 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn initiate_reserve_withdraw() -> Weight { + pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3642` - // Minimum execution time: 59_659_000 picoseconds. - Weight::from_parts(60_912_000, 0) + // Minimum execution time: 48_100_000 picoseconds. + Weight::from_parts(49_079_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(5)) .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`) - pub fn receive_teleported_asset() -> Weight { + pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 22_610_000 picoseconds. - Weight::from_parts(23_172_000, 0) + // Minimum execution time: 18_172_000 picoseconds. + Weight::from_parts(18_611_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`) - pub fn deposit_asset() -> Weight { + pub(crate) fn deposit_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 22_878_000 picoseconds. - Weight::from_parts(23_789_000, 0) + // Minimum execution time: 17_593_000 picoseconds. + Weight::from_parts(18_409_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`) /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub fn deposit_reserve_asset() -> Weight { + pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3593` - // Minimum execution time: 69_305_000 picoseconds. - Weight::from_parts(70_037_000, 0) + // Minimum execution time: 51_112_000 picoseconds. + Weight::from_parts(52_489_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .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: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) @@ -173,14 +179,12 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`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`) - pub fn initiate_teleport() -> Weight { + pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3593` - // Minimum execution time: 48_797_000 picoseconds. - Weight::from_parts(49_966_000, 0) + // Minimum execution time: 52_328_000 picoseconds. + Weight::from_parts(53_541_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index e3d3cfd..0b61e7c 100644 --- a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,176 +1,167 @@ -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet -// --chain=./paseo-chain-spec.json // --steps=50 // --repeat=20 -// --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* +// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --pallet=pallet_xcm_benchmarks::generic +// --chain=polkadot-dev // --header=./file_header.txt +// --template=./xcm/pallet-xcm-benchmarks/template.hbs +// --output=./runtime/polkadot/src/weights/xcm/ #![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; +use sp_std::marker::PhantomData; -/// Weight functions for `pallet_xcm_benchmarks::generic`. +/// Weights for `pallet_xcm_benchmarks::generic`. pub struct WeightInfo(PhantomData); impl WeightInfo { - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `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: 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) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `177` - // Estimated: `3642` - // Minimum execution time: 58_483_000 picoseconds. - Weight::from_parts(66_541_000, 0) - .saturating_add(Weight::from_parts(0, 3642)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `514` + // Estimated: `17934` + // Minimum execution time: 33_813_000 picoseconds. + Weight::from_parts(34_357_000, 17934) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_429_000 picoseconds. - Weight::from_parts(2_504_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_067_000 picoseconds. + Weight::from_parts(3_153_000, 0) } - /// Storage: `XcmPallet::Queries` (r:1 w:0) - /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: XcmPallet Queries (r:1 w:0) + // Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) pub fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3465` - // Minimum execution time: 7_393_000 picoseconds. - Weight::from_parts(7_782_000, 0) - .saturating_add(Weight::from_parts(0, 3465)) + // Measured: `169` + // Estimated: `3634` + // Minimum execution time: 12_236_000 picoseconds. + Weight::from_parts(12_725_000, 3634) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_688_000 picoseconds. - Weight::from_parts(10_149_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 13_193_000 picoseconds. + Weight::from_parts(13_427_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_195_000 picoseconds. - Weight::from_parts(5_421_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_393_000 picoseconds. + Weight::from_parts(3_464_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_260_000 picoseconds. - Weight::from_parts(2_427_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_955_000 picoseconds. + Weight::from_parts(3_068_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_274_000 picoseconds. - Weight::from_parts(2_400_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_004_000 picoseconds. + Weight::from_parts(3_107_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_256_000 picoseconds. - Weight::from_parts(2_396_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_981_000 picoseconds. + Weight::from_parts(3_039_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_993_000 picoseconds. - Weight::from_parts(3_143_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_814_000 picoseconds. + Weight::from_parts(3_897_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_241_000 picoseconds. - Weight::from_parts(2_397_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_921_000 picoseconds. + Weight::from_parts(3_010_000, 0) } - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `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: 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) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `177` - // Estimated: `3642` - // Minimum execution time: 51_239_000 picoseconds. - Weight::from_parts(53_166_000, 0) - .saturating_add(Weight::from_parts(0, 3642)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `514` + // Estimated: `17934` + // Minimum execution time: 28_324_000 picoseconds. + Weight::from_parts(28_690_000, 17934) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `XcmPallet::AssetTraps` (r:1 w:1) - /// Proof: `XcmPallet::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: XcmPallet AssetTraps (r:1 w:1) + // Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured) pub fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `23` - // Estimated: `3488` - // Minimum execution time: 12_269_000 picoseconds. - Weight::from_parts(12_772_000, 0) - .saturating_add(Weight::from_parts(0, 3488)) + // Measured: `226` + // Estimated: `3691` + // Minimum execution time: 16_430_000 picoseconds. + Weight::from_parts(16_774_000, 3691) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,167 +169,159 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_214_000 picoseconds. - Weight::from_parts(2_368_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_916_000 picoseconds. + Weight::from_parts(3_035_000, 0) } - /// Storage: `XcmPallet::VersionNotifyTargets` (r:1 w:1) - /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: XcmPallet VersionNotifyTargets (r:1 w:1) + // Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, 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: 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) pub fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `3541` - // Minimum execution time: 31_593_000 picoseconds. - Weight::from_parts(32_632_000, 0) - .saturating_add(Weight::from_parts(0, 3541)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `514` + // Estimated: `21913` + // Minimum execution time: 35_915_000 picoseconds. + Weight::from_parts(36_519_000, 21913) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: `XcmPallet::VersionNotifyTargets` (r:0 w:1) - /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: XcmPallet VersionNotifyTargets (r:0 w:1) + // Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub fn unsubscribe_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_890_000 picoseconds. - Weight::from_parts(5_143_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 5_344_000 picoseconds. + Weight::from_parts(5_487_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_547_000 picoseconds. - Weight::from_parts(3_684_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 4_684_000 picoseconds. + Weight::from_parts(4_801_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_356_000 picoseconds. - Weight::from_parts(2_485_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_228_000 picoseconds. + Weight::from_parts(3_325_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_436_000 picoseconds. - Weight::from_parts(2_498_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_059_000 picoseconds. + Weight::from_parts(3_153_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_298_000 picoseconds. - Weight::from_parts(2_418_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_037_000 picoseconds. + Weight::from_parts(3_128_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_532_000 picoseconds. - Weight::from_parts(2_668_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_287_000 picoseconds. + Weight::from_parts(3_360_000, 0) } - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `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: 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) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `177` - // Estimated: `3642` - // Minimum execution time: 61_374_000 picoseconds. - Weight::from_parts(63_966_000, 0) - .saturating_add(Weight::from_parts(0, 3642)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `514` + // Estimated: `17934` + // Minimum execution time: 35_467_000 picoseconds. + Weight::from_parts(36_011_000, 17934) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_452_000 picoseconds. - Weight::from_parts(9_747_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 8_630_000 picoseconds. + Weight::from_parts(8_870_000, 0) } - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `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: 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) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `177` - // Estimated: `3642` - // Minimum execution time: 50_591_000 picoseconds. - Weight::from_parts(52_265_000, 0) - .saturating_add(Weight::from_parts(0, 3642)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `514` + // Estimated: `17934` + // Minimum execution time: 28_630_000 picoseconds. + Weight::from_parts(29_085_000, 17934) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_324_000 picoseconds. - Weight::from_parts(2_470_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_997_000 picoseconds. + Weight::from_parts(3_096_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_287_000 picoseconds. - Weight::from_parts(2_390_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_984_000 picoseconds. + Weight::from_parts(3_059_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_309_000 picoseconds. - Weight::from_parts(2_424_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 2_969_000 picoseconds. + Weight::from_parts(3_006_000, 0) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_280_000 picoseconds. - Weight::from_parts(2_379_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_045_000 picoseconds. + Weight::from_parts(3_087_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_370_000 picoseconds. - Weight::from_parts(2_508_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Minimum execution time: 3_141_000 picoseconds. + Weight::from_parts(3_251_000, 0) } } diff --git a/relay/paseo/src/xcm_config.rs b/relay/paseo/src/xcm_config.rs index 8a611eb..3df859e 100644 --- a/relay/paseo/src/xcm_config.rs +++ b/relay/paseo/src/xcm_config.rs @@ -1,83 +1,83 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Paseo. +// This file is part of Polkadot. -// Paseo is free software: you can redistribute it and/or modify +// Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Paseo is distributed in the hope that it will be useful, +// Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Paseo. If not, see . +// along with Polkadot. If not, see . -//! XCM configuration for Paseo. +//! XCM configuration for Polkadot. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, - GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, - TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, + GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, + TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, }; use frame_support::{ - match_types, parameter_types, - traits::{Contains, Equals, Everything, Nothing}, - weights::Weight, + match_types, parameter_types, + traits::{Contains, Equals, Everything, Nothing}, + weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use paseo_runtime_constants::{ - currency::CENTS, - system_parachain::*, - xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX}, +use polkadot_runtime_constants::{ + currency::CENTS, + system_parachain::*, + xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX}, }; use runtime_common::{ - crowdloan, paras_registrar, - xcm_sender::{ChildParachainRouter, ExponentialPrice}, - ToAuthor, + crowdloan, paras_registrar, + xcm_sender::{ChildParachainRouter, ExponentialPrice}, + ToAuthor, }; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, + DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; parameter_types! { - pub const RootLocation: MultiLocation = Here.into_location(); - /// The location of the PAS token, from the context of this chain. Since this token is native to this - /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to - /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); - /// The Polkadot network ID. This is named. TODO To rename to Paseo. - pub const ThisNetwork: NetworkId = NetworkId::Polkadot; - /// Our location in the universe of consensus systems. - pub const UniversalLocation: InteriorMultiLocation = X1(GlobalConsensus(ThisNetwork::get())); - /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). - pub CheckAccount: AccountId = XcmPallet::check_account(); - /// The Checking Account along with the indication that the local chain is able to mint tokens. - pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); - /// Account of the treasury pallet. - pub TreasuryAccount: AccountId = Treasury::account_id(); + pub const RootLocation: MultiLocation = Here.into_location(); + /// The location of the DOT token, from the context of this chain. Since this token is native to this + /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to + /// the context". + pub const TokenLocation: MultiLocation = Here.into_location(); + /// The Polkadot network ID. This is named. + pub const ThisNetwork: NetworkId = NetworkId::Polkadot; + /// Our location in the universe of consensus systems. + pub const UniversalLocation: InteriorMultiLocation = X1(GlobalConsensus(ThisNetwork::get())); + /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). + pub CheckAccount: AccountId = XcmPallet::check_account(); + /// The Checking Account along with the indication that the local chain is able to mint tokens. + pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); + /// Account of the treasury pallet. + pub TreasuryAccount: AccountId = Treasury::account_id(); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to /// determine the sovereign account controlled by a location. pub type SovereignAccountOf = ( - // We can convert a child parachain using the standard `AccountId` conversion. - ChildParachainConvertsVia, - // We can directly alias an `AccountId32` into a local account. - AccountId32Aliases, - // Foreign locations alias into accounts according to a hash of their standard description. - HashedDescription>, + // We can convert a child parachain using the standard `AccountId` conversion. + ChildParachainConvertsVia, + // We can directly alias an `AccountId32` into a local account. + AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Our asset transactor. This is what allows us to interact with the runtime assets from the point @@ -85,106 +85,106 @@ pub type SovereignAccountOf = ( /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = XcmCurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // We can convert the MultiLocations with our converter above: - SovereignAccountOf, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We track our teleports in/out to keep total issuance correct. - LocalCheckAccount, + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // We can convert the MultiLocations with our converter above: + SovereignAccountOf, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We track our teleports in/out to keep total issuance correct. + LocalCheckAccount, >; /// The means that we convert an XCM origin `MultiLocation` into the runtime's `Origin` type for /// local dispatch. This is a conversion function from an `OriginKind` type along with the /// `MultiLocation` value and returns an `Origin` value or an error. type LocalOriginConverter = ( - // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined - // by the `SovereignAccountOf` converter. - SovereignSignedViaLocation, - // If the origin kind is `Native` and the XCM origin is a child parachain, then we can express - // it with the special `parachains_origin::Origin` origin variant. - ChildParachainAsNative, - // If the origin kind is `Native` and the XCM origin is the `AccountId32` location, then it can - // be expressed using the `Signed` origin variant. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined + // by the `SovereignAccountOf` converter. + SovereignSignedViaLocation, + // If the origin kind is `Native` and the XCM origin is a child parachain, then we can express + // it with the special `parachains_origin::Origin` origin variant. + ChildParachainAsNative, + // If the origin kind is `Native` and the XCM origin is the `AccountId32` location, then it can + // be expressed using the `Signed` origin variant. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, ); parameter_types! { - /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024); - /// Maximum number of instructions in a single XCM fragment. A sanity check against weight - /// calculations getting too crazy. - pub const MaxInstructions: u32 = 100; - /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); - /// The base fee for the message delivery fees. - pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); + /// The amount of weight an XCM operation takes. This is a safe overestimate. + pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024); + /// Maximum number of instructions in a single XCM fragment. A sanity check against weight + /// calculations getting too crazy. + pub const MaxInstructions: u32 = 100; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); + /// The base fee for the message delivery fees. + pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } pub type PriceForChildParachainDelivery = - ExponentialPrice; + ExponentialPrice; /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. pub type XcmRouter = WithUniqueTopic<( - // Only one router so far - use DMP to communicate with child parachains. - ChildParachainRouter, + // Only one router so far - use DMP to communicate with child parachains. + ChildParachainRouter, )>; parameter_types! { - pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); - pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); - pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); - pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); - pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); - pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); - pub const MaxAssetsIntoHolding: u32 = 64; + pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); + pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); + pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); + pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); + pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); + pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); + pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); + pub const MaxAssetsIntoHolding: u32 = 64; } -/// Paseo Relay recognizes/respects AssetHub, Collectives, and BridgeHub chains as teleporters. +/// Polkadot Relay recognizes/respects AssetHub, Collectives, and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( - xcm_builder::Case, - xcm_builder::Case, - xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, ); match_types! { - pub type OnlyParachains: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(_)) } - }; - pub type CollectivesOrFellows: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | - MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } - }; - pub type LocalPlurality: impl Contains = { - MultiLocation { parents: 0, interior: X1(Plurality { .. }) } - }; + pub type OnlyParachains: impl Contains = { + MultiLocation { parents: 0, interior: X1(Parachain(_)) } + }; + pub type CollectivesOrFellows: impl Contains = { + MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | + MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } + }; + pub type LocalPlurality: impl Contains = { + MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + }; } /// The barriers one of which must be passed for an XCM message to be executed. pub type Barrier = TrailingSetTopicAsId<( - // Weight that is paid for may be consumed. - TakeWeightCredit, - // Expected responses are OK. - AllowKnownQueryResponses, - WithComputedOrigin< - ( - // If the message is one that immediately attempts to pay for execution, then allow it. - AllowTopLevelPaidExecutionFrom, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - // Collectives and Fellows plurality get free execution. - AllowExplicitUnpaidExecutionFrom, - ), - UniversalLocation, - ConstU32<8>, - >, + // Weight that is paid for may be consumed. + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + // Collectives and Fellows plurality get free execution. + AllowExplicitUnpaidExecutionFrom, + ), + UniversalLocation, + ConstU32<8>, + >, )>; /// A call filter for the XCM Transact instruction. This is a temporary measure until we @@ -196,139 +196,136 @@ pub type Barrier = TrailingSetTopicAsId<( /// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. pub struct SafeCallFilter; impl Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - #[cfg(feature = "runtime-benchmarks")] - { - if matches!( - call, - RuntimeCall::System(frame_system::Call::remark_with_event { .. }) - ) { - return true; - } - } + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } - match call { - RuntimeCall::System( - frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, - ) - | RuntimeCall::Babe(..) - | RuntimeCall::Timestamp(..) - | RuntimeCall::Indices(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Crowdloan( - crowdloan::Call::create { .. } - | crowdloan::Call::contribute { .. } - | crowdloan::Call::withdraw { .. } - | crowdloan::Call::refund { .. } - | crowdloan::Call::dissolve { .. } - | crowdloan::Call::edit { .. } - | crowdloan::Call::poke { .. } - | crowdloan::Call::contribute_all { .. }, - ) - | RuntimeCall::Staking( - pallet_staking::Call::bond { .. } - | pallet_staking::Call::bond_extra { .. } - | pallet_staking::Call::unbond { .. } - | pallet_staking::Call::withdraw_unbonded { .. } - | pallet_staking::Call::validate { .. } - | pallet_staking::Call::nominate { .. } - | pallet_staking::Call::chill { .. } - | pallet_staking::Call::set_payee { .. } - | pallet_staking::Call::set_controller { .. } - | pallet_staking::Call::set_validator_count { .. } - | pallet_staking::Call::increase_validator_count { .. } - | pallet_staking::Call::scale_validator_count { .. } - | pallet_staking::Call::force_no_eras { .. } - | pallet_staking::Call::force_new_era { .. } - | pallet_staking::Call::set_invulnerables { .. } - | pallet_staking::Call::force_unstake { .. } - | pallet_staking::Call::force_new_era_always { .. } - | pallet_staking::Call::payout_stakers { .. } - | pallet_staking::Call::rebond { .. } - | pallet_staking::Call::reap_stash { .. } - | pallet_staking::Call::set_staking_configs { .. } - | pallet_staking::Call::chill_other { .. } - | pallet_staking::Call::force_apply_min_commission { .. }, - ) - | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) - | RuntimeCall::Grandpa(..) - | RuntimeCall::ImOnline(..) - | RuntimeCall::Treasury(..) - | RuntimeCall::ConvictionVoting(..) - | RuntimeCall::Referenda( - pallet_referenda::Call::place_decision_deposit { .. } - | pallet_referenda::Call::refund_decision_deposit { .. } - | pallet_referenda::Call::cancel { .. } - | pallet_referenda::Call::kill { .. } - | pallet_referenda::Call::nudge_referendum { .. } - | pallet_referenda::Call::one_fewer_deciding { .. }, - ) - | RuntimeCall::Claims( - super::claims::Call::claim { .. } - | super::claims::Call::mint_claim { .. } - | super::claims::Call::move_claim { .. }, - ) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::Identity( - pallet_identity::Call::add_registrar { .. } - | pallet_identity::Call::set_identity { .. } - | pallet_identity::Call::clear_identity { .. } - | pallet_identity::Call::request_judgement { .. } - | pallet_identity::Call::cancel_request { .. } - | pallet_identity::Call::set_fee { .. } - | pallet_identity::Call::set_account_id { .. } - | pallet_identity::Call::set_fields { .. } - | pallet_identity::Call::provide_judgement { .. } - | pallet_identity::Call::kill_identity { .. } - | pallet_identity::Call::add_sub { .. } - | pallet_identity::Call::rename_sub { .. } - | pallet_identity::Call::remove_sub { .. } - | pallet_identity::Call::quit_sub { .. }, - ) - | RuntimeCall::Vesting(..) - | RuntimeCall::Bounties( - pallet_bounties::Call::propose_bounty { .. } - | pallet_bounties::Call::approve_bounty { .. } - | pallet_bounties::Call::propose_curator { .. } - | pallet_bounties::Call::unassign_curator { .. } - | pallet_bounties::Call::accept_curator { .. } - | pallet_bounties::Call::award_bounty { .. } - | pallet_bounties::Call::claim_bounty { .. } - | pallet_bounties::Call::close_bounty { .. }, - ) - | RuntimeCall::ChildBounties(..) - | RuntimeCall::ElectionProviderMultiPhase(..) - | RuntimeCall::VoterList(..) - | RuntimeCall::NominationPools( - pallet_nomination_pools::Call::join { .. } - | pallet_nomination_pools::Call::bond_extra { .. } - | pallet_nomination_pools::Call::claim_payout { .. } - | pallet_nomination_pools::Call::unbond { .. } - | pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } - | pallet_nomination_pools::Call::withdraw_unbonded { .. } - | pallet_nomination_pools::Call::create { .. } - | pallet_nomination_pools::Call::create_with_pool_id { .. } - | pallet_nomination_pools::Call::set_state { .. } - | pallet_nomination_pools::Call::set_configs { .. } - | pallet_nomination_pools::Call::update_roles { .. } - | pallet_nomination_pools::Call::chill { .. }, - ) - | RuntimeCall::Hrmp(..) - | RuntimeCall::Registrar( - paras_registrar::Call::deregister { .. } - | paras_registrar::Call::swap { .. } - | paras_registrar::Call::remove_lock { .. } - | paras_registrar::Call::reserve { .. } - | paras_registrar::Call::add_lock { .. }, - ) - | RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { - .. - }) - | RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) - | RuntimeCall::Proxy(..) => true, - _ => false, - } - } + match call { + RuntimeCall::System( + frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, + ) | + RuntimeCall::Babe(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Indices(..) | + RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } | + crowdloan::Call::contribute { .. } | + crowdloan::Call::withdraw { .. } | + crowdloan::Call::refund { .. } | + crowdloan::Call::dissolve { .. } | + crowdloan::Call::edit { .. } | + crowdloan::Call::poke { .. } | + crowdloan::Call::contribute_all { .. }, + ) | + RuntimeCall::Staking( + pallet_staking::Call::bond { .. } | + pallet_staking::Call::bond_extra { .. } | + pallet_staking::Call::unbond { .. } | + pallet_staking::Call::withdraw_unbonded { .. } | + pallet_staking::Call::validate { .. } | + pallet_staking::Call::nominate { .. } | + pallet_staking::Call::chill { .. } | + pallet_staking::Call::set_payee { .. } | + pallet_staking::Call::set_controller { .. } | + pallet_staking::Call::set_validator_count { .. } | + pallet_staking::Call::increase_validator_count { .. } | + pallet_staking::Call::scale_validator_count { .. } | + pallet_staking::Call::force_no_eras { .. } | + pallet_staking::Call::force_new_era { .. } | + pallet_staking::Call::set_invulnerables { .. } | + pallet_staking::Call::force_unstake { .. } | + pallet_staking::Call::force_new_era_always { .. } | + pallet_staking::Call::payout_stakers { .. } | + pallet_staking::Call::rebond { .. } | + pallet_staking::Call::reap_stash { .. } | + pallet_staking::Call::set_staking_configs { .. } | + pallet_staking::Call::chill_other { .. } | + pallet_staking::Call::force_apply_min_commission { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::Grandpa(..) | + RuntimeCall::ImOnline(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda( + pallet_referenda::Call::place_decision_deposit { .. } | + pallet_referenda::Call::refund_decision_deposit { .. } | + pallet_referenda::Call::cancel { .. } | + pallet_referenda::Call::kill { .. } | + pallet_referenda::Call::nudge_referendum { .. } | + pallet_referenda::Call::one_fewer_deciding { .. }, + ) | + RuntimeCall::Claims( + super::claims::Call::claim { .. } | + super::claims::Call::mint_claim { .. } | + super::claims::Call::move_claim { .. }, + ) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | + RuntimeCall::Identity( + pallet_identity::Call::add_registrar { .. } | + pallet_identity::Call::set_identity { .. } | + pallet_identity::Call::clear_identity { .. } | + pallet_identity::Call::request_judgement { .. } | + pallet_identity::Call::cancel_request { .. } | + pallet_identity::Call::set_fee { .. } | + pallet_identity::Call::set_account_id { .. } | + pallet_identity::Call::set_fields { .. } | + pallet_identity::Call::provide_judgement { .. } | + pallet_identity::Call::kill_identity { .. } | + pallet_identity::Call::add_sub { .. } | + pallet_identity::Call::rename_sub { .. } | + pallet_identity::Call::remove_sub { .. } | + pallet_identity::Call::quit_sub { .. }, + ) | + RuntimeCall::Vesting(..) | + RuntimeCall::Bounties( + pallet_bounties::Call::propose_bounty { .. } | + pallet_bounties::Call::approve_bounty { .. } | + pallet_bounties::Call::propose_curator { .. } | + pallet_bounties::Call::unassign_curator { .. } | + pallet_bounties::Call::accept_curator { .. } | + pallet_bounties::Call::award_bounty { .. } | + pallet_bounties::Call::claim_bounty { .. } | + pallet_bounties::Call::close_bounty { .. }, + ) | + RuntimeCall::ChildBounties(..) | + RuntimeCall::ElectionProviderMultiPhase(..) | + RuntimeCall::VoterList(..) | + RuntimeCall::NominationPools( + pallet_nomination_pools::Call::join { .. } | + pallet_nomination_pools::Call::bond_extra { .. } | + pallet_nomination_pools::Call::claim_payout { .. } | + pallet_nomination_pools::Call::unbond { .. } | + pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } | + pallet_nomination_pools::Call::withdraw_unbonded { .. } | + pallet_nomination_pools::Call::create { .. } | + pallet_nomination_pools::Call::create_with_pool_id { .. } | + pallet_nomination_pools::Call::set_state { .. } | + pallet_nomination_pools::Call::set_configs { .. } | + pallet_nomination_pools::Call::update_roles { .. } | + pallet_nomination_pools::Call::chill { .. }, + ) | + RuntimeCall::Hrmp(..) | + RuntimeCall::Registrar( + paras_registrar::Call::deregister { .. } | + paras_registrar::Call::swap { .. } | + paras_registrar::Call::remove_lock { .. } | + paras_registrar::Call::reserve { .. } | + paras_registrar::Call::add_lock { .. }, + ) | + RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { + .. + }) | + RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) | + RuntimeCall::Proxy(..) => true, + _ => false, + } + } } /// Locations that will not be charged fees in the executor, neither for execution nor delivery. @@ -337,76 +334,76 @@ pub type WaivedLocations = (SystemParachains, Equals, LocalPlurali pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = LocalOriginConverter; - // Paseo Relay recognises no chains which act as reserves. - type IsReserve = (); - type IsTeleporter = TrustedTeleporters; - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = WeightInfoBounds< - crate::weights::xcm::PolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - // The weight trader piggybacks on the existing transaction-fee conversion logic. - type Trader = - UsingComponents>; - type ResponseHandler = XcmPallet; - type AssetTrap = XcmPallet; - type AssetLocker = (); - type AssetExchanger = (); - type AssetClaims = XcmPallet; - type SubscriptionService = XcmPallet; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; - // No bridges yet... - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = WithOriginFilter; - type SafeCallFilter = SafeCallFilter; - type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = LocalAssetTransactor; + type OriginConverter = LocalOriginConverter; + // Polkadot Relay recognises no chains which act as reserves. + type IsReserve = (); + type IsTeleporter = TrustedTeleporters; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = WeightInfoBounds< + crate::weights::xcm::PolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + // The weight trader piggybacks on the existing transaction-fee conversion logic. + type Trader = + UsingComponents>; + type ResponseHandler = XcmPallet; + type AssetTrap = XcmPallet; + type AssetLocker = (); + type AssetExchanger = (); + type AssetClaims = XcmPallet; + type SubscriptionService = XcmPallet; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type FeeManager = XcmFeesToAccount; + // No bridges yet... + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { - // `GeneralAdmin` pluralistic body. - pub const GeneralAdminBodyId: BodyId = BodyId::Administration; - // StakingAdmin pluralistic body. - pub const StakingAdminBodyId: BodyId = BodyId::Defense; - // FellowshipAdmin pluralistic body. - pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); - // `Treasurer` pluralistic body. - pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); + // `GeneralAdmin` pluralistic body. + pub const GeneralAdminBodyId: BodyId = BodyId::Administration; + // StakingAdmin pluralistic body. + pub const StakingAdminBodyId: BodyId = BodyId::Defense; + // FellowshipAdmin pluralistic body. + pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); + // `Treasurer` pluralistic body. + pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); + pub ReachableDest: Option = Some(Parachain(1000).into()); } /// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. pub type GeneralAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( - GeneralAdminToPlurality, - // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + GeneralAdminToPlurality, + // And a usual Signed origin to be used in XCM as a corresponding AccountId32 + SignedToAccountId32, ); /// Type to convert the `StakingAdmin` origin to a Plurality `MultiLocation` value. pub type StakingAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert the `FellowshipAdmin` origin to a Plurality `MultiLocation` value. pub type FellowshipAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert the `Treasurer` origin to a Plurality `MultiLocation` value. pub type TreasurerToPlurality = OriginToPluralityVoice; @@ -414,48 +411,48 @@ pub type TreasurerToPlurality = OriginToPluralityVoice; - type XcmRouter = XcmRouter; - // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - // ...but they must match our filter, which rejects all. - type XcmExecuteFilter = Nothing; // == Deny All - type XcmExecutor = xcm_executor::XcmExecutor; - type XcmTeleportFilter = Everything; // == Allow All - type XcmReserveTransferFilter = Everything; // == Allow All - type Weigher = WeightInfoBounds< - crate::weights::xcm::PolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = SovereignAccountOf; - type MaxLockers = ConstU32<8>; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); - type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + // We only allow the root, the general admin, the fellowship admin and the staking admin to send + // messages. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally... + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + // ...but they must match our filter, which rejects all. + type XcmExecuteFilter = Nothing; // == Deny All + type XcmExecutor = xcm_executor::XcmExecutor; + type XcmTeleportFilter = Everything; // == Allow All + type XcmReserveTransferFilter = Everything; // == Allow All + type Weigher = WeightInfoBounds< + crate::weights::xcm::PolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = SovereignAccountOf; + type MaxLockers = ConstU32<8>; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; + type AdminOrigin = EnsureRoot; } From 3496bb42f755a5051889c7bd7bc61d66e9099c5a Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Tue, 2 Apr 2024 09:06:59 -0300 Subject: [PATCH 2/4] go back from paseo to polkadot --- relay/paseo/Cargo.toml | 10 +- relay/paseo/build.rs | 16 +- relay/paseo/constants/Cargo.toml | 2 +- relay/paseo/constants/src/lib.rs | 254 +- .../constants/src/weights/block_weights.rs | 74 +- .../src/weights/extrinsic_weights.rs | 74 +- .../constants/src/weights/paritydb_weights.rs | 138 +- .../constants/src/weights/rocksdb_weights.rs | 138 +- relay/paseo/src/bag_thresholds.rs | 408 +- relay/paseo/src/governance/mod.rs | 96 +- relay/paseo/src/governance/old.rs | 288 +- relay/paseo/src/governance/origins.rs | 132 +- relay/paseo/src/governance/tracks.rs | 524 +- relay/paseo/src/lib.rs | 4575 +++++++++-------- .../weights/frame_benchmarking_baseline.rs | 80 +- .../frame_election_provider_support.rs | 76 +- relay/paseo/src/weights/frame_system.rs | 102 +- relay/paseo/src/weights/mod.rs | 1 + relay/paseo/src/weights/pallet_asset_rate.rs | 64 +- relay/paseo/src/weights/pallet_bags_list.rs | 70 +- relay/paseo/src/weights/pallet_balances.rs | 88 +- relay/paseo/src/weights/pallet_bounties.rs | 104 +- .../src/weights/pallet_child_bounties.rs | 88 +- .../src/weights/pallet_conviction_voting.rs | 96 +- .../pallet_election_provider_multi_phase.rs | 8 +- .../paseo/src/weights/pallet_fast_unstake.rs | 8 +- relay/paseo/src/weights/pallet_identity.rs | 212 +- relay/paseo/src/weights/pallet_im_online.rs | 62 +- relay/paseo/src/weights/pallet_indices.rs | 72 +- .../paseo/src/weights/pallet_message_queue.rs | 92 +- relay/paseo/src/weights/pallet_multisig.rs | 120 +- .../src/weights/pallet_nomination_pools.rs | 186 +- relay/paseo/src/weights/pallet_offences.rs | 8 +- relay/paseo/src/weights/pallet_preimage.rs | 120 +- relay/paseo/src/weights/pallet_proxy.rs | 148 +- relay/paseo/src/weights/pallet_referenda.rs | 172 +- relay/paseo/src/weights/pallet_scheduler.rs | 124 +- relay/paseo/src/weights/pallet_session.rs | 8 +- relay/paseo/src/weights/pallet_staking.rs | 8 +- relay/paseo/src/weights/pallet_timestamp.rs | 60 +- relay/paseo/src/weights/pallet_treasury.rs | 100 +- relay/paseo/src/weights/pallet_utility.rs | 84 +- relay/paseo/src/weights/pallet_vesting.rs | 146 +- relay/paseo/src/weights/pallet_whitelist.rs | 76 +- relay/paseo/src/weights/pallet_xcm.rs | 112 +- .../src/weights/runtime_common_auctions.rs | 70 +- .../src/weights/runtime_common_claims.rs | 78 +- .../src/weights/runtime_common_crowdloan.rs | 96 +- .../weights/runtime_common_paras_registrar.rs | 118 +- .../paseo/src/weights/runtime_common_slots.rs | 88 +- .../runtime_parachains_configuration.rs | 112 +- .../weights/runtime_parachains_disputes.rs | 58 +- .../runtime_parachains_disputes_slashing.rs | 8 +- .../src/weights/runtime_parachains_hrmp.rs | 124 +- .../weights/runtime_parachains_inclusion.rs | 60 +- .../weights/runtime_parachains_initializer.rs | 60 +- .../src/weights/runtime_parachains_paras.rs | 136 +- .../runtime_parachains_paras_inherent.rs | 100 +- relay/paseo/src/weights/xcm/mod.rs | 487 +- .../xcm/pallet_xcm_benchmarks_fungible.rs | 110 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 353 +- relay/paseo/src/xcm_config.rs | 673 +-- 62 files changed, 6042 insertions(+), 6113 deletions(-) diff --git a/relay/paseo/Cargo.toml b/relay/paseo/Cargo.toml index 94b419e..cf628d3 100644 --- a/relay/paseo/Cargo.toml +++ b/relay/paseo/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "polkadot-runtime" +name = "paseo-runtime" build = "build.rs" repository.workspace = true version.workspace = true @@ -77,13 +77,14 @@ pallet-referenda = { default-features = false , version = "25.0.0" } pallet-scheduler = { default-features = false , version = "26.0.0" } pallet-session = { default-features = false , version = "25.0.0" } frame-support = { default-features = false , version = "25.0.0" } +pallet-sudo = { default-features = false , version = "25.0.0" } pallet-staking = { default-features = false , version = "25.0.1" } pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } pallet-staking-reward-curve = { version = "10.0.0" } pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } frame-system = { default-features = false , version = "25.0.0" } frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } -polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } +paseo-runtime-constants = { package = "paseo-runtime-constants", path = "constants", default-features = false } pallet-timestamp = { default-features = false , version = "24.0.0" } pallet-tips = { default-features = false , version = "24.0.0" } pallet-treasury = { default-features = false , version = "24.0.0" } @@ -183,6 +184,7 @@ std = [ "pallet-scheduler/std", "pallet-session-benchmarking?/std", "pallet-session/std", + "pallet-sudo/std", "pallet-staking-reward-fn/std", "pallet-staking-runtime-api/std", "pallet-staking/std", @@ -197,7 +199,7 @@ std = [ "pallet-xcm-benchmarks?/std", "pallet-xcm/std", "parity-scale-codec/std", - "polkadot-runtime-constants/std", + "paseo-runtime-constants/std", "primitives/std", "runtime-common/std", "runtime-parachains/std", @@ -262,6 +264,7 @@ runtime-benchmarks = [ "pallet-referenda/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-session-benchmarking/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-tips/runtime-benchmarks", @@ -317,6 +320,7 @@ try-runtime = [ "pallet-referenda/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", + "pallet-sudo/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", "pallet-tips/try-runtime", diff --git a/relay/paseo/build.rs b/relay/paseo/build.rs index 428c971..f1b32bc 100644 --- a/relay/paseo/build.rs +++ b/relay/paseo/build.rs @@ -1,7 +1,7 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -12,14 +12,14 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . use substrate_wasm_builder::WasmBuilder; fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() - .build() + WasmBuilder::new() + .with_current_project() + .import_memory() + .export_heap_base() + .build() } diff --git a/relay/paseo/constants/Cargo.toml b/relay/paseo/constants/Cargo.toml index 706b432..30dce19 100644 --- a/relay/paseo/constants/Cargo.toml +++ b/relay/paseo/constants/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "polkadot-runtime-constants" +name = "paseo-runtime-constants" repository.workspace = true version.workspace = true authors.workspace = true diff --git a/relay/paseo/constants/src/lib.rs b/relay/paseo/constants/src/lib.rs index 113c825..6b4dd57 100644 --- a/relay/paseo/constants/src/lib.rs +++ b/relay/paseo/constants/src/lib.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . #![cfg_attr(not(feature = "std"), no_std)] @@ -22,152 +22,152 @@ pub use self::currency::DOLLARS; /// Money matters. pub mod currency { - use primitives::Balance; + use primitives::Balance; - /// The existential deposit. - pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS; + /// The existential deposit. + pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS; - pub const UNITS: Balance = 10_000_000_000; - pub const DOLLARS: Balance = UNITS; // 10_000_000_000 - pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000 - pub const CENTS: Balance = DOLLARS / 100; // 100_000_000 - pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 + pub const UNITS: Balance = 10_000_000_000; + pub const DOLLARS: Balance = UNITS; // 10_000_000_000 + pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000 + pub const CENTS: Balance = DOLLARS / 100; // 100_000_000 + pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 - pub const fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS - } + pub const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS + } } /// Time and blocks. pub mod time { - use primitives::{BlockNumber, Moment}; - use runtime_common::prod_or_fast; - pub const MILLISECS_PER_BLOCK: Moment = 6000; - pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(4 * HOURS, 1 * MINUTES); - - // These time units are defined in number of blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - pub const HOURS: BlockNumber = MINUTES * 60; - pub const DAYS: BlockNumber = HOURS * 24; - pub const WEEKS: BlockNumber = DAYS * 7; - - // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. - // The choice of is done in accordance to the slot duration and expected target - // block time, for safely resisting network delays of maximum two seconds. - // - pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); + use primitives::{BlockNumber, Moment}; + use runtime_common::prod_or_fast; + pub const MILLISECS_PER_BLOCK: Moment = 6000; + pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; + pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 1 * MINUTES); + + // These time units are defined in number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; + pub const WEEKS: BlockNumber = DAYS * 7; + + // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. + // The choice of is done in accordance to the slot duration and expected target + // block time, for safely resisting network delays of maximum two seconds. + // + pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); } /// Fee-related. pub mod fee { - use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::{ - WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, - }; - use primitives::Balance; - use smallvec::smallvec; - pub use sp_runtime::Perbill; - - /// The block saturation level. Fees will be updates based on this value. - pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); - - /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the - /// node's balance type. - /// - /// This should typically create a mapping between the following ranges: - /// - [0, `MAXIMUM_BLOCK_WEIGHT`] - /// - [Balance::min, Balance::max] - /// - /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: - /// - Setting it to `0` will essentially disable the weight fee. - /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. - pub struct WeightToFee; - impl WeightToFeePolynomial for WeightToFee { - type Balance = Balance; - fn polynomial() -> WeightToFeeCoefficients { - // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: - let p = super::currency::CENTS; - let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); - smallvec![WeightToFeeCoefficient { - degree: 1, - negative: false, - coeff_frac: Perbill::from_rational(p % q, q), - coeff_integer: p / q, - }] - } - } + use crate::weights::ExtrinsicBaseWeight; + use frame_support::weights::{ + WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }; + use primitives::Balance; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + /// The block saturation level. Fees will be updates based on this value. + pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); + + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the + /// node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, `MAXIMUM_BLOCK_WEIGHT`] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // in Paseo, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = super::currency::CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } } /// XCM protocol related constants. pub mod xcm { - /// Pluralistic bodies existing within the consensus. - pub mod body { - // Preallocated for the Root body. - #[allow(dead_code)] - const ROOT_INDEX: u32 = 0; - // The bodies corresponding to the Polkadot OpenGov Origins. - pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1; - // The body corresponding to the Treasurer OpenGov track. - pub const TREASURER_INDEX: u32 = 2; - } + /// Pluralistic bodies existing within the consensus. + pub mod body { + // Preallocated for the Root body. + #[allow(dead_code)] + const ROOT_INDEX: u32 = 0; + // The bodies corresponding to the Paseo OpenGov Origins. + pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1; + // The body corresponding to the Treasurer OpenGov track. + pub const TREASURER_INDEX: u32 = 2; + } } /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; - - /// Asset Hub parachain ID. - pub const ASSET_HUB_ID: u32 = 1000; - /// Collectives parachain ID. - pub const COLLECTIVES_ID: u32 = 1001; - /// Bridge Hub parachain ID. - pub const BRIDGE_HUB_ID: u32 = 1002; - - frame_support::match_types! { - // System parachains from Polkadot point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - COLLECTIVES_ID | - BRIDGE_HUB_ID - )), - } - }; - } + use xcm::latest::prelude::*; + + /// Asset Hub parachain ID. + pub const ASSET_HUB_ID: u32 = 1000; + /// Collectives parachain ID. + pub const COLLECTIVES_ID: u32 = 1001; + /// Bridge Hub parachain ID. + pub const BRIDGE_HUB_ID: u32 = 1002; + + frame_support::match_types! { + // System parachains from Paseo point of view. + pub type SystemParachains: impl Contains = { + MultiLocation { + parents: 0, + interior: X1(Parachain( + ASSET_HUB_ID | + COLLECTIVES_ID | + BRIDGE_HUB_ID + )), + } + }; + } } -/// Polkadot Treasury pallet instance. +/// Paseo Treasury pallet instance. pub const TREASURY_PALLET_ID: u8 = 19; #[cfg(test)] mod tests { - use super::{ - currency::{CENTS, DOLLARS, MILLICENTS}, - fee::WeightToFee, - }; - use crate::weights::ExtrinsicBaseWeight; - use frame_support::weights::WeightToFee as WeightToFeeT; - use runtime_common::MAXIMUM_BLOCK_WEIGHT; - - #[test] - // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. - fn full_block_fee_is_correct() { - // A full block should cost between 10 and 100 DOLLARS. - let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); - assert!(full_block >= 10 * DOLLARS); - assert!(full_block <= 100 * DOLLARS); - } - - #[test] - // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct - fn extrinsic_base_fee_is_correct() { - // `ExtrinsicBaseWeight` should cost 1/10 of a CENT - println!("Base: {}", ExtrinsicBaseWeight::get()); - let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); - let y = CENTS / 10; - assert!(x.max(y) - x.min(y) < MILLICENTS); - } + use super::{ + currency::{CENTS, DOLLARS, MILLICENTS}, + fee::WeightToFee, + }; + use crate::weights::ExtrinsicBaseWeight; + use frame_support::weights::WeightToFee as WeightToFeeT; + use runtime_common::MAXIMUM_BLOCK_WEIGHT; + + #[test] + // Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds. + fn full_block_fee_is_correct() { + // A full block should cost between 10 and 100 DOLLARS. + let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT); + assert!(full_block >= 10 * DOLLARS); + assert!(full_block <= 100 * DOLLARS); + } + + #[test] + // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct + fn extrinsic_base_fee_is_correct() { + // `ExtrinsicBaseWeight` should cost 1/10 of a CENT + println!("Base: {}", ExtrinsicBaseWeight::get()); + let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get()); + let y = CENTS / 10; + assert!(x.max(y) - x.min(y) < MILLICENTS); + } } diff --git a/relay/paseo/constants/src/weights/block_weights.rs b/relay/paseo/constants/src/weights/block_weights.rs index 9608fd5..17eb00f 100644 --- a/relay/paseo/constants/src/weights/block_weights.rs +++ b/relay/paseo/constants/src/weights/block_weights.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-06-18 (Y/M/D) @@ -39,43 +39,43 @@ use sp_core::parameter_types; use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { - /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 13_546_462, 14_258_156 - /// Average: 13_806_190 - /// Median: 13_798_575 - /// Std-Dev: 141568.11 - /// - /// Percentiles nanoseconds: - /// 99th: 14_144_016 - /// 95th: 14_039_432 - /// 75th: 13_904_965 - pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(13_806_190), 0); + /// Time to execute an empty block. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// + /// Stats nanoseconds: + /// Min, Max: 13_546_462, 14_258_156 + /// Average: 13_806_190 + /// Median: 13_798_575 + /// Std-Dev: 141568.11 + /// + /// Percentiles nanoseconds: + /// 99th: 14_144_016 + /// 95th: 14_039_432 + /// 75th: 13_904_965 + pub const BlockExecutionWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(13_806_190), 0); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use sp_weights::constants; - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::BlockExecutionWeight::get(); + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::BlockExecutionWeight::get(); - // At least 100 µs. - assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 100 µs." - ); - // At most 50 ms. - assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 50 ms." - ); - } + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 50 ms." + ); + } } diff --git a/relay/paseo/constants/src/weights/extrinsic_weights.rs b/relay/paseo/constants/src/weights/extrinsic_weights.rs index fac8792..12d2fa3 100644 --- a/relay/paseo/constants/src/weights/extrinsic_weights.rs +++ b/relay/paseo/constants/src/weights/extrinsic_weights.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-06-18 (Y/M/D) @@ -39,43 +39,43 @@ use sp_core::parameter_types; use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { - /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 125_467, 127_402 - /// Average: 126_045 - /// Median: 126_039 - /// Std-Dev: 310.96 - /// - /// Percentiles nanoseconds: - /// 99th: 126_699 - /// 95th: 126_620 - /// 75th: 126_207 - pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(126_045), 0); + /// Time to execute a NO-OP extrinsic, for example `System::remark`. + /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// + /// Stats nanoseconds: + /// Min, Max: 125_467, 127_402 + /// Average: 126_045 + /// Median: 126_039 + /// Std-Dev: 310.96 + /// + /// Percentiles nanoseconds: + /// 99th: 126_699 + /// 95th: 126_620 + /// 75th: 126_207 + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(126_045), 0); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use sp_weights::constants; - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::ExtrinsicBaseWeight::get(); + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::ExtrinsicBaseWeight::get(); - // At least 10 µs. - assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 10 µs." - ); - // At most 1 ms. - assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 1 ms." - ); - } + // At least 10 µs. + assert!( + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 10 µs." + ); + // At most 1 ms. + assert!( + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 1 ms." + ); + } } diff --git a/relay/paseo/constants/src/weights/paritydb_weights.rs b/relay/paseo/constants/src/weights/paritydb_weights.rs index f999539..f946a94 100644 --- a/relay/paseo/constants/src/weights/paritydb_weights.rs +++ b/relay/paseo/constants/src/weights/paritydb_weights.rs @@ -18,7 +18,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-03-30 (Y/M/D) //! -//! DATABASE: `ParityDb`, RUNTIME: `Polkadot` +//! DATABASE: `ParityDb`, RUNTIME: `Paseo` //! BLOCK-NUM: `BlockId::Number(9653477)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` //! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0` @@ -33,77 +33,77 @@ // --mul=1.1 // --weight-path=runtime/polkadot/constants/src/weights/ -/// Storage DB weights for the `Polkadot` runtime and `ParityDb`. +/// Storage DB weights for the `Paseo` runtime and `ParityDb`. pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; - parameter_types! { - /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights - /// are available for brave runtime engineers who may want to try this out as default. - pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - // Time to read one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 4_611, 13_478_005 - // Average: 10_750 - // Median: 10_655 - // Std-Dev: 12214.49 - // - // Percentiles [NS]: - // 99th: 14_451 - // 95th: 12_588 - // 75th: 11_200 - read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, + parameter_types! { + /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights + /// are available for brave runtime engineers who may want to try this out as default. + pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 4_611, 13_478_005 + // Average: 10_750 + // Median: 10_655 + // Std-Dev: 12214.49 + // + // Percentiles [NS]: + // 99th: 14_451 + // 95th: 12_588 + // 75th: 11_200 + read: 11_826 * constants::WEIGHT_REF_TIME_PER_NANOS, - // Time to write one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 8_023, 47_367_740 - // Average: 34_592 - // Median: 32_703 - // Std-Dev: 49417.24 - // - // Percentiles [NS]: - // 99th: 69_379 - // 95th: 47_168 - // 75th: 35_252 - write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 8_023, 47_367_740 + // Average: 34_592 + // Median: 32_703 + // Std-Dev: 49417.24 + // + // Percentiles [NS]: + // 99th: 69_379 + // 95th: 47_168 + // 75th: 35_252 + write: 38_052 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } - #[cfg(test)] - mod test_db_weights { - use super::constants::ParityDbWeight as W; - use frame_support::weights::constants; + #[cfg(test)] + mod test_db_weights { + use super::constants::ParityDbWeight as W; + use frame_support::weights::constants; - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn bound() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } } diff --git a/relay/paseo/constants/src/weights/rocksdb_weights.rs b/relay/paseo/constants/src/weights/rocksdb_weights.rs index c5cf045..4c03f1e 100644 --- a/relay/paseo/constants/src/weights/rocksdb_weights.rs +++ b/relay/paseo/constants/src/weights/rocksdb_weights.rs @@ -18,7 +18,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-03-29 (Y/M/D) //! -//! DATABASE: `RocksDb`, RUNTIME: `Polkadot` +//! DATABASE: `RocksDb`, RUNTIME: `Paseo` //! BLOCK-NUM: `BlockId::Number(9643856)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` //! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0` @@ -32,77 +32,77 @@ // --mul=1.1 // --weight-path=runtime/polkadot/constants/src/weights/ -/// Storage DB weights for the `Polkadot` runtime and `RocksDb`. +/// Storage DB weights for the `Paseo` runtime and `RocksDb`. pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; - parameter_types! { - /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout - /// the runtime. - pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - // Time to read one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 5_015, 1_441_022 - // Average: 18_635 - // Median: 17_795 - // Std-Dev: 4829.75 - // - // Percentiles [NS]: - // 99th: 32_074 - // 95th: 26_658 - // 75th: 19_363 - read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, + parameter_types! { + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the runtime. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + // Time to read one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 5_015, 1_441_022 + // Average: 18_635 + // Median: 17_795 + // Std-Dev: 4829.75 + // + // Percentiles [NS]: + // 99th: 32_074 + // 95th: 26_658 + // 75th: 19_363 + read: 20_499 * constants::WEIGHT_REF_TIME_PER_NANOS, - // Time to write one storage item. - // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. - // - // Stats [NS]: - // Min, Max: 16_368, 34_500_937 - // Average: 75_882 - // Median: 74_236 - // Std-Dev: 64706.41 - // - // Percentiles [NS]: - // 99th: 111_151 - // 95th: 92_666 - // 75th: 80_297 - write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } + // Time to write one storage item. + // Calculated by multiplying the *Average* of all values with `1.1` and adding `0`. + // + // Stats [NS]: + // Min, Max: 16_368, 34_500_937 + // Average: 75_882 + // Median: 74_236 + // Std-Dev: 64706.41 + // + // Percentiles [NS]: + // 99th: 111_151 + // 95th: 92_666 + // 75th: 80_297 + write: 83_471 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } - #[cfg(test)] - mod test_db_weights { - use super::constants::RocksDbWeight as W; - use frame_support::weights::constants; + #[cfg(test)] + mod test_db_weights { + use super::constants::RocksDbWeight as W; + use frame_support::weights::constants; - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn bound() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } } diff --git a/relay/paseo/src/bag_thresholds.rs b/relay/paseo/src/bag_thresholds.rs index 56c764f..651623b 100644 --- a/relay/paseo/src/bag_thresholds.rs +++ b/relay/paseo/src/bag_thresholds.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated bag thresholds. //! @@ -31,204 +31,204 @@ pub const CONSTANT_RATIO: f64 = 1.1131723507077667; /// Upper thresholds delimiting the bag list. pub const THRESHOLDS: [u64; 200] = [ - 10_000_000_000, - 11_131_723_507, - 12_391_526_824, - 13_793_905_044, - 15_354_993_703, - 17_092_754_435, - 19_027_181_634, - 21_180_532_507, - 23_577_583_160, - 26_245_913_670, - 29_216_225_417, - 32_522_694_326, - 36_203_364_094, - 40_300_583_912, - 44_861_495_728, - 49_938_576_656, - 55_590_242_767, - 61_881_521_217, - 68_884_798_439, - 76_680_653_006, - 85_358_782_760, - 95_019_036_859, - 105_772_564_622, - 117_743_094_401, - 131_068_357_174, - 145_901_671_259, - 162_413_706_368, - 180_794_447_305, - 201_255_379_901, - 224_031_924_337, - 249_386_143_848, - 277_609_759_981, - 309_027_509_097, - 344_000_878_735, - 382_932_266_827, - 426_269_611_626, - 474_511_545_609, - 528_213_132_664, - 587_992_254_562, - 654_536_720_209, - 728_612_179_460, - 811_070_932_564, - 902_861_736_593, - 1_005_040_721_687, - 1_118_783_542_717, - 1_245_398_906_179, - 1_386_343_627_960, - 1_543_239_395_225, - 1_717_891_425_287, - 1_912_309_236_147, - 2_128_729_767_682, - 2_369_643_119_512, - 2_637_821_201_686, - 2_936_349_627_828, - 3_268_663_217_709, - 3_638_585_517_729, - 4_050_372_794_022, - 4_508_763_004_364, - 5_019_030_312_352, - 5_587_045_771_074, - 6_219_344_874_498, - 6_923_202_753_807, - 7_706_717_883_882, - 8_578_905_263_043, - 9_549_800_138_161, - 10_630_573_468_586, - 11_833_660_457_397, - 13_172_903_628_838, - 14_663_712_098_160, - 16_323_238_866_411, - 18_170_578_180_087, - 20_226_985_226_447, - 22_516_120_692_255, - 25_064_322_999_817, - 27_900_911_352_605, - 31_058_523_077_268, - 34_573_489_143_434, - 38_486_252_181_966, - 42_841_831_811_331, - 47_690_342_626_046, - 53_087_570_807_094, - 59_095_615_988_698, - 65_783_605_766_662, - 73_228_491_069_308, - 81_515_931_542_404, - 90_741_281_135_191, - 101_010_685_227_495, - 112_442_301_921_293, - 125_167_661_548_718, - 139_333_180_038_781, - 155_101_843_555_358, - 172_655_083_789_626, - 192_194_865_483_744, - 213_946_010_204_502, - 238_158_783_103_893, - 265_111_772_429_462, - 295_115_094_915_607, - 328_513_963_936_552, - 365_692_661_475_578, - 407_078_959_611_349, - 453_149_042_394_237, - 504_432_984_742_966, - 561_520_851_400_862, - 625_069_486_125_324, - 695_810_069_225_823, - 774_556_530_406_243, - 862_214_913_708_369, - 959_793_802_308_039, - 1_068_415_923_109_985, - 1_189_331_064_661_951, - 1_323_930_457_019_515, - 1_473_762_779_014_021, - 1_640_551_977_100_649, - 1_826_217_100_807_404, - 2_032_894_383_008_501, - 2_262_961_819_074_188, - 2_519_066_527_700_738, - 2_804_155_208_229_882, - 3_121_508_044_894_685, - 3_474_776_448_088_622, - 3_868_025_066_902_796, - 4_305_778_556_320_752, - 4_793_073_637_166_665, - 5_335_517_047_800_242, - 5_939_350_054_341_159, - 6_611_520_261_667_250, - 7_359_761_551_432_161, - 8_192_683_066_856_378, - 9_119_868_268_136_230, - 10_151_985_198_186_376, - 11_300_909_227_415_580, - 12_579_859_689_817_292, - 14_003_551_982_487_792, - 15_588_366_878_604_342, - 17_352_539_001_951_086, - 19_316_366_631_550_092, - 21_502_445_250_375_680, - 23_935_927_525_325_748, - 26_644_812_709_737_600, - 29_660_268_798_266_784, - 33_016_991_140_790_860, - 36_753_601_641_491_664, - 40_913_093_136_236_104, - 45_543_324_061_189_736, - 50_697_569_104_240_168, - 56_435_132_174_936_472, - 62_822_028_745_677_552, - 69_931_745_415_056_768, - 77_846_085_432_775_824, - 86_656_109_914_600_688, - 96_463_185_576_826_656, - 107_380_151_045_315_664, - 119_532_615_158_469_088, - 133_060_402_202_199_856, - 148_119_160_705_543_712, - 164_882_154_307_451_552, - 183_542_255_300_186_560, - 204_314_163_786_713_728, - 227_436_877_985_347_776, - 253_176_444_104_585_088, - 281_829_017_427_734_464, - 313_724_269_827_691_328, - 349_229_182_918_168_832, - 388_752_270_484_770_624, - 432_748_278_778_513_664, - 481_723_418_752_617_984, - 536_241_190_443_833_600, - 596_928_866_512_693_376, - 664_484_709_541_257_600, - 739_686_006_129_409_280, - 823_398_010_228_713_984, - 916_583_898_614_395_264, - 1_020_315_853_041_475_584, - 1_135_787_396_594_579_584, - 1_264_327_126_171_442_688, - 1_407_413_999_103_859_968, - 1_566_694_349_801_462_272, - 1_744_000_832_209_069_824, - 1_941_373_506_026_471_680, - 2_161_083_309_305_266_176, - 2_405_658_187_494_662_656, - 2_677_912_179_572_818_944, - 2_980_977_795_924_034_048, - 3_318_342_060_496_414_208, - 3_693_886_631_935_247_360, - 4_111_932_465_319_354_368, - 4_577_289_528_371_127_808, - 5_095_312_144_166_932_480, - 5_671_960_597_112_134_656, - 6_313_869_711_009_142_784, - 7_028_425_188_266_614_784, - 7_823_848_588_596_424_704, - 8_709_291_924_949_524_480, - 9_694_942_965_096_232_960, - 10_792_142_450_433_898_496, - 12_013_514_580_722_579_456, - 13_373_112_266_084_982_784, - 14_886_578_817_516_689_408, - 16_571_327_936_291_497_984, - 18_446_744_073_709_551_615, + 10_000_000_000, + 11_131_723_507, + 12_391_526_824, + 13_793_905_044, + 15_354_993_703, + 17_092_754_435, + 19_027_181_634, + 21_180_532_507, + 23_577_583_160, + 26_245_913_670, + 29_216_225_417, + 32_522_694_326, + 36_203_364_094, + 40_300_583_912, + 44_861_495_728, + 49_938_576_656, + 55_590_242_767, + 61_881_521_217, + 68_884_798_439, + 76_680_653_006, + 85_358_782_760, + 95_019_036_859, + 105_772_564_622, + 117_743_094_401, + 131_068_357_174, + 145_901_671_259, + 162_413_706_368, + 180_794_447_305, + 201_255_379_901, + 224_031_924_337, + 249_386_143_848, + 277_609_759_981, + 309_027_509_097, + 344_000_878_735, + 382_932_266_827, + 426_269_611_626, + 474_511_545_609, + 528_213_132_664, + 587_992_254_562, + 654_536_720_209, + 728_612_179_460, + 811_070_932_564, + 902_861_736_593, + 1_005_040_721_687, + 1_118_783_542_717, + 1_245_398_906_179, + 1_386_343_627_960, + 1_543_239_395_225, + 1_717_891_425_287, + 1_912_309_236_147, + 2_128_729_767_682, + 2_369_643_119_512, + 2_637_821_201_686, + 2_936_349_627_828, + 3_268_663_217_709, + 3_638_585_517_729, + 4_050_372_794_022, + 4_508_763_004_364, + 5_019_030_312_352, + 5_587_045_771_074, + 6_219_344_874_498, + 6_923_202_753_807, + 7_706_717_883_882, + 8_578_905_263_043, + 9_549_800_138_161, + 10_630_573_468_586, + 11_833_660_457_397, + 13_172_903_628_838, + 14_663_712_098_160, + 16_323_238_866_411, + 18_170_578_180_087, + 20_226_985_226_447, + 22_516_120_692_255, + 25_064_322_999_817, + 27_900_911_352_605, + 31_058_523_077_268, + 34_573_489_143_434, + 38_486_252_181_966, + 42_841_831_811_331, + 47_690_342_626_046, + 53_087_570_807_094, + 59_095_615_988_698, + 65_783_605_766_662, + 73_228_491_069_308, + 81_515_931_542_404, + 90_741_281_135_191, + 101_010_685_227_495, + 112_442_301_921_293, + 125_167_661_548_718, + 139_333_180_038_781, + 155_101_843_555_358, + 172_655_083_789_626, + 192_194_865_483_744, + 213_946_010_204_502, + 238_158_783_103_893, + 265_111_772_429_462, + 295_115_094_915_607, + 328_513_963_936_552, + 365_692_661_475_578, + 407_078_959_611_349, + 453_149_042_394_237, + 504_432_984_742_966, + 561_520_851_400_862, + 625_069_486_125_324, + 695_810_069_225_823, + 774_556_530_406_243, + 862_214_913_708_369, + 959_793_802_308_039, + 1_068_415_923_109_985, + 1_189_331_064_661_951, + 1_323_930_457_019_515, + 1_473_762_779_014_021, + 1_640_551_977_100_649, + 1_826_217_100_807_404, + 2_032_894_383_008_501, + 2_262_961_819_074_188, + 2_519_066_527_700_738, + 2_804_155_208_229_882, + 3_121_508_044_894_685, + 3_474_776_448_088_622, + 3_868_025_066_902_796, + 4_305_778_556_320_752, + 4_793_073_637_166_665, + 5_335_517_047_800_242, + 5_939_350_054_341_159, + 6_611_520_261_667_250, + 7_359_761_551_432_161, + 8_192_683_066_856_378, + 9_119_868_268_136_230, + 10_151_985_198_186_376, + 11_300_909_227_415_580, + 12_579_859_689_817_292, + 14_003_551_982_487_792, + 15_588_366_878_604_342, + 17_352_539_001_951_086, + 19_316_366_631_550_092, + 21_502_445_250_375_680, + 23_935_927_525_325_748, + 26_644_812_709_737_600, + 29_660_268_798_266_784, + 33_016_991_140_790_860, + 36_753_601_641_491_664, + 40_913_093_136_236_104, + 45_543_324_061_189_736, + 50_697_569_104_240_168, + 56_435_132_174_936_472, + 62_822_028_745_677_552, + 69_931_745_415_056_768, + 77_846_085_432_775_824, + 86_656_109_914_600_688, + 96_463_185_576_826_656, + 107_380_151_045_315_664, + 119_532_615_158_469_088, + 133_060_402_202_199_856, + 148_119_160_705_543_712, + 164_882_154_307_451_552, + 183_542_255_300_186_560, + 204_314_163_786_713_728, + 227_436_877_985_347_776, + 253_176_444_104_585_088, + 281_829_017_427_734_464, + 313_724_269_827_691_328, + 349_229_182_918_168_832, + 388_752_270_484_770_624, + 432_748_278_778_513_664, + 481_723_418_752_617_984, + 536_241_190_443_833_600, + 596_928_866_512_693_376, + 664_484_709_541_257_600, + 739_686_006_129_409_280, + 823_398_010_228_713_984, + 916_583_898_614_395_264, + 1_020_315_853_041_475_584, + 1_135_787_396_594_579_584, + 1_264_327_126_171_442_688, + 1_407_413_999_103_859_968, + 1_566_694_349_801_462_272, + 1_744_000_832_209_069_824, + 1_941_373_506_026_471_680, + 2_161_083_309_305_266_176, + 2_405_658_187_494_662_656, + 2_677_912_179_572_818_944, + 2_980_977_795_924_034_048, + 3_318_342_060_496_414_208, + 3_693_886_631_935_247_360, + 4_111_932_465_319_354_368, + 4_577_289_528_371_127_808, + 5_095_312_144_166_932_480, + 5_671_960_597_112_134_656, + 6_313_869_711_009_142_784, + 7_028_425_188_266_614_784, + 7_823_848_588_596_424_704, + 8_709_291_924_949_524_480, + 9_694_942_965_096_232_960, + 10_792_142_450_433_898_496, + 12_013_514_580_722_579_456, + 13_373_112_266_084_982_784, + 14_886_578_817_516_689_408, + 16_571_327_936_291_497_984, + 18_446_744_073_709_551_615, ]; diff --git a/relay/paseo/src/governance/mod.rs b/relay/paseo/src/governance/mod.rs index 39a7188..bcea354 100644 --- a/relay/paseo/src/governance/mod.rs +++ b/relay/paseo/src/governance/mod.rs @@ -1,20 +1,20 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . -//! New governance configurations for the Polkadot runtime. +//! New governance configurations for the Paseo runtime. use super::*; use crate::xcm_config::CollectivesLocation; @@ -25,73 +25,73 @@ use xcm::latest::BodyId; mod origins; pub use origins::{ - pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, - ReferendumCanceller, ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller, + pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, + ReferendumCanceller, ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller, }; mod tracks; pub use tracks::TracksInfo; parameter_types! { - pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1); + pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1); } impl pallet_conviction_voting::Config for Runtime { - type WeightInfo = weights::pallet_conviction_voting::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type VoteLockingPeriod = VoteLockingPeriod; - type MaxVotes = ConstU32<512>; - type MaxTurnout = - frame_support::traits::tokens::currency::ActiveIssuanceOf; - type Polls = Referenda; + type WeightInfo = weights::pallet_conviction_voting::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type VoteLockingPeriod = VoteLockingPeriod; + type MaxVotes = ConstU32<512>; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; + type Polls = Referenda; } parameter_types! { - pub const AlarmInterval: BlockNumber = 1; - pub const SubmissionDeposit: Balance = 1 * DOLLARS; - pub const UndecidingTimeout: BlockNumber = 14 * DAYS; + pub const AlarmInterval: BlockNumber = 1; + pub const SubmissionDeposit: Balance = 1 * DOLLARS; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; } parameter_types! { - pub const MaxBalance: Balance = Balance::max_value(); + pub const MaxBalance: Balance = Balance::max_value(); } pub type TreasurySpender = EitherOf, Spender>; impl origins::pallet_custom_origins::Config for Runtime {} parameter_types! { - // Fellows pluralistic body. - pub const FellowsBodyId: BodyId = BodyId::Technical; + // Fellows pluralistic body. + pub const FellowsBodyId: BodyId = BodyId::Technical; } impl pallet_whitelist::Config for Runtime { - type WeightInfo = weights::pallet_whitelist::WeightInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type WhitelistOrigin = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, - >; - type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; - type Preimages = Preimage; + type WeightInfo = weights::pallet_whitelist::WeightInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WhitelistOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type Preimages = Preimage; } impl pallet_referenda::Config for Runtime { - type WeightInfo = weights::pallet_referenda::WeightInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type Scheduler = Scheduler; - type Currency = Balances; - type SubmitOrigin = frame_system::EnsureSigned; - type CancelOrigin = EitherOf, ReferendumCanceller>; - type KillOrigin = EitherOf, ReferendumKiller>; - type Slash = Treasury; - type Votes = pallet_conviction_voting::VotesOf; - type Tally = pallet_conviction_voting::TallyOf; - type SubmissionDeposit = SubmissionDeposit; - type MaxQueued = ConstU32<100>; - type UndecidingTimeout = UndecidingTimeout; - type AlarmInterval = AlarmInterval; - type Tracks = TracksInfo; - type Preimages = Preimage; + type WeightInfo = weights::pallet_referenda::WeightInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Currency = Balances; + type SubmitOrigin = frame_system::EnsureSigned; + type CancelOrigin = EitherOf, ReferendumCanceller>; + type KillOrigin = EitherOf, ReferendumKiller>; + type Slash = Treasury; + type Votes = pallet_conviction_voting::VotesOf; + type Tally = pallet_conviction_voting::TallyOf; + type SubmissionDeposit = SubmissionDeposit; + type MaxQueued = ConstU32<100>; + type UndecidingTimeout = UndecidingTimeout; + type AlarmInterval = AlarmInterval; + type Tracks = TracksInfo; + type Preimages = Preimage; } diff --git a/relay/paseo/src/governance/old.rs b/relay/paseo/src/governance/old.rs index f4c2655..85390b1 100644 --- a/relay/paseo/src/governance/old.rs +++ b/relay/paseo/src/governance/old.rs @@ -1,190 +1,190 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . -//! Old governance configurations for the Polkadot runtime. +//! Old governance configurations for the Paseo runtime. use crate::*; use frame_support::{parameter_types, traits::EitherOfDiverse}; parameter_types! { - pub LaunchPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_LAUNCH_PERIOD"); - pub VotingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1 * MINUTES, "DOT_VOTING_PERIOD"); - pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 1 * MINUTES, "DOT_FAST_TRACK_VOTING_PERIOD"); - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub EnactmentPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_ENACTMENT_PERIOD"); - pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "DOT_COOLOFF_PERIOD"); - pub const InstantAllowed: bool = true; - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; + pub LaunchPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_LAUNCH_PERIOD"); + pub VotingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1 * MINUTES, "DOT_VOTING_PERIOD"); + pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 1 * MINUTES, "DOT_FAST_TRACK_VOTING_PERIOD"); + pub const MinimumDeposit: Balance = 100 * DOLLARS; + pub EnactmentPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_ENACTMENT_PERIOD"); + pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "DOT_COOLOFF_PERIOD"); + pub const InstantAllowed: bool = true; + pub const MaxVotes: u32 = 100; + pub const MaxProposals: u32 = 100; } impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type VoteLockingPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - type SubmitOrigin = frame_system::EnsureSigned; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type EnactmentPeriod = EnactmentPeriod; + type VoteLockingPeriod = EnactmentPeriod; + type LaunchPeriod = LaunchPeriod; + type VotingPeriod = VotingPeriod; + type MinimumDeposit = MinimumDeposit; + type SubmitOrigin = frame_system::EnsureSigned; + /// A straight majority of the council can decide what their next motion is. + type ExternalOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. + type ExternalMajorityOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// A unanimous council can have the next scheduled referendum be a straight default-carries + /// (NTB) vote. + type ExternalDefaultOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote + /// be tabled immediately and with a shorter voting/enactment period. + type FastTrackOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + type InstantOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + frame_system::EnsureRoot, + >; + type InstantAllowed = InstantAllowed; + type FastTrackVotingPeriod = FastTrackVotingPeriod; + // To cancel a proposal which has been passed, 2/3 of the council must agree to it. + type CancellationOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + EnsureRoot, + >; + // To cancel a proposal before it has been passed, the technical committee must be unanimous or + // Root must agree. + type CancelProposalOrigin = EitherOfDiverse< + pallet_collective::EnsureProportionAtLeast, + EnsureRoot, + >; + type BlacklistOrigin = EnsureRoot; + // Any single technical committee member may veto a coming council proposal, however they can + // only do it once and it lasts only for the cooloff period. + type VetoOrigin = pallet_collective::EnsureMember; + type CooloffPeriod = CooloffPeriod; + type Slash = Treasury; + type Scheduler = Scheduler; + type PalletsOrigin = OriginCaller; + type MaxVotes = MaxVotes; + type WeightInfo = weights::pallet_democracy::WeightInfo; + type MaxProposals = MaxProposals; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { - pub CouncilMotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_MOTION_DURATION"); - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; - pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; + pub CouncilMotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_MOTION_DURATION"); + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; } pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_council::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type SetMembersOrigin = EnsureRoot; + type WeightInfo = weights::pallet_collective_council::WeightInfo; + type MaxProposalWeight = MaxProposalWeight; } parameter_types! { - pub const CandidacyBond: Balance = 100 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = deposit(1, 64); - // additional data per vote is 32 bytes (account id). - pub const VotingBondFactor: Balance = deposit(0, 32); - /// Weekly council elections; scaling up to monthly eventually. - pub TermDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_TERM_DURATION"); - /// 13 members initially, to be increased to 23 eventually. - pub const DesiredMembers: u32 = 13; - pub const DesiredRunnersUp: u32 = 20; - pub const MaxVoters: u32 = 10 * 1000; - pub const MaxVotesPerVoter: u32 = 16; - pub const MaxCandidates: u32 = 1000; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; + pub const CandidacyBond: Balance = 100 * DOLLARS; + // 1 storage item created, key size is 32 bytes, value size is 16+16. + pub const VotingBondBase: Balance = deposit(1, 64); + // additional data per vote is 32 bytes (account id). + pub const VotingBondFactor: Balance = deposit(0, 32); + /// Weekly council elections; scaling up to monthly eventually. + pub TermDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_TERM_DURATION"); + /// 13 members initially, to be increased to 23 eventually. + pub const DesiredMembers: u32 = 13; + pub const DesiredRunnersUp: u32 = 20; + pub const MaxVoters: u32 = 10 * 1000; + pub const MaxVotesPerVoter: u32 = 16; + pub const MaxCandidates: u32 = 1000; + pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; } // Make sure that there are no more than `MaxMembers` members elected via phragmen. const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = PhragmenElectionPalletId; - type Currency = Balances; - type ChangeMembers = Council; - type InitializeMembers = Council; - type CurrencyToVote = runtime_common::CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type MaxVoters = MaxVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type MaxCandidates = MaxCandidates; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type PalletId = PhragmenElectionPalletId; + type Currency = Balances; + type ChangeMembers = Council; + type InitializeMembers = Council; + type CurrencyToVote = runtime_common::CurrencyToVote; + type CandidacyBond = CandidacyBond; + type VotingBondBase = VotingBondBase; + type VotingBondFactor = VotingBondFactor; + type LoserCandidate = Treasury; + type KickedMember = Treasury; + type DesiredMembers = DesiredMembers; + type DesiredRunnersUp = DesiredRunnersUp; + type TermDuration = TermDuration; + type MaxVoters = MaxVoters; + type MaxVotesPerVoter = MaxVotesPerVoter; + type MaxCandidates = MaxCandidates; + type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; } parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; + pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; } pub type TechnicalCollective = pallet_collective::Instance2; 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 = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type SetMembersOrigin = EnsureRoot; + type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo; + type MaxProposalWeight = MaxProposalWeight; } impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRoot; - type RemoveOrigin = EnsureRoot; - type SwapOrigin = EnsureRoot; - type ResetOrigin = EnsureRoot; - type PrimeOrigin = EnsureRoot; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = TechnicalMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type AddOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type SwapOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type PrimeOrigin = EnsureRoot; + type MembershipInitialized = TechnicalCommittee; + type MembershipChanged = TechnicalCommittee; + type MaxMembers = TechnicalMaxMembers; + type WeightInfo = weights::pallet_membership::WeightInfo; } diff --git a/relay/paseo/src/governance/origins.rs b/relay/paseo/src/governance/origins.rs index 551e05e..44a3f43 100644 --- a/relay/paseo/src/governance/origins.rs +++ b/relay/paseo/src/governance/origins.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Custom origins for governance interventions. @@ -20,50 +20,50 @@ pub use pallet_custom_origins::*; #[frame_support::pallet] pub mod pallet_custom_origins { - use crate::{Balance, DOLLARS, GRAND}; - use frame_support::pallet_prelude::*; + use crate::{Balance, DOLLARS, GRAND}; + use frame_support::pallet_prelude::*; - #[pallet::config] - pub trait Config: frame_system::Config {} + #[pallet::config] + pub trait Config: frame_system::Config {} - #[pallet::pallet] - pub struct Pallet(_); + #[pallet::pallet] + pub struct Pallet(_); - #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] - #[pallet::origin] - pub enum Origin { - /// Origin able to cancel slashes and manage minimum commission. - StakingAdmin, - /// Origin for spending up to $10,000,000 DOT from the treasury as well as generally - /// administering it. - Treasurer, - /// Origin for managing the composition of the fellowship. - FellowshipAdmin, - /// Origin for managing the registrar and permissioned HRMP channel operations. - GeneralAdmin, - /// Origin for starting auctions. - AuctionAdmin, - /// Origin able to force slot leases. - LeaseAdmin, - /// Origin able to cancel referenda. - ReferendumCanceller, - /// Origin able to kill referenda. - ReferendumKiller, - /// Origin able to spend around $250 from the treasury at once. - SmallTipper, - /// Origin able to spend around $1,000 from the treasury at once. - BigTipper, - /// Origin able to spend around $10,000 from the treasury at once. - SmallSpender, - /// Origin able to spend around $100,000 from the treasury at once. - MediumSpender, - /// Origin able to spend up to $1,000,000 DOT from the treasury at once. - BigSpender, - /// Origin able to dispatch a whitelisted call. - WhitelistedCaller, - } + #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] + #[pallet::origin] + pub enum Origin { + /// Origin able to cancel slashes and manage minimum commission. + StakingAdmin, + /// Origin for spending up to $10,000,000 PAS from the treasury as well as generally + /// administering it. + Treasurer, + /// Origin for managing the composition of the fellowship. + FellowshipAdmin, + /// Origin for managing the registrar and permissioned HRMP channel operations. + GeneralAdmin, + /// Origin for starting auctions. + AuctionAdmin, + /// Origin able to force slot leases. + LeaseAdmin, + /// Origin able to cancel referenda. + ReferendumCanceller, + /// Origin able to kill referenda. + ReferendumKiller, + /// Origin able to spend around $250 from the treasury at once. + SmallTipper, + /// Origin able to spend around $1,000 from the treasury at once. + BigTipper, + /// Origin able to spend around $10,000 from the treasury at once. + SmallSpender, + /// Origin able to spend around $100,000 from the treasury at once. + MediumSpender, + /// Origin able to spend up to $1,000,000 PAS from the treasury at once. + BigSpender, + /// Origin able to dispatch a whitelisted call. + WhitelistedCaller, + } - macro_rules! decl_unit_ensures { + macro_rules! decl_unit_ensures { ( $name:ident: $success_type:ty = $success:expr ) => { pub struct $name; impl> + From> @@ -93,19 +93,19 @@ pub mod pallet_custom_origins { }; () => {} } - decl_unit_ensures!( - StakingAdmin, - Treasurer, - FellowshipAdmin, - GeneralAdmin, - AuctionAdmin, - LeaseAdmin, - ReferendumCanceller, - ReferendumKiller, - WhitelistedCaller, - ); + decl_unit_ensures!( + StakingAdmin, + Treasurer, + FellowshipAdmin, + GeneralAdmin, + AuctionAdmin, + LeaseAdmin, + ReferendumCanceller, + ReferendumKiller, + WhitelistedCaller, + ); - macro_rules! decl_ensure { + macro_rules! decl_ensure { ( $vis:vis type $name:ident: EnsureOrigin { $( $item:ident = $success:expr, )* @@ -138,14 +138,14 @@ pub mod pallet_custom_origins { } } - decl_ensure! { - pub type Spender: EnsureOrigin { - SmallTipper = 250 * DOLLARS, - BigTipper = 1 * GRAND, - SmallSpender = 10 * GRAND, - MediumSpender = 100 * GRAND, - BigSpender = 1_000 * GRAND, - Treasurer = 10_000 * GRAND, - } - } + decl_ensure! { + pub type Spender: EnsureOrigin { + SmallTipper = 250 * DOLLARS, + BigTipper = 1 * GRAND, + SmallSpender = 10 * GRAND, + MediumSpender = 100 * GRAND, + BigSpender = 1_000 * GRAND, + Treasurer = 10_000 * GRAND, + } + } } diff --git a/relay/paseo/src/governance/tracks.rs b/relay/paseo/src/governance/tracks.rs index 6d9f62c..5eb9f41 100644 --- a/relay/paseo/src/governance/tracks.rs +++ b/relay/paseo/src/governance/tracks.rs @@ -1,319 +1,319 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Track configurations for governance. use super::*; const fn percent(x: i32) -> sp_arithmetic::FixedI64 { - sp_arithmetic::FixedI64::from_rational(x as u128, 100) + sp_arithmetic::FixedI64::from_rational(x as u128, 100) } use pallet_referenda::Curve; const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_STAKING_ADMIN: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_FELLOWSHIP_ADMIN: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_GENERAL_ADMIN: Curve = - Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_GENERAL_ADMIN: Curve = - Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); const APP_AUCTION_ADMIN: Curve = - Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); const SUP_AUCTION_ADMIN: Curve = - Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); const APP_LEASE_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_LEASE_ADMIN: Curve = Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_REFERENDUM_CANCELLER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_REFERENDUM_KILLER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50)); const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50)); const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); const SUP_SMALL_SPENDER: Curve = - Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100)); const SUP_MEDIUM_SPENDER: Curve = - Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); + Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100)); const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50)); const APP_WHITELISTED_CALLER: Curve = - Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); const SUP_WHITELISTED_CALLER: Curve = - Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); + Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 15] = [ - ( - 0, - pallet_referenda::TrackInfo { - name: "root", - max_deciding: 1, - decision_deposit: 100 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 24 * HOURS, - min_enactment_period: 24 * HOURS, - min_approval: APP_ROOT, - min_support: SUP_ROOT, - }, - ), - ( - 1, - pallet_referenda::TrackInfo { - name: "whitelisted_caller", - max_deciding: 100, - decision_deposit: 10 * GRAND, - prepare_period: 30 * MINUTES, - decision_period: 28 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 10 * MINUTES, - min_approval: APP_WHITELISTED_CALLER, - min_support: SUP_WHITELISTED_CALLER, - }, - ), - ( - 10, - pallet_referenda::TrackInfo { - name: "staking_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_STAKING_ADMIN, - min_support: SUP_STAKING_ADMIN, - }, - ), - ( - 11, - pallet_referenda::TrackInfo { - name: "treasurer", - max_deciding: 10, - decision_deposit: 1 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 7 * DAYS, - min_enactment_period: 24 * HOURS, - min_approval: APP_TREASURER, - min_support: SUP_TREASURER, - }, - ), - ( - 12, - pallet_referenda::TrackInfo { - name: "lease_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_LEASE_ADMIN, - min_support: SUP_LEASE_ADMIN, - }, - ), - ( - 13, - pallet_referenda::TrackInfo { - name: "fellowship_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_FELLOWSHIP_ADMIN, - min_support: SUP_FELLOWSHIP_ADMIN, - }, - ), - ( - 14, - pallet_referenda::TrackInfo { - name: "general_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_GENERAL_ADMIN, - min_support: SUP_GENERAL_ADMIN, - }, - ), - ( - 15, - pallet_referenda::TrackInfo { - name: "auction_admin", - max_deciding: 10, - decision_deposit: 5 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_AUCTION_ADMIN, - min_support: SUP_AUCTION_ADMIN, - }, - ), - ( - 20, - pallet_referenda::TrackInfo { - name: "referendum_canceller", - max_deciding: 1_000, - decision_deposit: 10 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 7 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_REFERENDUM_CANCELLER, - min_support: SUP_REFERENDUM_CANCELLER, - }, - ), - ( - 21, - pallet_referenda::TrackInfo { - name: "referendum_killer", - max_deciding: 1_000, - decision_deposit: 50 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_REFERENDUM_KILLER, - min_support: SUP_REFERENDUM_KILLER, - }, - ), - ( - 30, - pallet_referenda::TrackInfo { - name: "small_tipper", - max_deciding: 200, - decision_deposit: 1 * DOLLARS, - prepare_period: 1 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 1 * MINUTES, - min_approval: APP_SMALL_TIPPER, - min_support: SUP_SMALL_TIPPER, - }, - ), - ( - 31, - pallet_referenda::TrackInfo { - name: "big_tipper", - max_deciding: 100, - decision_deposit: 10 * DOLLARS, - prepare_period: 10 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 1 * HOURS, - min_enactment_period: 10 * MINUTES, - min_approval: APP_BIG_TIPPER, - min_support: SUP_BIG_TIPPER, - }, - ), - ( - 32, - pallet_referenda::TrackInfo { - name: "small_spender", - max_deciding: 50, - decision_deposit: 100 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 2 * DAYS, - min_enactment_period: 24 * HOURS, - min_approval: APP_SMALL_SPENDER, - min_support: SUP_SMALL_SPENDER, - }, - ), - ( - 33, - pallet_referenda::TrackInfo { - name: "medium_spender", - max_deciding: 50, - decision_deposit: 200 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 4 * DAYS, - min_enactment_period: 24 * HOURS, - min_approval: APP_MEDIUM_SPENDER, - min_support: SUP_MEDIUM_SPENDER, - }, - ), - ( - 34, - pallet_referenda::TrackInfo { - name: "big_spender", - max_deciding: 50, - decision_deposit: 400 * DOLLARS, - prepare_period: 4 * HOURS, - decision_period: 28 * DAYS, - confirm_period: 7 * DAYS, - min_enactment_period: 24 * HOURS, - min_approval: APP_BIG_SPENDER, - min_support: SUP_BIG_SPENDER, - }, - ), + ( + 0, + pallet_referenda::TrackInfo { + name: "root", + max_deciding: 1, + decision_deposit: 100 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_ROOT, + min_support: SUP_ROOT, + }, + ), + ( + 1, + pallet_referenda::TrackInfo { + name: "whitelisted_caller", + max_deciding: 100, + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, + decision_period: 28 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, + min_approval: APP_WHITELISTED_CALLER, + min_support: SUP_WHITELISTED_CALLER, + }, + ), + ( + 10, + pallet_referenda::TrackInfo { + name: "staking_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_STAKING_ADMIN, + min_support: SUP_STAKING_ADMIN, + }, + ), + ( + 11, + pallet_referenda::TrackInfo { + name: "treasurer", + max_deciding: 10, + decision_deposit: 1 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_TREASURER, + min_support: SUP_TREASURER, + }, + ), + ( + 12, + pallet_referenda::TrackInfo { + name: "lease_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_LEASE_ADMIN, + min_support: SUP_LEASE_ADMIN, + }, + ), + ( + 13, + pallet_referenda::TrackInfo { + name: "fellowship_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_FELLOWSHIP_ADMIN, + min_support: SUP_FELLOWSHIP_ADMIN, + }, + ), + ( + 14, + pallet_referenda::TrackInfo { + name: "general_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_GENERAL_ADMIN, + min_support: SUP_GENERAL_ADMIN, + }, + ), + ( + 15, + pallet_referenda::TrackInfo { + name: "auction_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_AUCTION_ADMIN, + min_support: SUP_AUCTION_ADMIN, + }, + ), + ( + 20, + pallet_referenda::TrackInfo { + name: "referendum_canceller", + max_deciding: 1_000, + decision_deposit: 10 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_CANCELLER, + min_support: SUP_REFERENDUM_CANCELLER, + }, + ), + ( + 21, + pallet_referenda::TrackInfo { + name: "referendum_killer", + max_deciding: 1_000, + decision_deposit: 50 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_KILLER, + min_support: SUP_REFERENDUM_KILLER, + }, + ), + ( + 30, + pallet_referenda::TrackInfo { + name: "small_tipper", + max_deciding: 200, + decision_deposit: 1 * DOLLARS, + prepare_period: 1 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 1 * MINUTES, + min_approval: APP_SMALL_TIPPER, + min_support: SUP_SMALL_TIPPER, + }, + ), + ( + 31, + pallet_referenda::TrackInfo { + name: "big_tipper", + max_deciding: 100, + decision_deposit: 10 * DOLLARS, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_BIG_TIPPER, + min_support: SUP_BIG_TIPPER, + }, + ), + ( + 32, + pallet_referenda::TrackInfo { + name: "small_spender", + max_deciding: 50, + decision_deposit: 100 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 12 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_SMALL_SPENDER, + min_support: SUP_SMALL_SPENDER, + }, + ), + ( + 33, + pallet_referenda::TrackInfo { + name: "medium_spender", + max_deciding: 50, + decision_deposit: 200 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_MEDIUM_SPENDER, + min_support: SUP_MEDIUM_SPENDER, + }, + ), + ( + 34, + pallet_referenda::TrackInfo { + name: "big_spender", + max_deciding: 50, + decision_deposit: 400 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 48 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_BIG_SPENDER, + min_support: SUP_BIG_SPENDER, + }, + ), ]; pub struct TracksInfo; impl pallet_referenda::TracksInfo for TracksInfo { - type Id = u16; - type RuntimeOrigin = ::PalletsOrigin; - fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { - &TRACKS_DATA[..] - } - fn track_for(id: &Self::RuntimeOrigin) -> Result { - if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { - match system_origin { - frame_system::RawOrigin::Root => Ok(0), - _ => Err(()), - } - } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { - match custom_origin { - origins::Origin::WhitelistedCaller => Ok(1), - // General admin - origins::Origin::StakingAdmin => Ok(10), - origins::Origin::Treasurer => Ok(11), - origins::Origin::LeaseAdmin => Ok(12), - origins::Origin::FellowshipAdmin => Ok(13), - origins::Origin::GeneralAdmin => Ok(14), - origins::Origin::AuctionAdmin => Ok(15), - // Referendum admins - origins::Origin::ReferendumCanceller => Ok(20), - origins::Origin::ReferendumKiller => Ok(21), - // Limited treasury spenders - origins::Origin::SmallTipper => Ok(30), - origins::Origin::BigTipper => Ok(31), - origins::Origin::SmallSpender => Ok(32), - origins::Origin::MediumSpender => Ok(33), - origins::Origin::BigSpender => Ok(34), - } - } else { - Err(()) - } - } + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + &TRACKS_DATA[..] + } + fn track_for(id: &Self::RuntimeOrigin) -> Result { + if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { + match system_origin { + frame_system::RawOrigin::Root => Ok(0), + _ => Err(()), + } + } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { + match custom_origin { + origins::Origin::WhitelistedCaller => Ok(1), + // General admin + origins::Origin::StakingAdmin => Ok(10), + origins::Origin::Treasurer => Ok(11), + origins::Origin::LeaseAdmin => Ok(12), + origins::Origin::FellowshipAdmin => Ok(13), + origins::Origin::GeneralAdmin => Ok(14), + origins::Origin::AuctionAdmin => Ok(15), + // Referendum admins + origins::Origin::ReferendumCanceller => Ok(20), + origins::Origin::ReferendumKiller => Ok(21), + // Limited treasury spenders + origins::Origin::SmallTipper => Ok(30), + origins::Origin::BigTipper => Ok(31), + origins::Origin::SmallSpender => Ok(32), + origins::Origin::MediumSpender => Ok(33), + origins::Origin::BigSpender => Ok(34), + } + } else { + Err(()) + } + } } pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); diff --git a/relay/paseo/src/lib.rs b/relay/paseo/src/lib.rs index ddae0d8..20d8461 100644 --- a/relay/paseo/src/lib.rs +++ b/relay/paseo/src/lib.rs @@ -1,20 +1,20 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . -//! The Polkadot runtime. This can be compiled with `#[no_std]`, ready for Wasm. +//! The Paseo runtime. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. @@ -22,47 +22,44 @@ use pallet_transaction_payment::CurrencyAdapter; use runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, - impls::{ - DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, - VersionedMultiLocationConverter, - }, - paras_registrar, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, - SlowAdjustingFeeUpdate, + auctions, claims, crowdloan, impl_runtime_weights, impls::{ + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, + VersionedMultiLocationConverter, + }, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate }; use runtime_parachains::{ - assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - inclusion::{AggregateMessageOrigin, UmpQueueId}, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, - paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v7 as parachains_runtime_api_impl, - scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, + assigner_parachains as parachains_assigner_parachains, + configuration as parachains_configuration, disputes as parachains_disputes, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, + paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, + runtime_api_impl::v7 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::{ - ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, - mmr::{BeefyDataProvider, MmrLeafVersion}, + ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, + mmr::{BeefyDataProvider, MmrLeafVersion}, }; use frame_election_provider_support::{ - bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, + bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen, }; use frame_support::{ - construct_runtime, - genesis_builder_helper::{build_config, create_default_config}, - parameter_types, - traits::{ - fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Get, InstanceFilter, - KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, - WithdrawReasons, - }, - weights::{ConstantMultiplier, WeightMeter}, - PalletId, + construct_runtime, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, + traits::{ + fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Get, InstanceFilter, + KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, + WithdrawReasons, + }, + weights::{ConstantMultiplier, WeightMeter}, + PalletId, }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; @@ -72,24 +69,24 @@ use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::{ - slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, + slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, + CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, + Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, + OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, + PARACHAIN_KEY_TYPE_ID, }; use sp_core::{OpaqueMetadata, H256}; use sp_runtime::{ - create_runtime_str, - curve::PiecewiseLinear, - generic, impl_opaque_keys, - traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, - IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, - }, - transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, + create_runtime_str, + curve::PiecewiseLinear, + generic, impl_opaque_keys, + traits::{ + AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, + IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, + }, + transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; @@ -97,8 +94,8 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::{ - latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, - VersionedMultiLocation, + latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, + VersionedMultiLocation, }; use xcm_builder::PayOverXcm; @@ -113,7 +110,7 @@ pub use pallet_timestamp::Call as TimestampCall; pub use sp_runtime::BuildStorage; /// Constant values used within the runtime. -use polkadot_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; +use paseo_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; // Weights used in the runtime. mod weights; @@ -123,310 +120,313 @@ mod bag_thresholds; // Governance configurations. pub mod governance; use governance::{ - pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin, - Treasurer, TreasurySpender, + pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin, + Treasurer, TreasurySpender, }; pub mod xcm_config; -pub const LOG_TARGET: &'static str = "runtime::polkadot"; +pub const LOG_TARGET: &'static str = "runtime::paseo"; -impl_runtime_weights!(polkadot_runtime_constants); +impl_runtime_weights!(paseo_runtime_constants); // Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -// Polkadot version identifier; -/// Runtime version (Polkadot). +// Paseo version identifier; +/// Runtime version (Paseo). #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("polkadot"), - impl_name: create_runtime_str!("parity-polkadot"), - authoring_version: 0, - spec_version: 1_001_003, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 25, - state_version: 0, + spec_name: create_runtime_str!("paseo"), + impl_name: create_runtime_str!("paseo-testnet"), + authoring_version: 0, + spec_version: 1_001_003, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 25, + state_version: 0, }; /// The BABE epoch configuration at genesis. pub const BABE_GENESIS_EPOCH_CONFIG: babe_primitives::BabeEpochConfiguration = - babe_primitives::BabeEpochConfiguration { - c: PRIMARY_PROBABILITY, - allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, - }; + babe_primitives::BabeEpochConfiguration { + c: PRIMARY_PROBABILITY, + allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, + }; /// Native version. #[cfg(any(feature = "std", test))] pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } } parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u8 = 0; + pub const Version: RuntimeVersion = VERSION; + pub const SS58Prefix: u8 = 42; } impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = BlockWeights; - type BlockLength = BlockLength; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = Nonce; - type Hash = Hash; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = AccountIdLookup; - type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type DbWeight = RocksDbWeight; - type Version = Version; - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = weights::frame_system::WeightInfo; - type SS58Prefix = SS58Prefix; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = BlockWeights; + type BlockLength = BlockLength; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = Nonce; + type Hash = Hash; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = AccountIdLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * - BlockWeights::get().max_block; - pub const MaxScheduledPerBlock: u32 = 50; - pub const NoPreimagePostponement: Option = Some(10); + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + BlockWeights::get().max_block; + pub const MaxScheduledPerBlock: u32 = 50; + pub const NoPreimagePostponement: Option = Some(10); } /// Used the compare the privilege of an origin inside the scheduler. pub struct OriginPrivilegeCmp; impl PrivilegeCmp for OriginPrivilegeCmp { - fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option { - if left == right { - return Some(Ordering::Equal) - } - - match (left, right) { - // Root is greater than anything. - (OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater), - // For every other origin we don't care, as they are not used for `ScheduleOrigin`. - _ => None, - } - } + fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option { + if left == right { + return Some(Ordering::Equal); + } + + match (left, right) { + // Root is greater than anything. + (OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater), + // For every other origin we don't care, as they are not used for `ScheduleOrigin`. + _ => None, + } + } } impl pallet_scheduler::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type PalletsOrigin = OriginCaller; - type RuntimeCall = RuntimeCall; - type MaximumWeight = MaximumSchedulerWeight; - // The goal of having ScheduleOrigin include AuctionAdmin is to allow the auctions track of - // OpenGov to schedule periodic auctions. - // Also allow Treasurer to schedule recurring payments. - type ScheduleOrigin = EitherOf, AuctionAdmin>, Treasurer>; - type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type OriginPrivilegeCmp = OriginPrivilegeCmp; - type Preimages = Preimage; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + // The goal of having ScheduleOrigin include AuctionAdmin is to allow the auctions track of + // OpenGov to schedule periodic auctions. + // Also allow Treasurer to schedule recurring payments. + type ScheduleOrigin = EitherOf, AuctionAdmin>, Treasurer>; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = weights::pallet_scheduler::WeightInfo; + type OriginPrivilegeCmp = OriginPrivilegeCmp; + type Preimages = Preimage; } parameter_types! { - pub const PreimageBaseDeposit: Balance = deposit(2, 64); - pub const PreimageByteDeposit: Balance = deposit(0, 1); - pub const PreimageHoldReason: RuntimeHoldReason = - RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); + pub const PreimageBaseDeposit: Balance = deposit(2, 64); + pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type ManagerOrigin = EnsureRoot; - type Consideration = HoldConsideration< - AccountId, - Balances, - PreimageHoldReason, - LinearStoragePrice, - >; + type WeightInfo = weights::pallet_preimage::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type ManagerOrigin = EnsureRoot; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { - pub EpochDuration: u64 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS as u64, - 2 * MINUTES as u64, - "DOT_EPOCH_DURATION" - ); - pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; - pub ReportLongevity: u64 = - BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); + pub EpochDuration: u64 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS as u64, + 2 * MINUTES as u64, + "DOT_EPOCH_DURATION" + ); + pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; + pub ReportLongevity: u64 = + BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); } impl pallet_babe::Config for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; + type EpochDuration = EpochDuration; + type ExpectedBlockTime = ExpectedBlockTime; - // session module is the trigger - type EpochChangeTrigger = pallet_babe::ExternalTrigger; + // session module is the trigger + type EpochChangeTrigger = pallet_babe::ExternalTrigger; - type DisabledValidators = Session; + type DisabledValidators = Session; - type WeightInfo = (); + type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; - type KeyOwnerProof = - >::Proof; + type KeyOwnerProof = + >::Proof; - type EquivocationReportSystem = - pallet_babe::EquivocationReportSystem; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; } parameter_types! { - pub const IndexDeposit: Balance = 10 * DOLLARS; + pub const IndexDeposit: Balance = 10 * DOLLARS; } impl pallet_indices::Config for Runtime { - type AccountIndex = AccountIndex; - type Currency = Balances; - type Deposit = IndexDeposit; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_indices::WeightInfo; + type AccountIndex = AccountIndex; + type Currency = Balances; + type Deposit = IndexDeposit; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_indices::WeightInfo; } parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; } impl pallet_balances::Config for Runtime { - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances::WeightInfo; - type RuntimeHoldReason = RuntimeHoldReason; - type RuntimeFreezeReason = RuntimeFreezeReason; - type FreezeIdentifier = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; - type MaxFreezes = ConstU32<8>; + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = weights::pallet_balances::WeightInfo; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = RuntimeFreezeReason; + type MaxHolds = ConstU32<1>; + type MaxFreezes = ConstU32<8>; } parameter_types! { - pub BeefySetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); + pub BeefySetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_beefy::Config for Runtime { - type BeefyId = BeefyId; - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = BeefySetIdSessionEntries; - type OnNewValidatorSet = BeefyMmrLeaf; - type WeightInfo = (); - type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_beefy::EquivocationReportSystem; + type BeefyId = BeefyId; + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxSetIdSessionEntries = BeefySetIdSessionEntries; + type OnNewValidatorSet = BeefyMmrLeaf; + type WeightInfo = (); + type KeyOwnerProof = >::Proof; + type EquivocationReportSystem = + pallet_beefy::EquivocationReportSystem; } impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; - type Hashing = Keccak256; - type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; - type WeightInfo = (); - type LeafData = pallet_beefy_mmr::Pallet; + const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; + type Hashing = Keccak256; + type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; + type WeightInfo = (); + type LeafData = pallet_beefy_mmr::Pallet; } /// MMR helper types. mod mmr { - use super::Runtime; - pub use pallet_mmr::primitives::*; + use super::Runtime; + pub use pallet_mmr::primitives::*; - pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hashing = ::Hashing; - pub type Hash = ::Output; + pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; + pub type Hashing = ::Hashing; + pub type Hash = ::Output; } parameter_types! { - /// Version of the produced MMR leaf. - /// - /// The version consists of two parts; - /// - `major` (3 bits) - /// - `minor` (5 bits) - /// - /// `major` should be updated only if decoding the previous MMR Leaf format from the payload - /// is not possible (i.e. backward incompatible change). - /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE - /// encoding does not prevent old leafs from being decoded. - /// - /// Hence we expect `major` to be changed really rarely (think never). - /// See [`MmrLeafVersion`] type documentation for more details. - pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); + /// Version of the produced MMR leaf. + /// + /// The version consists of two parts; + /// - `major` (3 bits) + /// - `minor` (5 bits) + /// + /// `major` should be updated only if decoding the previous MMR Leaf format from the payload + /// is not possible (i.e. backward incompatible change). + /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE + /// encoding does not prevent old leafs from being decoded. + /// + /// Hence we expect `major` to be changed really rarely (think never). + /// See [`MmrLeafVersion`] type documentation for more details. + pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); } /// A BEEFY data provider that merkelizes all the parachain heads at the current block /// (sorted by their parachain id). pub struct ParaHeadsRootProvider; impl BeefyDataProvider for ParaHeadsRootProvider { - fn extra_data() -> H256 { - let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() - .into_iter() - .filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0))) - .collect(); - para_heads.sort_by_key(|k| k.0); - binary_merkle_tree::merkle_root::( - para_heads.into_iter().map(|pair| pair.encode()), - ) - .into() - } + fn extra_data() -> H256 { + let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() + .into_iter() + .filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0))) + .collect(); + para_heads.sort_by_key(|k| k.0); + binary_merkle_tree::merkle_root::( + para_heads.into_iter().map(|pair| pair.encode()), + ) + .into() + } } impl pallet_beefy_mmr::Config for Runtime { - type LeafVersion = LeafVersion; - type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; - type LeafExtra = H256; - type BeefyDataProvider = ParaHeadsRootProvider; + type LeafVersion = LeafVersion; + type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; + type LeafExtra = H256; + type BeefyDataProvider = ParaHeadsRootProvider; } parameter_types! { - pub const TransactionByteFee: Balance = 10 * MILLICENTS; - /// This value increases the priority of `Operational` transactions by adding - /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. - pub const OperationalFeeMultiplier: u8 = 5; + pub const TransactionByteFee: Balance = 10 * MILLICENTS; + /// This value increases the priority of `Operational` transactions by adding + /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. + pub const OperationalFeeMultiplier: u8 = 5; } impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; - type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = CurrencyAdapter>; + type OperationalFeeMultiplier = OperationalFeeMultiplier; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; } parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; } impl pallet_timestamp::Config for Runtime { - type Moment = u64; - type OnTimestampSet = Babe; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; + type Moment = u64; + type OnTimestampSet = Babe; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (Staking, ImOnline); + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (Staking, ImOnline); } impl_opaque_keys! { @@ -442,201 +442,201 @@ impl_opaque_keys! { } impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = AccountId; - type ValidatorIdOf = pallet_staking::StashOf; - type ShouldEndSession = Babe; - type NextSessionRotation = Babe; - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = weights::pallet_session::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type ValidatorId = AccountId; + type ValidatorIdOf = pallet_staking::StashOf; + type ShouldEndSession = Babe; + type NextSessionRotation = Babe; + type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; } impl pallet_session::historical::Config for Runtime { - type FullIdentification = pallet_staking::Exposure; - type FullIdentificationOf = pallet_staking::ExposureOf; + type FullIdentification = pallet_staking::Exposure; + type FullIdentificationOf = pallet_staking::ExposureOf; } parameter_types! { - // phase durations. 1/4 of the last session for each. - // in testing: 1min or half of the session for each - pub SignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "DOT_SIGNED_PHASE" - ); - pub UnsignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "DOT_UNSIGNED_PHASE" - ); - - // signed config - pub const SignedMaxSubmissions: u32 = 16; - pub const SignedMaxRefunds: u32 = 16 / 4; - pub const SignedFixedDeposit: Balance = deposit(2, 0); - pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); - // 0.01 DOT per KB of solution data. - pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; - // Each good submission will get 1 DOT as reward - pub SignedRewardBase: Balance = 1 * UNITS; - pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); - - // 4 hour session, 1 hour unsigned phase, 32 offchain executions. - pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32; - - pub const MaxElectingVoters: u32 = 22_500; - /// We take the top 22500 nominators as electing voters and all of the validators as electable - /// targets. Whilst this is the case, we cannot and shall not increase the size of the - /// validator intentions. - pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = - ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); - /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet - /// cannot have active validators higher than this count. - pub const MaxActiveValidators: u32 = 1200; + // phase durations. 1/4 of the last session for each. + // in testing: 1min or half of the session for each + pub SignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), + "DOT_SIGNED_PHASE" + ); + pub UnsignedPhase: u32 = prod_or_fast!( + EPOCH_DURATION_IN_SLOTS / 4, + (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), + "DOT_UNSIGNED_PHASE" + ); + + // signed config + pub const SignedMaxSubmissions: u32 = 16; + pub const SignedMaxRefunds: u32 = 16 / 4; + pub const SignedFixedDeposit: Balance = deposit(2, 0); + pub const SignedDepositIncreaseFactor: Percent = Percent::from_percent(10); + // 0.01 PAS per KB of solution data. + pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; + // Each good submission will get 1 PAS as reward + pub SignedRewardBase: Balance = 1 * UNITS; + pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); + + // 4 hour session, 1 hour unsigned phase, 32 offchain executions. + pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32; + + pub const MaxElectingVoters: u32 = 22_500; + /// We take the top 22500 nominators as electing voters and all of the validators as electable + /// targets. Whilst this is the case, we cannot and shall not increase the size of the + /// validator intentions. + pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = + ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); + /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet + /// cannot have active validators higher than this count. + pub const MaxActiveValidators: u32 = 1200; } generate_solution_type!( - #[compact] - pub struct NposCompactSolution16::< - VoterIndex = u32, - TargetIndex = u16, - Accuracy = sp_runtime::PerU16, - MaxVoters = MaxElectingVoters, - >(16) + #[compact] + pub struct NposCompactSolution16::< + VoterIndex = u32, + TargetIndex = u16, + Accuracy = sp_runtime::PerU16, + MaxVoters = MaxElectingVoters, + >(16) ); pub struct OnChainSeqPhragmen; impl onchain::Config for OnChainSeqPhragmen { - type System = Runtime; - type Solver = SequentialPhragmen; - type DataProvider = Staking; - type WeightInfo = weights::frame_election_provider_support::WeightInfo; - type MaxWinners = MaxActiveValidators; - type Bounds = ElectionBounds; + type System = Runtime; + type Solver = SequentialPhragmen; + type DataProvider = Staking; + type WeightInfo = weights::frame_election_provider_support::WeightInfo; + type MaxWinners = MaxActiveValidators; + type Bounds = ElectionBounds; } impl pallet_election_provider_multi_phase::MinerConfig for Runtime { - type AccountId = AccountId; - type MaxLength = OffchainSolutionLengthLimit; - type MaxWeight = OffchainSolutionWeightLimit; - type Solution = NposCompactSolution16; - type MaxVotesPerVoter = < + type AccountId = AccountId; + type MaxLength = OffchainSolutionLengthLimit; + type MaxWeight = OffchainSolutionWeightLimit; + type Solution = NposCompactSolution16; + type MaxVotesPerVoter = < ::DataProvider as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; - type MaxWinners = MaxActiveValidators; + type MaxWinners = MaxActiveValidators; - // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their - // weight estimate function is wired to this call's weight. - fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { - < + // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their + // weight estimate function is wired to this call's weight. + fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { + < ::WeightInfo as pallet_election_provider_multi_phase::WeightInfo >::submit_unsigned(v, t, a, d) - } + } } impl pallet_election_provider_multi_phase::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EstimateCallFee = TransactionPayment; - type SignedPhase = SignedPhase; - type UnsignedPhase = UnsignedPhase; - type SignedMaxSubmissions = SignedMaxSubmissions; - type SignedMaxRefunds = SignedMaxRefunds; - type SignedRewardBase = SignedRewardBase; - type SignedDepositBase = - GeometricDepositBase; - type SignedDepositByte = SignedDepositByte; - type SignedDepositWeight = (); - type SignedMaxWeight = - ::MaxWeight; - type MinerConfig = Self; - type SlashHandler = (); // burn slashes - type RewardHandler = (); // nothing to do upon rewards - type BetterUnsignedThreshold = BetterUnsignedThreshold; - type BetterSignedThreshold = (); - type OffchainRepeat = OffchainRepeat; - type MinerTxPriority = NposSolutionPriority; - type DataProvider = Staking; - #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] - type Fallback = onchain::OnChainExecution; - #[cfg(not(any(feature = "fast-runtime", feature = "runtime-benchmarks")))] - type Fallback = frame_election_provider_support::NoElection<( - AccountId, - BlockNumber, - Staking, - MaxActiveValidators, - )>; - type GovernanceFallback = onchain::OnChainExecution; - type Solver = SequentialPhragmen< - AccountId, - pallet_election_provider_multi_phase::SolutionAccuracyOf, - (), - >; - type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EitherOf, StakingAdmin>; - type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; - type MaxWinners = MaxActiveValidators; - type ElectionBounds = ElectionBounds; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type EstimateCallFee = TransactionPayment; + type SignedPhase = SignedPhase; + type UnsignedPhase = UnsignedPhase; + type SignedMaxSubmissions = SignedMaxSubmissions; + type SignedMaxRefunds = SignedMaxRefunds; + type SignedRewardBase = SignedRewardBase; + type SignedDepositBase = + GeometricDepositBase; + type SignedDepositByte = SignedDepositByte; + type SignedDepositWeight = (); + type SignedMaxWeight = + ::MaxWeight; + type MinerConfig = Self; + type SlashHandler = (); // burn slashes + type RewardHandler = (); // nothing to do upon rewards + type BetterUnsignedThreshold = BetterUnsignedThreshold; + type BetterSignedThreshold = (); + type OffchainRepeat = OffchainRepeat; + type MinerTxPriority = NposSolutionPriority; + type DataProvider = Staking; + #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] + type Fallback = onchain::OnChainExecution; + #[cfg(not(any(feature = "fast-runtime", feature = "runtime-benchmarks")))] + type Fallback = frame_election_provider_support::NoElection<( + AccountId, + BlockNumber, + Staking, + MaxActiveValidators, + )>; + type GovernanceFallback = onchain::OnChainExecution; + type Solver = SequentialPhragmen< + AccountId, + pallet_election_provider_multi_phase::SolutionAccuracyOf, + (), + >; + type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; + type ForceOrigin = EitherOf, StakingAdmin>; + type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; + type MaxWinners = MaxActiveValidators; + type ElectionBounds = ElectionBounds; } parameter_types! { - pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS; + pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS; } type VoterBagsListInstance = pallet_bags_list::Instance1; impl pallet_bags_list::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ScoreProvider = Staking; - type WeightInfo = weights::pallet_bags_list::WeightInfo; - type BagThresholds = BagThresholds; - type Score = sp_npos_elections::VoteWeight; + type RuntimeEvent = RuntimeEvent; + type ScoreProvider = Staking; + type WeightInfo = weights::pallet_bags_list::WeightInfo; + type BagThresholds = BagThresholds; + type Score = sp_npos_elections::VoteWeight; } // TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and // re-built in case input parameters have changed. The `ideal_stake` should be determined by the // amount of parachain slots being bid on: this should be around `(75 - 25.min(slots / 4))%`. pallet_staking_reward_curve::build! { - const REWARD_CURVE: PiecewiseLinear<'static> = curve!( - min_inflation: 0_025_000, - max_inflation: 0_100_000, - // 3:2:1 staked : parachains : float. - // while there's no parachains, then this is 75% staked : 25% float. - ideal_stake: 0_750_000, - falloff: 0_050_000, - max_piece_count: 40, - test_precision: 0_005_000, - ); + const REWARD_CURVE: PiecewiseLinear<'static> = curve!( + min_inflation: 0_025_000, + max_inflation: 0_100_000, + // 3:2:1 staked : parachains : float. + // while there's no parachains, then this is 75% staked : 25% float. + ideal_stake: 0_750_000, + falloff: 0_050_000, + max_piece_count: 40, + test_precision: 0_005_000, + ); } parameter_types! { - // Six sessions in an era (24 hours). - pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); - - // 28 eras for unbonding (28 days). - pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( - 28, - 28, - "DOT_BONDING_DURATION" - ); - pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( - 27, - 27, - "DOT_SLASH_DEFER_DURATION" - ); - pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxNominatorRewardedPerValidator: u32 = 512; - pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); - // 16 - pub const MaxNominations: u32 = ::LIMIT as u32; -} - -/// Custom version of `runtime_commong::era_payout` somewhat tailored for Polkadot's crowdloan + // Six sessions in an era (24 hours). + pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); + + // 28 eras for unbonding (28 days). + pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( + 28, + 28, + "DOT_BONDING_DURATION" + ); + pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( + 27, + 27, + "DOT_SLASH_DEFER_DURATION" + ); + pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; + pub const MaxNominatorRewardedPerValidator: u32 = 512; + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); + // 16 + pub const MaxNominations: u32 = ::LIMIT as u32; +} + +/// Custom version of `runtime_commong::era_payout` somewhat tailored for Paseo's crowdloan /// unlock history. The only tweak should be /// /// ```diff @@ -646,487 +646,495 @@ parameter_types! { /// /// See . fn polkadot_era_payout( - total_staked: Balance, - total_stakable: Balance, - max_annual_inflation: Perquintill, - period_fraction: Perquintill, - auctioned_slots: u64, + total_staked: Balance, + total_stakable: Balance, + max_annual_inflation: Perquintill, + period_fraction: Perquintill, + auctioned_slots: u64, ) -> (Balance, Balance) { - use pallet_staking_reward_fn::compute_inflation; - use sp_runtime::traits::Saturating; - - let min_annual_inflation = Perquintill::from_rational(25u64, 1000u64); - let delta_annual_inflation = max_annual_inflation.saturating_sub(min_annual_inflation); - - // 20% reserved for up to 60 slots. - let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); - - // Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the - // amount that we expect to be taken up with auctions. - let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); - - let stake = Perquintill::from_rational(total_staked, total_stakable); - let falloff = Perquintill::from_percent(5); - let adjustment = compute_inflation(stake, ideal_stake, falloff); - let staking_inflation = - min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); - - let max_payout = period_fraction * max_annual_inflation * total_stakable; - let staking_payout = (period_fraction * staking_inflation) * total_stakable; - let rest = max_payout.saturating_sub(staking_payout); - - let other_issuance = total_stakable.saturating_sub(total_staked); - if total_staked > other_issuance { - let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; - // We don't do anything with this, but if we wanted to, we could introduce a cap on the - // treasury amount with: `rest = rest.min(cap_rest);` - } - (staking_payout, rest) + use pallet_staking_reward_fn::compute_inflation; + use sp_runtime::traits::Saturating; + + let min_annual_inflation = Perquintill::from_rational(25u64, 1000u64); + let delta_annual_inflation = max_annual_inflation.saturating_sub(min_annual_inflation); + + // 20% reserved for up to 60 slots. + let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 300u64); + + // Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the + // amount that we expect to be taken up with auctions. + let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion); + + let stake = Perquintill::from_rational(total_staked, total_stakable); + let falloff = Perquintill::from_percent(5); + let adjustment = compute_inflation(stake, ideal_stake, falloff); + let staking_inflation = + min_annual_inflation.saturating_add(delta_annual_inflation * adjustment); + + let max_payout = period_fraction * max_annual_inflation * total_stakable; + let staking_payout = (period_fraction * staking_inflation) * total_stakable; + let rest = max_payout.saturating_sub(staking_payout); + + let other_issuance = total_stakable.saturating_sub(total_staked); + if total_staked > other_issuance { + let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout; + // We don't do anything with this, but if we wanted to, we could introduce a cap on the + // treasury amount with: `rest = rest.min(cap_rest);` + } + (staking_payout, rest) } pub struct EraPayout; impl pallet_staking::EraPayout for EraPayout { - fn era_payout( - total_staked: Balance, - total_issuance: Balance, - era_duration_millis: u64, - ) -> (Balance, Balance) { - // all para-ids that are not active. - let auctioned_slots = Paras::parachains() - .into_iter() - // all active para-ids that do not belong to a system chain is the number - // of parachains that we should take into account for inflation. - .filter(|i| *i >= LOWEST_PUBLIC_ID) - .count() as u64; - - const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); - const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; - - polkadot_era_payout( - total_staked, - total_issuance, - MAX_ANNUAL_INFLATION, - Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), - auctioned_slots, - ) - } + fn era_payout( + total_staked: Balance, + total_issuance: Balance, + era_duration_millis: u64, + ) -> (Balance, Balance) { + // all para-ids that are not active. + let auctioned_slots = Paras::parachains() + .into_iter() + // all active para-ids that do not belong to a system chain is the number + // of parachains that we should take into account for inflation. + .filter(|i| *i >= LOWEST_PUBLIC_ID) + .count() as u64; + + const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); + const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; + + polkadot_era_payout( + total_staked, + total_issuance, + MAX_ANNUAL_INFLATION, + Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), + auctioned_slots, + ) + } } impl pallet_staking::Config for Runtime { - type Currency = Balances; - type CurrencyBalance = Balance; - type UnixTime = Timestamp; - type CurrencyToVote = CurrencyToVote; - type RewardRemainder = Treasury; - type RuntimeEvent = RuntimeEvent; - type Slash = Treasury; - type Reward = (); - type SessionsPerEra = SessionsPerEra; - type BondingDuration = BondingDuration; - type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EitherOf, StakingAdmin>; - type SessionInterface = Self; - type EraPayout = EraPayout; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; - type OffendingValidatorsThreshold = OffendingValidatorsThreshold; - type NextNewSession = Session; - type ElectionProvider = ElectionProviderMultiPhase; - type GenesisElectionProvider = onchain::OnChainExecution; - type VoterList = VoterList; - type TargetList = UseValidatorsMap; - type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; - type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; - type HistoryDepth = frame_support::traits::ConstU32<84>; - type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; - type EventListeners = NominationPools; - type WeightInfo = weights::pallet_staking::WeightInfo; + type Currency = Balances; + type CurrencyBalance = Balance; + type UnixTime = Timestamp; + type CurrencyToVote = CurrencyToVote; + type RewardRemainder = Treasury; + type RuntimeEvent = RuntimeEvent; + type Slash = Treasury; + type Reward = (); + type SessionsPerEra = SessionsPerEra; + type BondingDuration = BondingDuration; + type SlashDeferDuration = SlashDeferDuration; + type AdminOrigin = EitherOf, StakingAdmin>; + type SessionInterface = Self; + type EraPayout = EraPayout; + type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type OffendingValidatorsThreshold = OffendingValidatorsThreshold; + type NextNewSession = Session; + type ElectionProvider = ElectionProviderMultiPhase; + type GenesisElectionProvider = onchain::OnChainExecution; + type VoterList = VoterList; + type TargetList = UseValidatorsMap; + type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; + type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; + type HistoryDepth = frame_support::traits::ConstU32<84>; + type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; + type EventListeners = NominationPools; + type WeightInfo = weights::pallet_staking::WeightInfo; } impl pallet_fast_unstake::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BatchSize = frame_support::traits::ConstU32<16>; - type Deposit = frame_support::traits::ConstU128<{ UNITS }>; - type ControlOrigin = EnsureRoot; - type Staking = Staking; - type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; - type WeightInfo = weights::pallet_fast_unstake::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BatchSize = frame_support::traits::ConstU32<16>; + type Deposit = frame_support::traits::ConstU128<{ UNITS }>; + type ControlOrigin = EnsureRoot; + type Staking = Staking; + type MaxErasToCheckPerBlock = ConstU32<1>; + #[cfg(feature = "runtime-benchmarks")] + type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; + type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } parameter_types! { - // Minimum 4 CENTS/byte - pub const BasicDeposit: Balance = deposit(1, 258); - pub const FieldDeposit: Balance = deposit(0, 66); - pub const SubAccountDeposit: Balance = deposit(1, 53); - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; + // Minimum 4 CENTS/byte + pub const BasicDeposit: Balance = deposit(1, 258); + pub const FieldDeposit: Balance = deposit(0, 66); + pub const SubAccountDeposit: Balance = deposit(1, 53); + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; } impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; - type IdentityInformation = IdentityInfo; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; - type WeightInfo = weights::pallet_identity::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = IdentityInfo; + type MaxRegistrars = MaxRegistrars; + type Slashed = Treasury; + type ForceOrigin = EitherOf, GeneralAdmin>; + type RegistrarOrigin = EitherOf, GeneralAdmin>; + type WeightInfo = weights::pallet_identity::WeightInfo; } parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 100 * DOLLARS; - pub const ProposalBondMaximum: Balance = 500 * DOLLARS; - pub const SpendPeriod: BlockNumber = 24 * DAYS; - pub const Burn: Permill = Permill::from_percent(1); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; - // The asset's interior location for the paying account. This is the Treasury - // pallet instance (which sits at index 19). - pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); - - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(20); - pub const TipReportDepositBase: Balance = 1 * DOLLARS; - pub const DataDepositPerByte: Balance = 1 * CENTS; - pub const MaxApprovals: u32 = 100; - pub const MaxAuthorities: u32 = 100_000; - pub const MaxKeys: u32 = 10_000; - pub const MaxPeerInHeartbeats: u32 = 10_000; - pub const RootSpendOriginMaxAmount: Balance = Balance::MAX; - pub const CouncilSpendOriginMaxAmount: Balance = Balance::MAX; + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 100 * DOLLARS; + pub const ProposalBondMaximum: Balance = 500 * DOLLARS; + pub const SpendPeriod: BlockNumber = 24 * DAYS; + pub const Burn: Permill = Permill::from_percent(1); + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + // The asset's interior location for the paying account. This is the Treasury + // pallet instance (which sits at index 19). + pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); + + pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipFindersFee: Percent = Percent::from_percent(20); + pub const TipReportDepositBase: Balance = 1 * DOLLARS; + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const MaxApprovals: u32 = 100; + pub const MaxAuthorities: u32 = 100_000; + pub const MaxKeys: u32 = 10_000; + pub const MaxPeerInHeartbeats: u32 = 10_000; + pub const RootSpendOriginMaxAmount: Balance = Balance::MAX; + pub const CouncilSpendOriginMaxAmount: Balance = Balance::MAX; } impl pallet_treasury::Config for Runtime { - type PalletId = TreasuryPalletId; - type Currency = Balances; - type ApproveOrigin = EitherOfDiverse, Treasurer>; - type RejectOrigin = EitherOfDiverse, Treasurer>; - type RuntimeEvent = RuntimeEvent; - type OnSlash = Treasury; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type ProposalBondMaximum = ProposalBondMaximum; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = (); - type SpendFunds = Bounties; - type MaxApprovals = MaxApprovals; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type SpendOrigin = TreasurySpender; - type AssetKind = VersionedLocatableAsset; - type Beneficiary = VersionedMultiLocation; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayOverXcm< - TreasuryInteriorLocation, - crate::xcm_config::XcmRouter, - crate::XcmPallet, - ConstU32<{ 6 * HOURS }>, - Self::Beneficiary, - Self::AssetKind, - LocatableAssetConverter, - VersionedMultiLocationConverter, - >; - type BalanceConverter = AssetRate; - type PayoutPeriod = PayoutSpendPeriod; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; + type PalletId = TreasuryPalletId; + type Currency = Balances; + type ApproveOrigin = EitherOfDiverse, Treasurer>; + type RejectOrigin = EitherOfDiverse, Treasurer>; + type RuntimeEvent = RuntimeEvent; + type OnSlash = Treasury; + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type ProposalBondMaximum = ProposalBondMaximum; + type SpendPeriod = SpendPeriod; + type Burn = Burn; + type BurnDestination = (); + type SpendFunds = Bounties; + type MaxApprovals = MaxApprovals; + type WeightInfo = weights::pallet_treasury::WeightInfo; + type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedMultiLocation; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayOverXcm< + TreasuryInteriorLocation, + crate::xcm_config::XcmRouter, + crate::XcmPallet, + ConstU32<{ 6 * HOURS }>, + Self::Beneficiary, + Self::AssetKind, + LocatableAssetConverter, + VersionedMultiLocationConverter, + >; + type BalanceConverter = AssetRate; + type PayoutPeriod = PayoutSpendPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::TreasuryArguments; } parameter_types! { - pub const BountyDepositBase: Balance = 1 * DOLLARS; - pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const MaximumReasonLength: u32 = 16384; - pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); - pub const CuratorDepositMin: Balance = 10 * DOLLARS; - pub const CuratorDepositMax: Balance = 200 * DOLLARS; - pub const BountyValueMinimum: Balance = 10 * DOLLARS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); + pub const CuratorDepositMin: Balance = 10 * DOLLARS; + pub const CuratorDepositMax: Balance = 200 * DOLLARS; + pub const BountyValueMinimum: Balance = 10 * DOLLARS; } impl pallet_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type CuratorDepositMultiplier = CuratorDepositMultiplier; - type CuratorDepositMin = CuratorDepositMin; - type CuratorDepositMax = CuratorDepositMax; - type BountyValueMinimum = BountyValueMinimum; - type ChildBountyManager = ChildBounties; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_bounties::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type CuratorDepositMultiplier = CuratorDepositMultiplier; + type CuratorDepositMin = CuratorDepositMin; + type CuratorDepositMax = CuratorDepositMax; + type BountyValueMinimum = BountyValueMinimum; + type ChildBountyManager = ChildBounties; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = weights::pallet_bounties::WeightInfo; } parameter_types! { - pub const MaxActiveChildBountyCount: u32 = 100; - pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; + pub const MaxActiveChildBountyCount: u32 = 100; + pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; } impl pallet_child_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type MaxActiveChildBountyCount = MaxActiveChildBountyCount; - type ChildBountyValueMinimum = ChildBountyValueMinimum; - type WeightInfo = weights::pallet_child_bounties::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type MaxActiveChildBountyCount = MaxActiveChildBountyCount; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type WeightInfo = weights::pallet_child_bounties::WeightInfo; } impl pallet_offences::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = Staking; + type RuntimeEvent = RuntimeEvent; + type IdentificationTuple = pallet_session::historical::IdentificationTuple; + type OnOffenceHandler = Staking; } impl pallet_authority_discovery::Config for Runtime { - type MaxAuthorities = MaxAuthorities; + type MaxAuthorities = MaxAuthorities; } parameter_types! { - pub NposSolutionPriority: TransactionPriority = - Perbill::from_percent(90) * TransactionPriority::max_value(); - pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); + pub NposSolutionPriority: TransactionPriority = + Perbill::from_percent(90) * TransactionPriority::max_value(); + pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); } impl pallet_im_online::Config for Runtime { - type AuthorityId = ImOnlineId; - type RuntimeEvent = RuntimeEvent; - type ValidatorSet = Historical; - type NextSessionRotation = Babe; - type ReportUnresponsiveness = Offences; - type UnsignedPriority = ImOnlineUnsignedPriority; - type WeightInfo = weights::pallet_im_online::WeightInfo; - type MaxKeys = MaxKeys; - type MaxPeerInHeartbeats = MaxPeerInHeartbeats; + type AuthorityId = ImOnlineId; + type RuntimeEvent = RuntimeEvent; + type ValidatorSet = Historical; + type NextSessionRotation = Babe; + type ReportUnresponsiveness = Offences; + type UnsignedPriority = ImOnlineUnsignedPriority; + type WeightInfo = weights::pallet_im_online::WeightInfo; + type MaxKeys = MaxKeys; + type MaxPeerInHeartbeats = MaxPeerInHeartbeats; } parameter_types! { - pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); + pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; + type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type WeightInfo = (); + type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxSetIdSessionEntries = MaxSetIdSessionEntries; - type KeyOwnerProof = >::Proof; + type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; } /// Submits a transaction with the node's public and signature type. Adheres to the signed extension /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - RuntimeCall: From, + RuntimeCall: From, { - fn create_transaction>( - call: RuntimeCall, - public: ::Signer, - account: AccountId, - nonce: ::Nonce, - ) -> Option<(RuntimeCall, ::SignaturePayload)> { - use sp_runtime::traits::StaticLookup; - // take the biggest period possible. - let period = - BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; - - let current_block = System::block_number() - .saturated_into::() - // The `System::block_number` is initialized with `n+1`, - // so the actual block number is `n`. - .saturating_sub(1); - let tip = 0; - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::mortal( - period, - current_block, - )), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), - claims::PrevalidateAttests::::new(), - ); - let raw_payload = SignedPayload::new(call, extra) - .map_err(|e| { - log::warn!(target: LOG_TARGET, "Unable to create signed payload: {:?}", e); - }) - .ok()?; - let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; - let (call, extra, _) = raw_payload.deconstruct(); - let address = ::Lookup::unlookup(account); - Some((call, (address, signature, extra))) - } + fn create_transaction>( + call: RuntimeCall, + public: ::Signer, + account: AccountId, + nonce: ::Nonce, + ) -> Option<( + RuntimeCall, + ::SignaturePayload, + )> { + use sp_runtime::traits::StaticLookup; + // take the biggest period possible. + let period = BlockHashCount::get() + .checked_next_power_of_two() + .map(|c| c / 2) + .unwrap_or(2) as u64; + + let current_block = System::block_number() + .saturated_into::() + // The `System::block_number` is initialized with `n+1`, + // so the actual block number is `n`. + .saturating_sub(1); + let tip = 0; + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from(generic::Era::mortal( + period, + current_block, + )), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + claims::PrevalidateAttests::::new(), + ); + let raw_payload = SignedPayload::new(call, extra) + .map_err(|e| { + log::warn!(target: LOG_TARGET, "Unable to create signed payload: {:?}", e); + }) + .ok()?; + let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; + let (call, extra, _) = raw_payload.deconstruct(); + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) + } } impl frame_system::offchain::SigningTypes for Runtime { - type Public = ::Signer; - type Signature = Signature; + type Public = ::Signer; + type Signature = Signature; } impl frame_system::offchain::SendTransactionTypes for Runtime where - RuntimeCall: From, + RuntimeCall: From, { - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; + type Extrinsic = UncheckedExtrinsic; + type OverarchingCall = RuntimeCall; } parameter_types! { - // Deposit for a parathread (on-demand parachain) - pub const ParathreadDeposit: Balance = 500 * DOLLARS; - pub const MaxRetries: u32 = 3; + // Deposit for a parathread (on-demand parachain) + pub const ParathreadDeposit: Balance = 500 * DOLLARS; + pub const MaxRetries: u32 = 3; } parameter_types! { - pub Prefix: &'static [u8] = b"Pay DOTs to the Polkadot account:"; + pub Prefix: &'static [u8] = b"Pay DOTs to the Paseo account:"; } impl claims::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type VestingSchedule = Vesting; - type Prefix = Prefix; - /// Only Root can move a claim. - type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type VestingSchedule = Vesting; + type Prefix = Prefix; + /// Only Root can move a claim. + type MoveClaimOrigin = EnsureRoot; + type WeightInfo = weights::runtime_common_claims::WeightInfo; } parameter_types! { - pub const MinVestedTransfer: Balance = 1 * DOLLARS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); + pub const MinVestedTransfer: Balance = 1 * DOLLARS; + pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = + WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); } impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = weights::pallet_vesting::WeightInfo; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - const MAX_VESTING_SCHEDULES: u32 = 28; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = weights::pallet_vesting::WeightInfo; + type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + const MAX_VESTING_SCHEDULES: u32 = 28; } impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = weights::pallet_utility::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; } parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); - pub const MaxSignatories: u32 = 100; + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u32 = 100; } impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = weights::pallet_multisig::WeightInfo; } parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const MaxProxies: u16 = 32; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); - pub const MaxPending: u16 = 32; + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const MaxPending: u16 = 32; } /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - scale_info::TypeInfo, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { - Any = 0, - NonTransfer = 1, - Governance = 2, - Staking = 3, - // Skip 4 as it is now removed (was SudoBalances) - IdentityJudgement = 5, - CancelProxy = 6, - Auction = 7, - NominationPools = 8, + Any = 0, + NonTransfer = 1, + Governance = 2, + Staking = 3, + // Skip 4 as it is now removed (was SudoBalances) + IdentityJudgement = 5, + CancelProxy = 6, + Auction = 7, + NominationPools = 8, } #[cfg(test)] mod proxy_type_tests { - use super::*; - - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] - pub enum OldProxyType { - Any, - NonTransfer, - Governance, - Staking, - SudoBalances, - IdentityJudgement, - } - - #[test] - fn proxy_type_decodes_correctly() { - for (i, j) in vec![ - (OldProxyType::Any, ProxyType::Any), - (OldProxyType::NonTransfer, ProxyType::NonTransfer), - (OldProxyType::Governance, ProxyType::Governance), - (OldProxyType::Staking, ProxyType::Staking), - (OldProxyType::IdentityJudgement, ProxyType::IdentityJudgement), - ] - .into_iter() - { - assert_eq!(i.encode(), j.encode()); - } - assert!(ProxyType::decode(&mut &OldProxyType::SudoBalances.encode()[..]).is_err()); - } + use super::*; + + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] + pub enum OldProxyType { + Any, + NonTransfer, + Governance, + Staking, + SudoBalances, + IdentityJudgement, + } + + #[test] + fn proxy_type_decodes_correctly() { + for (i, j) in vec![ + (OldProxyType::Any, ProxyType::Any), + (OldProxyType::NonTransfer, ProxyType::NonTransfer), + (OldProxyType::Governance, ProxyType::Governance), + (OldProxyType::Staking, ProxyType::Staking), + ( + OldProxyType::IdentityJudgement, + ProxyType::IdentityJudgement, + ), + ] + .into_iter() + { + assert_eq!(i.encode(), j.encode()); + } + assert!(ProxyType::decode(&mut &OldProxyType::SudoBalances.encode()[..]).is_err()); + } } impl Default for ProxyType { - fn default() -> Self { - Self::Any - } + fn default() -> Self { + Self::Any + } } impl InstanceFilter for ProxyType { - fn filter(&self, c: &RuntimeCall) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => matches!( - c, - RuntimeCall::System(..) | + fn filter(&self, c: &RuntimeCall) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => matches!( + c, + RuntimeCall::System(..) | RuntimeCall::Scheduler(..) | RuntimeCall::Babe(..) | RuntimeCall::Timestamp(..) | @@ -1163,452 +1171,465 @@ impl InstanceFilter for ProxyType { RuntimeCall::VoterList(..) | RuntimeCall::NominationPools(..) | RuntimeCall::FastUnstake(..) - ), - ProxyType::Governance => matches!( - c, - RuntimeCall::Treasury(..) | - RuntimeCall::Bounties(..) | - RuntimeCall::Utility(..) | - RuntimeCall::ChildBounties(..) | - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda(..) | - RuntimeCall::Whitelist(..) - ), - ProxyType::Staking => { - matches!( - c, - RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | RuntimeCall::Utility(..) | - RuntimeCall::FastUnstake(..) | - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools(..) - ) - }, - ProxyType::NominationPools => { - matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) - }, - ProxyType::IdentityJudgement => matches!( - c, - RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | - RuntimeCall::Utility(..) - ), - ProxyType::CancelProxy => { - matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) - }, - ProxyType::Auction => matches!( - c, - RuntimeCall::Auctions(..) | - RuntimeCall::Crowdloan(..) | - RuntimeCall::Registrar(..) | - RuntimeCall::Slots(..) - ), - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } + ), + ProxyType::Governance => matches!( + c, + RuntimeCall::Treasury(..) + | RuntimeCall::Bounties(..) + | RuntimeCall::Utility(..) + | RuntimeCall::ChildBounties(..) + | RuntimeCall::ConvictionVoting(..) + | RuntimeCall::Referenda(..) + | RuntimeCall::Whitelist(..) + ), + ProxyType::Staking => { + matches!( + c, + RuntimeCall::Staking(..) + | RuntimeCall::Session(..) + | RuntimeCall::Utility(..) + | RuntimeCall::FastUnstake(..) + | RuntimeCall::VoterList(..) + | RuntimeCall::NominationPools(..) + ) + } + ProxyType::NominationPools => { + matches!( + c, + RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..) + ) + } + ProxyType::IdentityJudgement => matches!( + c, + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) + | RuntimeCall::Utility(..) + ), + ProxyType::CancelProxy => { + matches!( + c, + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) + ) + } + ProxyType::Auction => matches!( + c, + RuntimeCall::Auctions(..) + | RuntimeCall::Crowdloan(..) + | RuntimeCall::Registrar(..) + | RuntimeCall::Slots(..) + ), + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } } impl pallet_proxy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = MaxProxies; + type WeightInfo = weights::pallet_proxy::WeightInfo; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; } impl parachains_origin::Config for Runtime {} impl parachains_configuration::Config for Runtime { - type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; + type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; } impl parachains_shared::Config for Runtime {} impl parachains_session_info::Config for Runtime { - type ValidatorSet = Historical; + type ValidatorSet = Historical; } impl parachains_inclusion::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DisputesHandler = ParasDisputes; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type MessageQueue = MessageQueue; - type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type DisputesHandler = ParasDisputes; + type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { - pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); + pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); } impl parachains_paras::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::runtime_parachains_paras::WeightInfo; - type UnsignedPriority = ParasUnsignedPriority; - type QueueFootprinter = ParaInclusion; - type NextSessionRotation = Babe; - type OnNewHead = Registrar; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::runtime_parachains_paras::WeightInfo; + type UnsignedPriority = ParasUnsignedPriority; + type QueueFootprinter = ParaInclusion; + type NextSessionRotation = Babe; + type OnNewHead = Registrar; } parameter_types! { - /// Amount of weight that can be spent per block to service messages. - /// - /// # WARNING - /// - /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 8; + /// Amount of weight that can be spent per block to service messages. + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - meter: &mut WeightMeter, - id: &mut [u8; 32], - ) -> Result { - let para = match origin { - AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, - }; - xcm_builder::ProcessXcmMessage::< - Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, Junction::Parachain(para.into()), meter, id) - } + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + id: &mut [u8; 32], + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter, id) + } } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = MessageQueueHeapSize; - type MaxStale = MessageQueueMaxStale; - type ServiceWeight = MessageQueueServiceWeight; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = MessageProcessor; - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = ParaInclusion; - type QueuePausedQuery = (); - type WeightInfo = weights::pallet_message_queue::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = ParaInclusion; + type QueuePausedQuery = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type ChannelManager = EitherOf, GeneralAdmin>; - type Currency = Balances; - type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type ChannelManager = EitherOf, GeneralAdmin>; + type Currency = Balances; + type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } impl parachains_paras_inherent::Config for Runtime { - type WeightInfo = weights::runtime_parachains_paras_inherent::WeightInfo; + type WeightInfo = weights::runtime_parachains_paras_inherent::WeightInfo; } impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; + type AssignmentProvider = ParaAssignmentProvider; } impl parachains_assigner_parachains::Config for Runtime {} impl parachains_initializer::Config for Runtime { - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type ForceOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; + type ForceOrigin = EnsureRoot; + type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; } impl parachains_disputes::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes; - type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes; + type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; } impl parachains_slashing::Config for Runtime { - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleReports = parachains_slashing::SlashingReportHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; - type WeightInfo = weights::runtime_parachains_disputes_slashing::WeightInfo; - type BenchmarkingConfig = parachains_slashing::BenchConfig<1000>; + type KeyOwnerProofSystem = Historical; + type KeyOwnerProof = + >::Proof; + type KeyOwnerIdentification = >::IdentificationTuple; + type HandleReports = parachains_slashing::SlashingReportHandler< + Self::KeyOwnerIdentification, + Offences, + ReportLongevity, + >; + type WeightInfo = weights::runtime_parachains_disputes_slashing::WeightInfo; + type BenchmarkingConfig = parachains_slashing::BenchConfig<1000>; } parameter_types! { - // Mostly arbitrary deposit price, but should provide an adequate incentive not to spam reserve - // `ParaId`s. - pub const ParaDeposit: Balance = 100 * DOLLARS; - pub const ParaDataByteDeposit: Balance = deposit(0, 1); + // Mostly arbitrary deposit price, but should provide an adequate incentive not to spam reserve + // `ParaId`s. + pub const ParaDeposit: Balance = 100 * DOLLARS; + pub const ParaDataByteDeposit: Balance = deposit(0, 1); } impl paras_registrar::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type OnSwap = (Crowdloan, Slots); - type ParaDeposit = ParaDeposit; - type DataDepositPerByte = ParaDataByteDeposit; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type OnSwap = (Crowdloan, Slots); + type ParaDeposit = ParaDeposit; + type DataDepositPerByte = ParaDataByteDeposit; + type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; } parameter_types! { - // 12 weeks = 3 months per lease period -> 8 lease periods ~ 2 years - pub LeasePeriod: BlockNumber = prod_or_fast!(12 * WEEKS, 12 * WEEKS, "DOT_LEASE_PERIOD"); - // Polkadot Genesis was on May 26, 2020. - // Target Parachain Onboarding Date: Dec 15, 2021. - // Difference is 568 days. - // We want a lease period to start on the target onboarding date. - // 568 % (12 * 7) = 64 day offset - pub LeaseOffset: BlockNumber = prod_or_fast!(64 * DAYS, 0, "DOT_LEASE_OFFSET"); + // 12 weeks = 3 months per lease period -> 8 lease periods ~ 2 years + pub LeasePeriod: BlockNumber = prod_or_fast!(1 * WEEKS, 1 * DAYS, "DOT_LEASE_PERIOD"); } impl slots::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Registrar = Registrar; - type LeasePeriod = LeasePeriod; - type LeaseOffset = LeaseOffset; - type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type Registrar = Registrar; + type LeasePeriod = LeasePeriod; + type LeaseOffset = (); + type ForceOrigin = EitherOf, LeaseAdmin>; + type WeightInfo = weights::runtime_common_slots::WeightInfo; } parameter_types! { - pub const CrowdloanId: PalletId = PalletId(*b"py/cfund"); - // Accounts for 10_000 contributions, each using 48 bytes (16 bytes for balance, and 32 bytes - // for a memo). - pub const SubmissionDeposit: Balance = deposit(1, 480_000); - // The minimum crowdloan contribution. - pub const MinContribution: Balance = 5 * DOLLARS; - pub const RemoveKeysLimit: u32 = 1000; - // Allow 32 bytes for an additional memo to a crowdloan. - pub const MaxMemoLength: u8 = 32; + pub const CrowdloanId: PalletId = PalletId(*b"py/cfund"); + // Accounts for 10_000 contributions, each using 48 bytes (16 bytes for balance, and 32 bytes + // for a memo). + pub const SubmissionDeposit: Balance = deposit(1, 480_000); + // The minimum crowdloan contribution. + pub const MinContribution: Balance = 5 * DOLLARS; + pub const RemoveKeysLimit: u32 = 1000; + // Allow 32 bytes for an additional memo to a crowdloan. + pub const MaxMemoLength: u8 = 32; } impl crowdloan::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = CrowdloanId; - type SubmissionDeposit = SubmissionDeposit; - type MinContribution = MinContribution; - type RemoveKeysLimit = RemoveKeysLimit; - type Registrar = Registrar; - type Auctioneer = Auctions; - type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type PalletId = CrowdloanId; + type SubmissionDeposit = SubmissionDeposit; + type MinContribution = MinContribution; + type RemoveKeysLimit = RemoveKeysLimit; + type Registrar = Registrar; + type Auctioneer = Auctions; + type MaxMemoLength = MaxMemoLength; + type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; } parameter_types! { - // The average auction is 7 days long, so this will be 70% for ending period. - // 5 Days = 72000 Blocks @ 6 sec per block - pub const EndingPeriod: BlockNumber = 5 * DAYS; - // ~ 1000 samples per day -> ~ 20 blocks per sample -> 2 minute samples - pub const SampleLength: BlockNumber = 2 * MINUTES; + // The average auction is 7 days long, so this will be 70% for ending period. + // 5 Days = 72000 Blocks @ 6 sec per block + pub const EndingPeriod: BlockNumber = 5 * DAYS; + // ~ 1000 samples per day -> ~ 20 blocks per sample -> 2 minute samples + pub const SampleLength: BlockNumber = 2 * MINUTES; } impl auctions::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Leaser = Slots; - type Registrar = Registrar; - type EndingPeriod = EndingPeriod; - type SampleLength = SampleLength; - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Leaser = Slots; + type Registrar = Registrar; + type EndingPeriod = EndingPeriod; + type SampleLength = SampleLength; + type Randomness = pallet_babe::RandomnessFromOneEpochAgo; + type InitiateOrigin = EitherOf, AuctionAdmin>; + type WeightInfo = weights::runtime_common_auctions::WeightInfo; } parameter_types! { - pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); - // Allow pools that got slashed up to 90% to remain operational. - pub const MaxPointsToBalance: u8 = 10; + pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); + // Allow pools that got slashed up to 90% to remain operational. + pub const MaxPointsToBalance: u8 = 10; } impl pallet_nomination_pools::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type RuntimeFreezeReason = RuntimeFreezeReason; - type RewardCounter = FixedU128; - type BalanceToU256 = runtime_common::BalanceToU256; - type U256ToBalance = runtime_common::U256ToBalance; - type Staking = Staking; - type PostUnbondingPoolsWindow = frame_support::traits::ConstU32<4>; - type MaxMetadataLen = frame_support::traits::ConstU32<256>; - // we use the same number of allowed unlocking chunks as with staking. - type MaxUnbonding = ::MaxUnlockingChunks; - type PalletId = PoolsPalletId; - type MaxPointsToBalance = MaxPointsToBalance; - type WeightInfo = weights::pallet_nomination_pools::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type RuntimeFreezeReason = RuntimeFreezeReason; + type RewardCounter = FixedU128; + type BalanceToU256 = runtime_common::BalanceToU256; + type U256ToBalance = runtime_common::U256ToBalance; + type Staking = Staking; + type PostUnbondingPoolsWindow = frame_support::traits::ConstU32<4>; + type MaxMetadataLen = frame_support::traits::ConstU32<256>; + // we use the same number of allowed unlocking chunks as with staking. + type MaxUnbonding = ::MaxUnlockingChunks; + type PalletId = PoolsPalletId; + type MaxPointsToBalance = MaxPointsToBalance; + type WeightInfo = weights::pallet_nomination_pools::WeightInfo; } pub struct InitiateNominationPools; impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - // 5 DOT to join a pool. - pallet_nomination_pools::MinJoinBond::::put(5 * UNITS); - // 100 DOT to create a pool. - pallet_nomination_pools::MinCreateBond::::put(100 * UNITS); - - // Initialize with limits for now. - pallet_nomination_pools::MaxPools::::put(0); - pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); - pallet_nomination_pools::MaxPoolMembers::::put(0); - - log::info!(target: LOG_TARGET, "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: LOG_TARGET, "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // we use one as an indicator if this has already been set. + if pallet_nomination_pools::MaxPools::::get().is_none() { + // 5 PAS to join a pool. + pallet_nomination_pools::MinJoinBond::::put(5 * UNITS); + // 100 PAS to create a pool. + pallet_nomination_pools::MinCreateBond::::put(100 * UNITS); + + // Initialize with limits for now. + pallet_nomination_pools::MaxPools::::put(0); + pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); + pallet_nomination_pools::MaxPoolMembers::::put(0); + + log::info!(target: LOG_TARGET, "pools config initiated 🎉"); + ::DbWeight::get().reads_writes(1, 5) + } else { + log::info!(target: LOG_TARGET, "pools config already initiated 😏"); + ::DbWeight::get().reads(1) + } + } } impl pallet_asset_rate::Config for Runtime { - type WeightInfo = weights::pallet_asset_rate::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type CreateOrigin = EitherOfDiverse, Treasurer>; - type RemoveOrigin = EitherOfDiverse, Treasurer>; - type UpdateOrigin = EitherOfDiverse, Treasurer>; - type Currency = Balances; - type AssetKind = ::AssetKind; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; + type WeightInfo = weights::pallet_asset_rate::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EitherOfDiverse, Treasurer>; + type RemoveOrigin = EitherOfDiverse, Treasurer>; + type UpdateOrigin = EitherOfDiverse, Treasurer>; + type Currency = Balances; + type AssetKind = ::AssetKind; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; } +impl pallet_sudo::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type WeightInfo = weights::pallet_sudo::WeightInfo; +} + +impl paras_sudo_wrapper::Config for Runtime {} + construct_runtime! { - pub enum Runtime - { - // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 1, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 10, - - // Babe must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, - - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 4, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 5, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 32, - - // Consensus support. - // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. - Authorship: pallet_authorship::{Pallet, Storage} = 6, - Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 7, - Offences: pallet_offences::{Pallet, Storage, Event} = 8, - Historical: session_historical::{Pallet} = 33, - - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 9, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 11, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 12, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 13, - - // OpenGov stuff. - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 19, - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, - Origins: pallet_custom_origins::{Origin} = 22, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 23, - - // Claims. Usable initially. - Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 24, - // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 25, - // Cunning utilities. Usable initially. - Utility: pallet_utility::{Pallet, Call, Event} = 26, - - // Identity. Late addition. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 28, - - // Proxy module. Late addition. - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 29, - - // Multisig dispatch. Late addition. - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 30, - - // Bounties modules. - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 34, - ChildBounties: pallet_child_bounties = 38, - - // Election pallet. Only works with staking, but placed here to maintain indices. - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 36, - - // Provides a semi-sorted list of nominators for staking. - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, - - // Nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, - - // Fast unstake pallet: extension to staking. - FastUnstake: pallet_fast_unstake = 40, - - // Parachains pallets. Start indices at 50 to leave room. - ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, - ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, - ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, - Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - Dmp: parachains_dmp::{Pallet, Storage} = 58, - // Ump 59 - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, - ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, - ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, - ParaAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64, - - // Parachain Onboarding Pallets. Start indices at 70 to leave room. - Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, - Slots: slots::{Pallet, Call, Storage, Event} = 71, - Auctions: auctions::{Pallet, Call, Storage, Event} = 72, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, - - // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, - - // Generalized message queue - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, - - // Asset rate. - AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, - - // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, - // MMR leaf construction must be after session in order to have a leaf's next_auth_set - // refer to block. See issue #160 for details. - Mmr: pallet_mmr = 201, - BeefyMmrLeaf: pallet_beefy_mmr = 202, - } + pub enum Runtime + { + // Basic stuff; balances is uncallable initially. + System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 1, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 10, + + // Babe must be before session. + Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, + + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, + Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 4, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 5, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 32, + + // Consensus support. + // Authorship must be before session in order to note author in the correct session and era + // for im-online and staking. + Authorship: pallet_authorship::{Pallet, Storage} = 6, + Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 7, + Offences: pallet_offences::{Pallet, Storage, Event} = 8, + Historical: session_historical::{Pallet} = 33, + + Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 9, + Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 11, + ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 12, + AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 13, + + // OpenGov stuff. + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 19, + ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, + Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, + Origins: pallet_custom_origins::{Origin} = 22, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 23, + + // Claims. Usable initially. + Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 24, + // Vesting. Usable initially, but removed once all vesting is finished. + Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 25, + // Cunning utilities. Usable initially. + Utility: pallet_utility::{Pallet, Call, Event} = 26, + + // Identity. Late addition. + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 28, + + // Proxy module. Late addition. + Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 29, + + // Multisig dispatch. Late addition. + Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 30, + + // Bounties modules. + Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 34, + ChildBounties: pallet_child_bounties = 38, + + // Election pallet. Only works with staking, but placed here to maintain indices. + ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 36, + + // Provides a semi-sorted list of nominators for staking. + VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 37, + + // Nomination pools: extension to staking. + NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 39, + + // Fast unstake pallet: extension to staking. + FastUnstake: pallet_fast_unstake = 40, + + // Parachains pallets. Start indices at 50 to leave room. + ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, + Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, + ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, + ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, + ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, + ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, + Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, + Dmp: parachains_dmp::{Pallet, Storage} = 58, + // Ump 59 + Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, + ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, + ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, + ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, + ParaAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64, + + // Parachain Onboarding Pallets. Start indices at 70 to leave room. + Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, + Slots: slots::{Pallet, Call, Storage, Event} = 71, + Auctions: auctions::{Pallet, Call, Storage, Event} = 72, + Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, + + // Pallet for sending XCM. + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + + // Generalized message queue + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, + + // Asset rate. + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, + + // BEEFY Bridges support. + Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, + // MMR leaf construction must be after session in order to have a leaf's next_auth_set + // refer to block. See issue #160 for details. + Mmr: pallet_mmr = 201, + BeefyMmrLeaf: pallet_beefy_mmr = 202, + + // Sudo. + ParaSudoWrapper: paras_sudo_wrapper = 250, + Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, + } } /// The address format for describing accounts. @@ -1623,22 +1644,22 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckMortality, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - claims::PrevalidateAttests, + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckMortality, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, + claims::PrevalidateAttests, ); pub struct NominationPoolsMigrationV4OldPallet; impl Get for NominationPoolsMigrationV4OldPallet { - fn get() -> Perbill { - Perbill::zero() - } + fn get() -> Perbill { + Perbill::zero() + } } /// All migrations that will run on the next runtime upgrade. @@ -1656,15 +1677,15 @@ pub mod migrations { /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Migrations, + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, >; /// The payload being signed in transactions. @@ -1672,1106 +1693,1144 @@ pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] mod benches { - frame_benchmarking::define_benchmarks!( - // Polkadot - // NOTE: Make sure to prefix these with `runtime_common::` so - // the that path resolves correctly in the generated file. - [runtime_common::auctions, Auctions] - [runtime_common::claims, Claims] - [runtime_common::crowdloan, Crowdloan] - [runtime_common::slots, Slots] - [runtime_common::paras_registrar, Registrar] - [runtime_parachains::configuration, Configuration] - [runtime_parachains::disputes, ParasDisputes] - [runtime_parachains::disputes::slashing, ParasSlashing] - [runtime_parachains::hrmp, Hrmp] - [runtime_parachains::inclusion, ParaInclusion] - [runtime_parachains::initializer, Initializer] - [runtime_parachains::paras, Paras] - [runtime_parachains::paras_inherent, ParaInherent] - // Substrate - [pallet_bags_list, VoterList] - [pallet_balances, Balances] - [frame_benchmarking::baseline, Baseline::] - [pallet_bounties, Bounties] - [pallet_child_bounties, ChildBounties] - [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] - [frame_election_provider_support, ElectionProviderBench::] - [pallet_fast_unstake, FastUnstake] - [pallet_identity, Identity] - [pallet_im_online, ImOnline] - [pallet_indices, Indices] - [pallet_message_queue, MessageQueue] - [pallet_multisig, Multisig] - [pallet_nomination_pools, NominationPoolsBench::] - [pallet_offences, OffencesBench::] - [pallet_preimage, Preimage] - [pallet_proxy, Proxy] - [pallet_scheduler, Scheduler] - [pallet_session, SessionBench::] - [pallet_staking, Staking] - [frame_system, SystemBench::] - [pallet_timestamp, Timestamp] - [pallet_treasury, Treasury] - [pallet_utility, Utility] - [pallet_vesting, Vesting] - [pallet_conviction_voting, ConvictionVoting] - [pallet_referenda, Referenda] - [pallet_whitelist, Whitelist] - [pallet_asset_rate, AssetRate] - // XCM - [pallet_xcm, XcmPallet] - [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] - [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] - ); + frame_benchmarking::define_benchmarks!( + // Paseo + // NOTE: Make sure to prefix these with `runtime_common::` so + // the that path resolves correctly in the generated file. + [runtime_common::auctions, Auctions] + [runtime_common::claims, Claims] + [runtime_common::crowdloan, Crowdloan] + [runtime_common::slots, Slots] + [runtime_common::paras_registrar, Registrar] + [runtime_parachains::configuration, Configuration] + [runtime_parachains::disputes, ParasDisputes] + [runtime_parachains::disputes::slashing, ParasSlashing] + [runtime_parachains::hrmp, Hrmp] + [runtime_parachains::inclusion, ParaInclusion] + [runtime_parachains::initializer, Initializer] + [runtime_parachains::paras, Paras] + [runtime_parachains::paras_inherent, ParaInherent] + // Substrate + [pallet_bags_list, VoterList] + [pallet_balances, Balances] + [frame_benchmarking::baseline, Baseline::] + [pallet_bounties, Bounties] + [pallet_child_bounties, ChildBounties] + [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] + [frame_election_provider_support, ElectionProviderBench::] + [pallet_fast_unstake, FastUnstake] + [pallet_identity, Identity] + [pallet_im_online, ImOnline] + [pallet_indices, Indices] + [pallet_message_queue, MessageQueue] + [pallet_multisig, Multisig] + [pallet_nomination_pools, NominationPoolsBench::] + [pallet_offences, OffencesBench::] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [pallet_session, SessionBench::] + [pallet_staking, Staking] + [frame_system, SystemBench::] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + [pallet_vesting, Vesting] + [pallet_conviction_voting, ConvictionVoting] + [pallet_referenda, Referenda] + [pallet_whitelist, Whitelist] + [pallet_asset_rate, AssetRate] + // XCM + [pallet_xcm, XcmPallet] + [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] + [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + // Sudo + [pallet_sudo, Sudo] + ); } sp_api::impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl block_builder_api::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: inherents::InherentData, - ) -> inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl pallet_nomination_pools_runtime_api::NominationPoolsApi< - Block, - AccountId, - Balance, - > for Runtime { - fn pending_rewards(member: AccountId) -> Balance { - NominationPools::api_pending_rewards(member).unwrap_or_default() - } - - fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { - NominationPools::api_points_to_balance(pool_id, points) - } - - fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { - NominationPools::api_balance_to_points(pool_id, new_funds) - } - } - - impl pallet_staking_runtime_api::StakingApi for Runtime { - fn nominations_quota(balance: Balance) -> u32 { - Staking::api_nominations_quota(balance) - } - } - - impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl offchain_primitives::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl primitives::runtime_api::ParachainHost for Runtime { - fn validators() -> Vec { - parachains_runtime_api_impl::validators::() - } - - fn validator_groups() -> (Vec>, GroupRotationInfo) { - parachains_runtime_api_impl::validator_groups::() - } - - fn availability_cores() -> Vec> { - parachains_runtime_api_impl::availability_cores::() - } - - fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option> { - parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) - } - - fn assumed_validation_data( - para_id: ParaId, - expected_persisted_validation_data_hash: Hash, - ) -> Option<(PersistedValidationData, ValidationCodeHash)> { - parachains_runtime_api_impl::assumed_validation_data::( - para_id, - expected_persisted_validation_data_hash, - ) - } - - fn check_validation_outputs( - para_id: ParaId, - outputs: primitives::CandidateCommitments, - ) -> bool { - parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) - } - - fn session_index_for_child() -> SessionIndex { - parachains_runtime_api_impl::session_index_for_child::() - } - - fn validation_code(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option { - parachains_runtime_api_impl::validation_code::(para_id, assumption) - } - - fn candidate_pending_availability(para_id: ParaId) -> Option> { - parachains_runtime_api_impl::candidate_pending_availability::(para_id) - } - - fn candidate_events() -> Vec> { - parachains_runtime_api_impl::candidate_events::(|ev| { - match ev { - RuntimeEvent::ParaInclusion(ev) => { - Some(ev) - } - _ => None, - } - }) - } - - fn session_info(index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_info::(index) - } - - fn session_executor_params(session_index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_executor_params::(session_index) - } - - fn dmq_contents(recipient: ParaId) -> Vec> { - parachains_runtime_api_impl::dmq_contents::(recipient) - } - - fn inbound_hrmp_channels_contents( - recipient: ParaId - ) -> BTreeMap>> { - parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) - } - - fn validation_code_by_hash(hash: ValidationCodeHash) -> Option { - parachains_runtime_api_impl::validation_code_by_hash::(hash) - } - - fn on_chain_votes() -> Option> { - parachains_runtime_api_impl::on_chain_votes::() - } - - fn submit_pvf_check_statement( - stmt: primitives::PvfCheckStatement, - signature: primitives::ValidatorSignature, - ) { - parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) - } - - fn pvfs_require_precheck() -> Vec { - parachains_runtime_api_impl::pvfs_require_precheck::() - } - - fn validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option - { - parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) - } - - fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { - parachains_runtime_api_impl::get_session_disputes::() - } - - fn unapplied_slashes( - ) -> Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)> { - parachains_runtime_api_impl::unapplied_slashes::() - } - - fn key_ownership_proof( - validator_id: ValidatorId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) - .map(|p| p.encode()) - .map(slashing::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_dispute_lost( - dispute_proof: slashing::DisputeProof, - key_ownership_proof: slashing::OpaqueKeyOwnershipProof, - ) -> Option<()> { - parachains_runtime_api_impl::submit_unsigned_slashing_report::( - dispute_proof, - key_ownership_proof, - ) - } - } - - impl beefy_primitives::BeefyApi for Runtime { - fn beefy_genesis() -> Option { - Beefy::genesis_block() - } - - fn validator_set() -> Option> { - Beefy::validator_set() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< - BlockNumber, - BeefyId, - BeefySignature, - >, - key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Beefy::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: beefy_primitives::ValidatorSetId, - authority_id: BeefyId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(beefy_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl mmr::MmrApi for Runtime { - fn mmr_root() -> Result { - Ok(Mmr::mmr_root()) - } - - fn mmr_leaf_count() -> Result { - Ok(Mmr::mmr_leaves()) - } - - fn generate_proof( - block_numbers: Vec, - best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Mmr::generate_proof(block_numbers, best_known_block_number).map( - |(leaves, proof)| { - ( - leaves - .into_iter() - .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) - .collect(), - proof, - ) - }, - ) - } - - fn verify_proof(leaves: Vec, proof: mmr::Proof) - -> Result<(), mmr::Error> - { - let leaves = leaves.into_iter().map(|leaf| - leaf.into_opaque_leaf() - .try_decode() - .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; - Mmr::verify_leaves(leaves, proof) - } - - fn verify_proof_stateless( - root: mmr::Hash, - leaves: Vec, - proof: mmr::Proof - ) -> Result<(), mmr::Error> { - let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); - pallet_mmr::verify_leaves_proof::(root, nodes, proof) - } - } - - impl pallet_beefy_mmr::BeefyMmrApi for RuntimeApi { - fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet { - BeefyMmrLeaf::authority_set_proof() - } - - fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet { - BeefyMmrLeaf::next_authority_set_proof() - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> Vec<(GrandpaId, u64)> { - Grandpa::grandpa_authorities() - } - - fn current_set_id() -> fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - sp_runtime::traits::NumberFor, - >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Grandpa::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - authority_id: fg_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((fg_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(fg_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl babe_primitives::BabeApi for Runtime { - fn configuration() -> babe_primitives::BabeConfiguration { - let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); - babe_primitives::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: epoch_config.c, - authorities: Babe::authorities().to_vec(), - randomness: Babe::randomness(), - allowed_slots: epoch_config.allowed_slots, - } - } - - fn current_epoch_start() -> babe_primitives::Slot { - Babe::current_epoch_start() - } - - fn current_epoch() -> babe_primitives::Epoch { - Babe::current_epoch() - } - - fn next_epoch() -> babe_primitives::Epoch { - Babe::next_epoch() - } - - fn generate_key_ownership_proof( - _slot: babe_primitives::Slot, - authority_id: babe_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((babe_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(babe_primitives::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: babe_primitives::EquivocationProof<::Header>, - key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Babe::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - } - - impl authority_discovery_primitives::AuthorityDiscoveryApi for Runtime { - fn authorities() -> Vec { - parachains_runtime_api_impl::relevant_authority_ids::() - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< - Block, - Balance, - > for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi - for Runtime - { - fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_call_info(call, len) - } - fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { - TransactionPayment::query_call_fee_details(call, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() - } - - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - log::info!(target: LOG_TARGET, "try-runtime::on_runtime_upgrade polkadot."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, BlockWeights::get().max_block) - } - - fn execute_block( - block: Block, - state_root_check: bool, - signature_check: bool, - select: frame_try_runtime::TryStateSelect, - ) -> Weight { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. - Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_system_benchmarking::Pallet as SystemBench; - use frame_benchmarking::baseline::Pallet as Baseline; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - return (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result< - Vec, - sp_runtime::RuntimeString, - > { - use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; - use sp_storage::TrackedStorageKey; - // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. - // To get around that, we separated the benchmarks into its own crate. - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_system_benchmarking::Pallet as SystemBench; - use frame_benchmarking::baseline::Pallet as Baseline; - use xcm::latest::prelude::*; - use xcm_config::{XcmConfig, AssetHubLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; - - impl pallet_session_benchmarking::Config for Runtime {} - impl pallet_offences_benchmarking::Config for Runtime {} - impl pallet_election_provider_support_benchmarking::Config for Runtime {} - impl frame_system_benchmarking::Config for Runtime {} - impl frame_benchmarking::baseline::Config for Runtime {} - impl pallet_nomination_pools_benchmarking::Config for Runtime {} - impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} - - let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); - let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); - whitelist.push(treasury_key.to_vec().into()); - - parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( - TokenLocation::get(), - ExistentialDeposit::get() - ).into()); - pub ToParachain: ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - } - - impl pallet_xcm_benchmarks::Config for Runtime { - type XcmConfig = XcmConfig; - type AccountIdConverter = SovereignAccountOf; - type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< - XcmConfig, - ExistentialDepositMultiAsset, - xcm_config::PriceForChildParachainDelivery, - ToParachain, - (), - >; - fn valid_destination() -> Result { - Ok(AssetHubLocation::get()) - } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { - // Polkadot only knows about DOT - vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() - } - } - - parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( - AssetHubLocation::get(), - MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } - )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - } - - impl pallet_xcm_benchmarks::fungible::Config for Runtime { - type TransactAsset = Balances; - - type CheckedAccount = LocalCheckAccount; - type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; - - fn get_multi_asset() -> MultiAsset { - MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1 * UNITS) - } - } - } - - impl pallet_xcm_benchmarks::generic::Config for Runtime { - type TransactAsset = Balances; - type RuntimeCall = RuntimeCall; - - fn worst_case_response() -> (u64, Response) { - (0u64, Response::Version(Default::default())) - } - - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { - // Polkadot doesn't support asset exchanges - Err(BenchmarkError::Skip) - } - - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { - // The XCM executor of Polkadot doesn't have a configured `UniversalAliases` - Err(BenchmarkError::Skip) - } - - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) - } - - fn subscribe_origin() -> Result { - Ok(AssetHubLocation::get()) - } - - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = AssetHubLocation::get(); - let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; - Ok((origin, ticket, assets)) - } - - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } - - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { - // Polkadot doesn't support asset locking - Err(BenchmarkError::Skip) - } - - fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - // Polkadot doesn't support exporting messages - Err(BenchmarkError::Skip) - } - - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { - // The XCM executor of Polkadot doesn't have a configured `Aliasers` - Err(BenchmarkError::Skip) - } - } - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmarks!(params, batches); - - Ok(batches) - } - } + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block); + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } + } + + impl block_builder_api::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: inherents::InherentData, + ) -> inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl pallet_nomination_pools_runtime_api::NominationPoolsApi< + Block, + AccountId, + Balance, + > for Runtime { + fn pending_rewards(member: AccountId) -> Balance { + NominationPools::api_pending_rewards(member).unwrap_or_default() + } + + fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { + NominationPools::api_points_to_balance(pool_id, points) + } + + fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { + NominationPools::api_balance_to_points(pool_id, new_funds) + } + } + + impl pallet_staking_runtime_api::StakingApi for Runtime { + fn nominations_quota(balance: Balance) -> u32 { + Staking::api_nominations_quota(balance) + } + } + + impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl offchain_primitives::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl primitives::runtime_api::ParachainHost for Runtime { + fn validators() -> Vec { + parachains_runtime_api_impl::validators::() + } + + fn validator_groups() -> (Vec>, GroupRotationInfo) { + parachains_runtime_api_impl::validator_groups::() + } + + fn availability_cores() -> Vec> { + parachains_runtime_api_impl::availability_cores::() + } + + fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option> { + parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) + } + + fn assumed_validation_data( + para_id: ParaId, + expected_persisted_validation_data_hash: Hash, + ) -> Option<(PersistedValidationData, ValidationCodeHash)> { + parachains_runtime_api_impl::assumed_validation_data::( + para_id, + expected_persisted_validation_data_hash, + ) + } + + fn check_validation_outputs( + para_id: ParaId, + outputs: primitives::CandidateCommitments, + ) -> bool { + parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) + } + + fn session_index_for_child() -> SessionIndex { + parachains_runtime_api_impl::session_index_for_child::() + } + + fn validation_code(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option { + parachains_runtime_api_impl::validation_code::(para_id, assumption) + } + + fn candidate_pending_availability(para_id: ParaId) -> Option> { + parachains_runtime_api_impl::candidate_pending_availability::(para_id) + } + + fn candidate_events() -> Vec> { + parachains_runtime_api_impl::candidate_events::(|ev| { + match ev { + RuntimeEvent::ParaInclusion(ev) => { + Some(ev) + } + _ => None, + } + }) + } + + fn session_info(index: SessionIndex) -> Option { + parachains_runtime_api_impl::session_info::(index) + } + + fn session_executor_params(session_index: SessionIndex) -> Option { + parachains_runtime_api_impl::session_executor_params::(session_index) + } + + fn dmq_contents(recipient: ParaId) -> Vec> { + parachains_runtime_api_impl::dmq_contents::(recipient) + } + + fn inbound_hrmp_channels_contents( + recipient: ParaId + ) -> BTreeMap>> { + parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) + } + + fn validation_code_by_hash(hash: ValidationCodeHash) -> Option { + parachains_runtime_api_impl::validation_code_by_hash::(hash) + } + + fn on_chain_votes() -> Option> { + parachains_runtime_api_impl::on_chain_votes::() + } + + fn submit_pvf_check_statement( + stmt: primitives::PvfCheckStatement, + signature: primitives::ValidatorSignature, + ) { + parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) + } + + fn pvfs_require_precheck() -> Vec { + parachains_runtime_api_impl::pvfs_require_precheck::() + } + + fn validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) + -> Option + { + parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) + } + + fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { + parachains_runtime_api_impl::get_session_disputes::() + } + + fn unapplied_slashes( + ) -> Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)> { + parachains_runtime_api_impl::unapplied_slashes::() + } + + fn key_ownership_proof( + validator_id: ValidatorId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) + .map(|p| p.encode()) + .map(slashing::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_dispute_lost( + dispute_proof: slashing::DisputeProof, + key_ownership_proof: slashing::OpaqueKeyOwnershipProof, + ) -> Option<()> { + parachains_runtime_api_impl::submit_unsigned_slashing_report::( + dispute_proof, + key_ownership_proof, + ) + } + } + + impl beefy_primitives::BeefyApi for Runtime { + fn beefy_genesis() -> Option { + Beefy::genesis_block() + } + + fn validator_set() -> Option> { + Beefy::validator_set() + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: beefy_primitives::EquivocationProof< + BlockNumber, + BeefyId, + BeefySignature, + >, + key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Beefy::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + + fn generate_key_ownership_proof( + _set_id: beefy_primitives::ValidatorSetId, + authority_id: BeefyId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(beefy_primitives::OpaqueKeyOwnershipProof::new) + } + } + + impl mmr::MmrApi for Runtime { + fn mmr_root() -> Result { + Ok(Mmr::mmr_root()) + } + + fn mmr_leaf_count() -> Result { + Ok(Mmr::mmr_leaves()) + } + + fn generate_proof( + block_numbers: Vec, + best_known_block_number: Option, + ) -> Result<(Vec, mmr::Proof), mmr::Error> { + Mmr::generate_proof(block_numbers, best_known_block_number).map( + |(leaves, proof)| { + ( + leaves + .into_iter() + .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) + .collect(), + proof, + ) + }, + ) + } + + fn verify_proof(leaves: Vec, proof: mmr::Proof) + -> Result<(), mmr::Error> + { + let leaves = leaves.into_iter().map(|leaf| + leaf.into_opaque_leaf() + .try_decode() + .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; + Mmr::verify_leaves(leaves, proof) + } + + fn verify_proof_stateless( + root: mmr::Hash, + leaves: Vec, + proof: mmr::Proof + ) -> Result<(), mmr::Error> { + let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); + pallet_mmr::verify_leaves_proof::(root, nodes, proof) + } + } + + impl pallet_beefy_mmr::BeefyMmrApi for RuntimeApi { + fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet { + BeefyMmrLeaf::authority_set_proof() + } + + fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet { + BeefyMmrLeaf::next_authority_set_proof() + } + } + + impl fg_primitives::GrandpaApi for Runtime { + fn grandpa_authorities() -> Vec<(GrandpaId, u64)> { + Grandpa::grandpa_authorities() + } + + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: fg_primitives::EquivocationProof< + ::Hash, + sp_runtime::traits::NumberFor, + >, + key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Grandpa::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + + fn generate_key_ownership_proof( + _set_id: fg_primitives::SetId, + authority_id: fg_primitives::AuthorityId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((fg_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(fg_primitives::OpaqueKeyOwnershipProof::new) + } + } + + impl babe_primitives::BabeApi for Runtime { + fn configuration() -> babe_primitives::BabeConfiguration { + let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); + babe_primitives::BabeConfiguration { + slot_duration: Babe::slot_duration(), + epoch_length: EpochDuration::get(), + c: epoch_config.c, + authorities: Babe::authorities().to_vec(), + randomness: Babe::randomness(), + allowed_slots: epoch_config.allowed_slots, + } + } + + fn current_epoch_start() -> babe_primitives::Slot { + Babe::current_epoch_start() + } + + fn current_epoch() -> babe_primitives::Epoch { + Babe::current_epoch() + } + + fn next_epoch() -> babe_primitives::Epoch { + Babe::next_epoch() + } + + fn generate_key_ownership_proof( + _slot: babe_primitives::Slot, + authority_id: babe_primitives::AuthorityId, + ) -> Option { + use parity_scale_codec::Encode; + + Historical::prove((babe_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(babe_primitives::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_equivocation_unsigned_extrinsic( + equivocation_proof: babe_primitives::EquivocationProof<::Header>, + key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + let key_owner_proof = key_owner_proof.decode()?; + + Babe::submit_unsigned_equivocation_report( + equivocation_proof, + key_owner_proof, + ) + } + } + + impl authority_discovery_primitives::AuthorityDiscoveryApi for Runtime { + fn authorities() -> Vec { + parachains_runtime_api_impl::relevant_authority_ids::() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, sp_core::crypto::KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + log::info!(target: LOG_TARGET, "try-runtime::on_runtime_upgrade polkadot."); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, BlockWeights::get().max_block) + } + + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + + use pallet_session_benchmarking::Pallet as SessionBench; + use pallet_offences_benchmarking::Pallet as OffencesBench; + use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use frame_system_benchmarking::Pallet as SystemBench; + use frame_benchmarking::baseline::Pallet as Baseline; + + let mut list = Vec::::new(); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + return (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result< + Vec, + sp_runtime::RuntimeString, + > { + use frame_support::traits::WhitelistedStorageKeys; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use sp_storage::TrackedStorageKey; + // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. + // To get around that, we separated the benchmarks into its own crate. + use pallet_session_benchmarking::Pallet as SessionBench; + use pallet_offences_benchmarking::Pallet as OffencesBench; + use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use frame_system_benchmarking::Pallet as SystemBench; + use frame_benchmarking::baseline::Pallet as Baseline; + use xcm::latest::prelude::*; + use xcm_config::{XcmConfig, AssetHubLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf}; + + impl pallet_session_benchmarking::Config for Runtime {} + impl pallet_offences_benchmarking::Config for Runtime {} + impl pallet_election_provider_support_benchmarking::Config for Runtime {} + impl frame_system_benchmarking::Config for Runtime {} + impl frame_benchmarking::baseline::Config for Runtime {} + impl pallet_nomination_pools_benchmarking::Config for Runtime {} + impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + + let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); + let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); + whitelist.push(treasury_key.to_vec().into()); + + parameter_types! { + pub ExistentialDepositMultiAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub ToParachain: ParaId = paseo_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + } + + impl pallet_xcm_benchmarks::Config for Runtime { + type XcmConfig = XcmConfig; + type AccountIdConverter = SovereignAccountOf; + type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositMultiAsset, + xcm_config::PriceForChildParachainDelivery, + ToParachain, + (), + >; + fn valid_destination() -> Result { + Ok(AssetHubLocation::get()) + } + fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + // Paseo only knows about PAS + vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() + } + } + + parameter_types! { + pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + AssetHubLocation::get(), + MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } + )); + pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + } + + impl pallet_xcm_benchmarks::fungible::Config for Runtime { + type TransactAsset = Balances; + + type CheckedAccount = LocalCheckAccount; + type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; + + fn get_multi_asset() -> MultiAsset { + MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1 * UNITS) + } + } + } + + impl pallet_xcm_benchmarks::generic::Config for Runtime { + type TransactAsset = Balances; + type RuntimeCall = RuntimeCall; + + fn worst_case_response() -> (u64, Response) { + (0u64, Response::Version(Default::default())) + } + + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + // Paseo doesn't support asset exchanges + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + // The XCM executor of Paseo doesn't have a configured `UniversalAliases` + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + } + + fn subscribe_origin() -> Result { + Ok(AssetHubLocation::get()) + } + + fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + let origin = AssetHubLocation::get(); + let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let ticket = MultiLocation { parents: 0, interior: Here }; + Ok((origin, ticket, assets)) + } + + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + // Paseo doesn't support asset locking + Err(BenchmarkError::Skip) + } + + fn export_message_origin_and_destination( + ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + // Paseo doesn't support exporting messages + Err(BenchmarkError::Skip) + } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + // The XCM executor of Paseo doesn't have a configured `Aliasers` + Err(BenchmarkError::Skip) + } + } + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + + add_benchmarks!(params, batches); + + Ok(batches) + } + } } #[cfg(test)] mod test_fees { - use super::*; - use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; - use keyring::Sr25519Keyring::{Alice, Charlie}; - use pallet_transaction_payment::Multiplier; - use runtime_common::MinimumMultiplier; - use separator::Separatable; - use sp_runtime::{assert_eq_error_rate, FixedPointNumber, MultiAddress, MultiSignature}; - - #[test] - fn payout_weight_portion() { - use pallet_staking::WeightInfo; - let payout_weight = - ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), - ) - .ref_time() as f64; - let block_weight = BlockWeights::get().max_block.ref_time() as f64; - - println!( - "a full payout takes {:.2} of the block weight [{} / {}]", - payout_weight / block_weight, - payout_weight, - block_weight - ); - assert!(payout_weight * 2f64 < block_weight); - } - - #[test] - fn block_cost() { - let max_block_weight = BlockWeights::get().max_block; - let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); - - let fee_with_multiplier = |m: Multiplier| { - println!( + use super::*; + use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT}; + use keyring::Sr25519Keyring::{Alice, Charlie}; + use pallet_transaction_payment::Multiplier; + use runtime_common::MinimumMultiplier; + use separator::Separatable; + use sp_runtime::{assert_eq_error_rate, FixedPointNumber, MultiAddress, MultiSignature}; + + #[test] + fn payout_weight_portion() { + use pallet_staking::WeightInfo; + let payout_weight = + ::WeightInfo::payout_stakers_alive_staked( + MaxNominatorRewardedPerValidator::get(), + ) + .ref_time() as f64; + let block_weight = BlockWeights::get().max_block.ref_time() as f64; + + println!( + "a full payout takes {:.2} of the block weight [{} / {}]", + payout_weight / block_weight, + payout_weight, + block_weight + ); + assert!(payout_weight * 2f64 < block_weight); + } + + #[test] + fn block_cost() { + let max_block_weight = BlockWeights::get().max_block; + let raw_fee = WeightToFee::weight_to_fee(&max_block_weight); + + let fee_with_multiplier = |m: Multiplier| { + println!( "Full Block weight == {} // multiplier: {:?} // WeightToFee(full_block) == {} plank", max_block_weight, m, m.saturating_mul_int(raw_fee).separated_string(), ); - }; - fee_with_multiplier(MinimumMultiplier::get()); - fee_with_multiplier(Multiplier::from_rational(1, 2)); - fee_with_multiplier(Multiplier::from_u32(1)); - fee_with_multiplier(Multiplier::from_u32(2)); - } - - #[test] - fn transfer_cost_min_multiplier() { - let min_multiplier = MinimumMultiplier::get(); - let call = pallet_balances::Call::::transfer_keep_alive { - dest: Charlie.to_account_id().into(), - value: Default::default(), - }; - let info = call.get_dispatch_info(); - println!("call = {:?} / info = {:?}", call, info); - // convert to runtime call. - let call = RuntimeCall::Balances(call); - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::immortal()), - frame_system::CheckNonce::::from(1), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - claims::PrevalidateAttests::::new(), - ); - let uxt = UncheckedExtrinsic { - function: call, - signature: Some(( - MultiAddress::Id(Alice.to_account_id()), - MultiSignature::Sr25519(Alice.sign(b"foo")), - extra, - )), - }; - let len = uxt.encoded_size(); - - let mut ext = sp_io::TestExternalities::new_empty(); - let mut test_with_multiplier = |m: Multiplier| { - ext.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::put(m); - let fee = TransactionPayment::query_fee_details(uxt.clone(), len as u32); - println!( - "multiplier = {:?} // fee details = {:?} // final fee = {:?}", - pallet_transaction_payment::NextFeeMultiplier::::get(), - fee, - fee.final_fee().separated_string(), - ); - }); - }; - - test_with_multiplier(min_multiplier); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_0u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_00u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000u128)); - test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000_000u128)); - } - - #[test] - fn nominator_limit() { - use pallet_election_provider_multi_phase::WeightInfo; - // starting point of the nominators. - let target_voters: u32 = 50_000; - - // assuming we want around 5k candidates and 1k active validators. (March 31, 2021) - let all_targets: u32 = 5_000; - let desired: u32 = 1_000; - let weight_with = |active| { - ::WeightInfo::submit_unsigned( - active, - all_targets, - active, - desired, - ) - }; - - let mut active = target_voters; - while weight_with(active).all_lte(OffchainSolutionWeightLimit::get()) || - active == target_voters - { - active += 1; - } - - println!("can support {} nominators to yield a weight of {}", active, weight_with(active)); - assert!(active > target_voters, "we need to reevaluate the weight of the election system"); - } - - #[test] - fn signed_deposit_is_sensible() { - // ensure this number does not change, or that it is checked after each change. - // a 1 MB solution should take (40 + 10) DOTs of deposit. - let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); - assert_eq_error_rate!(deposit, 50 * DOLLARS, DOLLARS); - } + }; + fee_with_multiplier(MinimumMultiplier::get()); + fee_with_multiplier(Multiplier::from_rational(1, 2)); + fee_with_multiplier(Multiplier::from_u32(1)); + fee_with_multiplier(Multiplier::from_u32(2)); + } + + #[test] + fn transfer_cost_min_multiplier() { + let min_multiplier = MinimumMultiplier::get(); + let call = pallet_balances::Call::::transfer_keep_alive { + dest: Charlie.to_account_id().into(), + value: Default::default(), + }; + let info = call.get_dispatch_info(); + println!("call = {:?} / info = {:?}", call, info); + // convert to runtime call. + let call = RuntimeCall::Balances(call); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from(generic::Era::immortal()), + frame_system::CheckNonce::::from(1), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + claims::PrevalidateAttests::::new(), + ); + let uxt = UncheckedExtrinsic { + function: call, + signature: Some(( + MultiAddress::Id(Alice.to_account_id()), + MultiSignature::Sr25519(Alice.sign(b"foo")), + extra, + )), + }; + let len = uxt.encoded_size(); + + let mut ext = sp_io::TestExternalities::new_empty(); + let mut test_with_multiplier = |m: Multiplier| { + ext.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::put(m); + let fee = TransactionPayment::query_fee_details(uxt.clone(), len as u32); + println!( + "multiplier = {:?} // fee details = {:?} // final fee = {:?}", + pallet_transaction_payment::NextFeeMultiplier::::get(), + fee, + fee.final_fee().separated_string(), + ); + }); + }; + + test_with_multiplier(min_multiplier); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_0u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_00u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000u128)); + test_with_multiplier(Multiplier::saturating_from_rational(1u128, 1_000_000u128)); + test_with_multiplier(Multiplier::saturating_from_rational( + 1u128, + 1_000_000_000u128, + )); + } + + #[test] + fn nominator_limit() { + use pallet_election_provider_multi_phase::WeightInfo; + // starting point of the nominators. + let target_voters: u32 = 50_000; + + // assuming we want around 5k candidates and 1k active validators. (March 31, 2021) + let all_targets: u32 = 5_000; + let desired: u32 = 1_000; + let weight_with = |active| { + ::WeightInfo::submit_unsigned( + active, + all_targets, + active, + desired, + ) + }; + + let mut active = target_voters; + while weight_with(active).all_lte(OffchainSolutionWeightLimit::get()) + || active == target_voters + { + active += 1; + } + + println!( + "can support {} nominators to yield a weight of {}", + active, + weight_with(active) + ); + assert!( + active > target_voters, + "we need to reevaluate the weight of the election system" + ); + } + + #[test] + fn signed_deposit_is_sensible() { + // ensure this number does not change, or that it is checked after each change. + // a 1 MB solution should take (40 + 10) DOTs of deposit. + let deposit = SignedFixedDeposit::get() + (SignedDepositByte::get() * 1024 * 1024); + assert_eq_error_rate!(deposit, 50 * DOLLARS, DOLLARS); + } } #[cfg(test)] mod test { - use std::collections::HashSet; - - use super::*; - use frame_support::traits::WhitelistedStorageKeys; - use scale_info::TypeInfo; - use sp_core::hexdisplay::HexDisplay; - - #[test] - fn call_size() { - RuntimeCall::assert_size_under(256); - } - - #[test] - fn check_whitelist() { - let whitelist: HashSet = AllPalletsWithSystem::whitelisted_storage_keys() - .iter() - .map(|e| HexDisplay::from(&e.key).to_string()) - .collect(); - - // Block number - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac") - ); - // Total issuance - assert!( - whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80") - ); - // Execution phase - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a") - ); - // Event count - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850") - ); - // System events - assert!( - whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") - ); - // XcmPallet VersionDiscoveryQueue - assert!( - whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1") - ); - // XcmPallet SafeXcmVersion - assert!( - whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4") - ); - } - - #[test] - fn check_treasury_pallet_id() { - assert_eq!( - ::index() as u8, - polkadot_runtime_constants::TREASURY_PALLET_ID - ); - } - - #[test] - fn ensure_xcm_metadata_is_correct() { - let path = xcm::VersionedXcm::<()>::type_info().path; - // Ensure that the name doesn't include `staging` (from the pallet name) - assert_eq!(vec!["xcm", "VersionedXcm"], path.segments); - } + use std::collections::HashSet; + + use super::*; + use frame_support::traits::WhitelistedStorageKeys; + use scale_info::TypeInfo; + use sp_core::hexdisplay::HexDisplay; + + #[test] + fn call_size() { + RuntimeCall::assert_size_under(256); + } + + #[test] + fn check_whitelist() { + let whitelist: HashSet = AllPalletsWithSystem::whitelisted_storage_keys() + .iter() + .map(|e| HexDisplay::from(&e.key).to_string()) + .collect(); + + // Block number + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac") + ); + // Total issuance + assert!( + whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80") + ); + // Execution phase + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a") + ); + // Event count + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850") + ); + // System events + assert!( + whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") + ); + // XcmPallet VersionDiscoveryQueue + assert!( + whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1") + ); + // XcmPallet SafeXcmVersion + assert!( + whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4") + ); + } + + #[test] + fn check_treasury_pallet_id() { + assert_eq!( + ::index() as u8, + paseo_runtime_constants::TREASURY_PALLET_ID + ); + } + + #[test] + fn ensure_xcm_metadata_is_correct() { + let path = xcm::VersionedXcm::<()>::type_info().path; + // Ensure that the name doesn't include `staging` (from the pallet name) + assert_eq!(vec!["xcm", "VersionedXcm"], path.segments); + } } #[cfg(test)] mod multiplier_tests { - use super::*; - use frame_support::{ - dispatch::DispatchInfo, - traits::{OnFinalize, PalletInfoAccess}, - }; - use runtime_common::{MinimumMultiplier, TargetBlockFullness}; - use separator::Separatable; - use sp_runtime::traits::Convert; - - fn run_with_system_weight(w: Weight, mut assertions: F) - where - F: FnMut() -> (), - { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - t.execute_with(|| { - System::set_block_consumed_resources(w, 0); - assertions() - }); - } - - #[test] - fn multiplier_can_grow_from_zero() { - let minimum_multiplier = MinimumMultiplier::get(); - let target = TargetBlockFullness::get() * - BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); - // if the min is too small, then this will not change, and we are doomed forever. - // the weight is 1/100th bigger than target. - run_with_system_weight(target.saturating_mul(101) / 100, || { - let next = SlowAdjustingFeeUpdate::::convert(minimum_multiplier); - assert!(next > minimum_multiplier, "{:?} !>= {:?}", next, minimum_multiplier); - }) - } - - #[test] - fn fast_unstake_estimate() { - use pallet_fast_unstake::WeightInfo; - let block_time = BlockWeights::get().max_block.ref_time() as f32; - let on_idle = weights::pallet_fast_unstake::WeightInfo::::on_idle_check( - 300, - ::BatchSize::get(), - ) - .ref_time() as f32; - println!("ratio of block weight for full batch fast-unstake {}", on_idle / block_time); - assert!(on_idle / block_time <= 0.5f32) - } - - #[test] - fn treasury_pallet_index_is_correct() { - assert_eq!(TREASURY_PALLET_ID, ::index() as u8); - } - - #[test] - #[ignore] - fn multiplier_growth_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = MinimumMultiplier::get(); - let block_weight = BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); - let mut blocks = 0; - let mut fees_paid = 0; - - frame_system::Pallet::::set_block_consumed_resources(Weight::MAX, 0); - let info = DispatchInfo { weight: Weight::MAX, ..Default::default() }; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(MinimumMultiplier::get()); - }); - - while multiplier <= Multiplier::from_u32(1) { - t.execute_with(|| { - // imagine this tx was called. - let fee = TransactionPayment::compute_fee(0, &info, 0); - fees_paid += fee; - - // this will update the multiplier. - System::set_block_consumed_resources(block_weight, 0); - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next > multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!( - "block = {} / multiplier {:?} / fee = {:?} / fess so far {:?}", - blocks, - multiplier, - fee.separated_string(), - fees_paid.separated_string() - ); - }); - blocks += 1; - } - } - - #[test] - #[ignore] - fn multiplier_cool_down_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = Multiplier::from_u32(2); - let mut blocks = 0; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(multiplier); - }); - - while multiplier > Multiplier::from_u32(0) { - t.execute_with(|| { - // this will update the multiplier. - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next < multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!("block = {} / multiplier {:?}", blocks, multiplier); - }); - blocks += 1; - } - } + use super::*; + use frame_support::{ + dispatch::DispatchInfo, + traits::{OnFinalize, PalletInfoAccess}, + }; + use runtime_common::{MinimumMultiplier, TargetBlockFullness}; + use separator::Separatable; + use sp_runtime::traits::Convert; + + fn run_with_system_weight(w: Weight, mut assertions: F) + where + F: FnMut() -> (), + { + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + t.execute_with(|| { + System::set_block_consumed_resources(w, 0); + assertions() + }); + } + + #[test] + fn multiplier_can_grow_from_zero() { + let minimum_multiplier = MinimumMultiplier::get(); + let target = TargetBlockFullness::get() + * BlockWeights::get() + .get(DispatchClass::Normal) + .max_total + .unwrap(); + // if the min is too small, then this will not change, and we are doomed forever. + // the weight is 1/100th bigger than target. + run_with_system_weight(target.saturating_mul(101) / 100, || { + let next = SlowAdjustingFeeUpdate::::convert(minimum_multiplier); + assert!( + next > minimum_multiplier, + "{:?} !>= {:?}", + next, + minimum_multiplier + ); + }) + } + + #[test] + fn fast_unstake_estimate() { + use pallet_fast_unstake::WeightInfo; + let block_time = BlockWeights::get().max_block.ref_time() as f32; + let on_idle = weights::pallet_fast_unstake::WeightInfo::::on_idle_check( + 300, + ::BatchSize::get(), + ) + .ref_time() as f32; + println!( + "ratio of block weight for full batch fast-unstake {}", + on_idle / block_time + ); + assert!(on_idle / block_time <= 0.5f32) + } + + #[test] + fn treasury_pallet_index_is_correct() { + assert_eq!( + TREASURY_PALLET_ID, + ::index() as u8 + ); + } + + #[test] + #[ignore] + fn multiplier_growth_simulator() { + // assume the multiplier is initially set to its minimum. We update it with values twice the + //target (target is 25%, thus 50%) and we see at which point it reaches 1. + let mut multiplier = MinimumMultiplier::get(); + let block_weight = BlockWeights::get() + .get(DispatchClass::Normal) + .max_total + .unwrap(); + let mut blocks = 0; + let mut fees_paid = 0; + + frame_system::Pallet::::set_block_consumed_resources(Weight::MAX, 0); + let info = DispatchInfo { + weight: Weight::MAX, + ..Default::default() + }; + + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + // set the minimum + t.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::set(MinimumMultiplier::get()); + }); + + while multiplier <= Multiplier::from_u32(1) { + t.execute_with(|| { + // imagine this tx was called. + let fee = TransactionPayment::compute_fee(0, &info, 0); + fees_paid += fee; + + // this will update the multiplier. + System::set_block_consumed_resources(block_weight, 0); + TransactionPayment::on_finalize(1); + let next = TransactionPayment::next_fee_multiplier(); + + assert!(next > multiplier, "{:?} !>= {:?}", next, multiplier); + multiplier = next; + + println!( + "block = {} / multiplier {:?} / fee = {:?} / fess so far {:?}", + blocks, + multiplier, + fee.separated_string(), + fees_paid.separated_string() + ); + }); + blocks += 1; + } + } + + #[test] + #[ignore] + fn multiplier_cool_down_simulator() { + // assume the multiplier is initially set to its minimum. We update it with values twice the + //target (target is 25%, thus 50%) and we see at which point it reaches 1. + let mut multiplier = Multiplier::from_u32(2); + let mut blocks = 0; + + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); + // set the minimum + t.execute_with(|| { + pallet_transaction_payment::NextFeeMultiplier::::set(multiplier); + }); + + while multiplier > Multiplier::from_u32(0) { + t.execute_with(|| { + // this will update the multiplier. + TransactionPayment::on_finalize(1); + let next = TransactionPayment::next_fee_multiplier(); + + assert!(next < multiplier, "{:?} !>= {:?}", next, multiplier); + multiplier = next; + + println!("block = {} / multiplier {:?}", blocks, multiplier); + }); + blocks += 1; + } + } } #[cfg(all(test, feature = "try-runtime"))] mod remote_tests { - use super::*; - use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; - use remote_externalities::{ - Builder, Mode, OfflineConfig, OnlineConfig, RemoteExternalities, SnapshotConfig, Transport, - }; - use std::env::var; - - async fn remote_ext_test_setup() -> RemoteExternalities { - let transport: Transport = - var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { state_snapshot: state_snapshot.clone() }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { transport, ..Default::default() }) - }) - .build() - .await - .unwrap() - } - - #[tokio::test] - async fn dispatch_all_proposals() { - if var("RUN_OPENGOV_TEST").is_err() { - return - } - - sp_tracing::try_init_simple(); - let mut ext = remote_ext_test_setup().await; - ext.execute_with(|| { + use super::*; + use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; + use remote_externalities::{ + Builder, Mode, OfflineConfig, OnlineConfig, RemoteExternalities, SnapshotConfig, Transport, + }; + use std::env::var; + + async fn remote_ext_test_setup() -> RemoteExternalities { + let transport: Transport = var("WS") + .unwrap_or("wss://paseo.rpc.amforc.com:443".to_string()) + .into(); + let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); + Builder::::default() + .mode(if let Some(state_snapshot) = maybe_state_snapshot { + Mode::OfflineOrElseOnline( + OfflineConfig { + state_snapshot: state_snapshot.clone(), + }, + OnlineConfig { + transport, + state_snapshot: Some(state_snapshot), + ..Default::default() + }, + ) + } else { + Mode::Online(OnlineConfig { + transport, + ..Default::default() + }) + }) + .build() + .await + .unwrap() + } + + #[tokio::test] + async fn dispatch_all_proposals() { + if var("RUN_OPENGOV_TEST").is_err() { + return; + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; + ext.execute_with(|| { type Ref = pallet_referenda::ReferendumInfoOf; type RefStatus = pallet_referenda::ReferendumStatusOf; use sp_runtime::traits::Dispatchable; @@ -2807,45 +2866,51 @@ mod remote_tests { log::info!(target: LOG_TARGET, "outcome of dispatch with origin {:?}: {:?}", origin, dispatch_result); } }); - } - - #[tokio::test] - async fn run_migrations() { - if var("RUN_MIGRATION_TESTS").is_err() { - return - } - - sp_tracing::try_init_simple(); - let mut ext = remote_ext_test_setup().await; - ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); - } - - #[tokio::test] - #[ignore = "this test is meant to be executed manually"] - async fn try_fast_unstake_all() { - sp_tracing::try_init_simple(); - let transport: Transport = - var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { state_snapshot: state_snapshot.clone() }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { transport, ..Default::default() }) - }) - .build() - .await - .unwrap(); - ext.execute_with(|| { - pallet_fast_unstake::ErasToCheckPerBlock::::put(1); - runtime_common::try_runtime::migrate_all_inactive_nominators::() - }); - } + } + + #[tokio::test] + async fn run_migrations() { + if var("RUN_MIGRATION_TESTS").is_err() { + return; + } + + sp_tracing::try_init_simple(); + let mut ext = remote_ext_test_setup().await; + ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); + } + + #[tokio::test] + #[ignore = "this test is meant to be executed manually"] + async fn try_fast_unstake_all() { + sp_tracing::try_init_simple(); + let transport: Transport = var("WS") + .unwrap_or("wss://paseo.rpc.amforc.com:443".to_string()) + .into(); + let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); + let mut ext = Builder::::default() + .mode(if let Some(state_snapshot) = maybe_state_snapshot { + Mode::OfflineOrElseOnline( + OfflineConfig { + state_snapshot: state_snapshot.clone(), + }, + OnlineConfig { + transport, + state_snapshot: Some(state_snapshot), + ..Default::default() + }, + ) + } else { + Mode::Online(OnlineConfig { + transport, + ..Default::default() + }) + }) + .build() + .await + .unwrap(); + ext.execute_with(|| { + pallet_fast_unstake::ErasToCheckPerBlock::::put(1); + runtime_common::try_runtime::migrate_all_inactive_nominators::() + }); + } } diff --git a/relay/paseo/src/weights/frame_benchmarking_baseline.rs b/relay/paseo/src/weights/frame_benchmarking_baseline.rs index 0c59ab7..0f35670 100644 --- a/relay/paseo/src/weights/frame_benchmarking_baseline.rs +++ b/relay/paseo/src/weights/frame_benchmarking_baseline.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `frame_benchmarking::baseline` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_benchmarking::baseline // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -56,8 +52,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 177_000 picoseconds. - Weight::from_parts(221_399, 0) + // Minimum execution time: 220_000 picoseconds. + Weight::from_parts(338_692, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -65,8 +61,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 177_000 picoseconds. - Weight::from_parts(216_190, 0) + // Minimum execution time: 220_000 picoseconds. + Weight::from_parts(250_372, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -74,8 +70,8 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 175_000 picoseconds. - Weight::from_parts(216_992, 0) + // Minimum execution time: 218_000 picoseconds. + Weight::from_parts(274_048, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -83,16 +79,16 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 174_000 picoseconds. - Weight::from_parts(214_459, 0) + // Minimum execution time: 213_000 picoseconds. + Weight::from_parts(285_730, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_624_666_000 picoseconds. - Weight::from_parts(23_655_548_000, 0) + // Minimum execution time: 28_799_059_000 picoseconds. + Weight::from_parts(29_695_824_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -100,10 +96,10 @@ impl frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 209_000 picoseconds. - Weight::from_parts(2_608_443, 0) + // Minimum execution time: 280_000 picoseconds. + Weight::from_parts(12_209_807, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_022 - .saturating_add(Weight::from_parts(54_864_888, 0).saturating_mul(i.into())) + // Standard Error: 109_646 + .saturating_add(Weight::from_parts(50_662_579, 0).saturating_mul(i.into())) } } diff --git a/relay/paseo/src/weights/frame_election_provider_support.rs b/relay/paseo/src/weights/frame_election_provider_support.rs index 938a4e9..15a9759 100644 --- a/relay/paseo/src/weights/frame_election_provider_support.rs +++ b/relay/paseo/src/weights/frame_election_provider_support.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `frame_election_provider_support` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_election_provider_support // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,13 +54,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_632_757_000 picoseconds. - Weight::from_parts(6_762_010_000, 0) + // Minimum execution time: 7_708_233_000 picoseconds. + Weight::from_parts(7_801_181_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 140_567 - .saturating_add(Weight::from_parts(5_972_557, 0).saturating_mul(v.into())) - // Standard Error: 14_371_162 - .saturating_add(Weight::from_parts(1_406_671_378, 0).saturating_mul(d.into())) + // Standard Error: 165_025 + .saturating_add(Weight::from_parts(6_528_087, 0).saturating_mul(v.into())) + // Standard Error: 16_871_577 + .saturating_add(Weight::from_parts(1_661_785_177, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -73,12 +69,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_614_245_000 picoseconds. - Weight::from_parts(4_692_729_000, 0) + // Minimum execution time: 5_578_287_000 picoseconds. + Weight::from_parts(5_982_833_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 124_019 - .saturating_add(Weight::from_parts(4_969_480, 0).saturating_mul(v.into())) - // Standard Error: 12_679_314 - .saturating_add(Weight::from_parts(1_363_382_275, 0).saturating_mul(d.into())) + // Standard Error: 151_733 + .saturating_add(Weight::from_parts(5_797_906, 0).saturating_mul(v.into())) + // Standard Error: 15_512_678 + .saturating_add(Weight::from_parts(1_576_793_993, 0).saturating_mul(d.into())) } } diff --git a/relay/paseo/src/weights/frame_system.rs b/relay/paseo/src/weights/frame_system.rs index d63eb07..59b2bd7 100644 --- a/relay/paseo/src/weights/frame_system.rs +++ b/relay/paseo/src/weights/frame_system.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `frame_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -56,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_734_000 picoseconds. - Weight::from_parts(316_599, 0) + // Minimum execution time: 1_969_000 picoseconds. + Weight::from_parts(2_011_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(389, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(546, 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: 5_133_000 picoseconds. - Weight::from_parts(40_368_105, 0) + // Minimum execution time: 5_620_000 picoseconds. + Weight::from_parts(51_110_255, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_704, 0).saturating_mul(b.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_858, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -81,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_070_000 picoseconds. - Weight::from_parts(3_214_000, 0) + // Minimum execution time: 3_527_000 picoseconds. + Weight::from_parts(3_877_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -95,8 +91,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 105_482_283_000 picoseconds. - Weight::from_parts(112_062_428_000, 0) + // Minimum execution time: 100_955_625_000 picoseconds. + Weight::from_parts(105_325_819_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -108,11 +104,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_906_000 picoseconds. - Weight::from_parts(1_978_000, 0) + // Minimum execution time: 2_176_000 picoseconds. + Weight::from_parts(2_406_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_137 - .saturating_add(Weight::from_parts(758_762, 0).saturating_mul(i.into())) + // Standard Error: 7_316 + .saturating_add(Weight::from_parts(961_397, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -122,11 +118,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_970_000 picoseconds. - Weight::from_parts(2_027_000, 0) + // Minimum execution time: 2_076_000 picoseconds. + Weight::from_parts(2_182_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_055 - .saturating_add(Weight::from_parts(565_043, 0).saturating_mul(i.into())) + // Standard Error: 2_072 + .saturating_add(Weight::from_parts(664_313, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -134,13 +130,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `83 + p * (69 ±0)` + // Measured: `78 + p * (69 ±0)` // Estimated: `79 + p * (70 ±0)` - // Minimum execution time: 3_732_000 picoseconds. - Weight::from_parts(3_887_000, 0) + // Minimum execution time: 4_147_000 picoseconds. + Weight::from_parts(4_331_000, 0) .saturating_add(Weight::from_parts(0, 79)) - // Standard Error: 1_740 - .saturating_add(Weight::from_parts(1_216_574, 0).saturating_mul(p.into())) + // Standard Error: 2_058 + .saturating_add(Weight::from_parts(1_305_219, 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())) diff --git a/relay/paseo/src/weights/mod.rs b/relay/paseo/src/weights/mod.rs index 2e5c22c..dcf19ba 100644 --- a/relay/paseo/src/weights/mod.rs +++ b/relay/paseo/src/weights/mod.rs @@ -37,6 +37,7 @@ pub mod pallet_referenda; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_staking; +pub mod pallet_sudo; pub mod pallet_timestamp; pub mod pallet_treasury; pub mod pallet_utility; diff --git a/relay/paseo/src/weights/pallet_asset_rate.rs b/relay/paseo/src/weights/pallet_asset_rate.rs index e5925b4..85fd233 100644 --- a/relay/paseo/src/weights/pallet_asset_rate.rs +++ b/relay/paseo/src/weights/pallet_asset_rate.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_asset_rate` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_asset_rate // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +53,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `4703` - // Minimum execution time: 10_307_000 picoseconds. - Weight::from_parts(10_684_000, 0) + // Minimum execution time: 11_853_000 picoseconds. + Weight::from_parts(12_304_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -69,8 +65,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `4703` - // Minimum execution time: 10_710_000 picoseconds. - Weight::from_parts(11_008_000, 0) + // Minimum execution time: 12_114_000 picoseconds. + Weight::from_parts(12_605_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,8 +77,8 @@ impl pallet_asset_rate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `111` // Estimated: `4703` - // Minimum execution time: 11_443_000 picoseconds. - Weight::from_parts(11_757_000, 0) + // Minimum execution time: 13_253_000 picoseconds. + Weight::from_parts(13_548_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_bags_list.rs b/relay/paseo/src/weights/pallet_bags_list.rs index 191b113..898d257 100644 --- a/relay/paseo/src/weights/pallet_bags_list.rs +++ b/relay/paseo/src/weights/pallet_bags_list.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_bags_list` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_bags_list // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,10 +57,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn rebag_non_terminal() -> Weight { // Proof Size summary in bytes: - // Measured: `1690` + // Measured: `1618` // Estimated: `11506` - // Minimum execution time: 52_919_000 picoseconds. - Weight::from_parts(55_123_000, 0) + // Minimum execution time: 61_123_000 picoseconds. + Weight::from_parts(64_860_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -79,10 +75,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn rebag_terminal() -> Weight { // Proof Size summary in bytes: - // Measured: `1587` + // Measured: `1512` // Estimated: `8877` - // Minimum execution time: 51_869_000 picoseconds. - Weight::from_parts(53_897_000, 0) + // Minimum execution time: 59_235_000 picoseconds. + Weight::from_parts(61_019_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -99,10 +95,10 @@ impl pallet_bags_list::WeightInfo for WeightInfo { /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn put_in_front_of() -> Weight { // Proof Size summary in bytes: - // Measured: `1895` + // Measured: `1823` // Estimated: `11506` - // Minimum execution time: 60_248_000 picoseconds. - Weight::from_parts(62_125_000, 0) + // Minimum execution time: 69_757_000 picoseconds. + Weight::from_parts(74_360_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(6)) diff --git a/relay/paseo/src/weights/pallet_balances.rs b/relay/paseo/src/weights/pallet_balances.rs index f29983f..33037be 100644 --- a/relay/paseo/src/weights/pallet_balances.rs +++ b/relay/paseo/src/weights/pallet_balances.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_balances // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_206_000 picoseconds. - Weight::from_parts(44_062_000, 0) + // Minimum execution time: 60_240_000 picoseconds. + Weight::from_parts(93_535_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -69,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 34_046_000 picoseconds. - Weight::from_parts(34_656_000, 0) + // Minimum execution time: 42_952_000 picoseconds. + Weight::from_parts(62_623_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 12_780_000 picoseconds. - Weight::from_parts(13_175_000, 0) + // Minimum execution time: 17_332_000 picoseconds. + Weight::from_parts(27_325_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -93,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 17_600_000 picoseconds. - Weight::from_parts(18_029_000, 0) + // Minimum execution time: 20_346_000 picoseconds. + Weight::from_parts(21_005_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -105,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 44_877_000 picoseconds. - Weight::from_parts(45_716_000, 0) + // Minimum execution time: 52_358_000 picoseconds. + Weight::from_parts(53_400_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -117,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 42_540_000 picoseconds. - Weight::from_parts(43_226_000, 0) + // Minimum execution time: 50_476_000 picoseconds. + Weight::from_parts(51_213_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -129,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 15_158_000 picoseconds. - Weight::from_parts(15_461_000, 0) + // Minimum execution time: 17_726_000 picoseconds. + Weight::from_parts(18_378_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -142,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (135 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 14_834_000 picoseconds. - Weight::from_parts(14_907_000, 0) + // Minimum execution time: 17_165_000 picoseconds. + Weight::from_parts(17_769_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 16_310 - .saturating_add(Weight::from_parts(13_363_661, 0).saturating_mul(u.into())) + // Standard Error: 54_152 + .saturating_add(Weight::from_parts(16_060_961, 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())) diff --git a/relay/paseo/src/weights/pallet_bounties.rs b/relay/paseo/src/weights/pallet_bounties.rs index e80fcc9..9add7ef 100644 --- a/relay/paseo/src/weights/pallet_bounties.rs +++ b/relay/paseo/src/weights/pallet_bounties.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_bounties` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_bounties // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,11 +60,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3593` - // Minimum execution time: 22_171_000 picoseconds. - Weight::from_parts(23_262_533, 0) + // Minimum execution time: 25_293_000 picoseconds. + Weight::from_parts(26_724_173, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(716, 0).saturating_mul(d.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(856, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -80,8 +76,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3642` - // Minimum execution time: 11_054_000 picoseconds. - Weight::from_parts(11_803_000, 0) + // Minimum execution time: 13_293_000 picoseconds. + Weight::from_parts(13_770_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -92,8 +88,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3642` - // Minimum execution time: 11_621_000 picoseconds. - Weight::from_parts(13_074_000, 0) + // Minimum execution time: 12_717_000 picoseconds. + Weight::from_parts(13_212_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +102,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `465` // Estimated: `3642` - // Minimum execution time: 35_720_000 picoseconds. - Weight::from_parts(37_626_000, 0) + // Minimum execution time: 40_180_000 picoseconds. + Weight::from_parts(41_094_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -120,8 +116,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `461` // Estimated: `3642` - // Minimum execution time: 24_657_000 picoseconds. - Weight::from_parts(25_111_000, 0) + // Minimum execution time: 28_026_000 picoseconds. + Weight::from_parts(28_875_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -134,8 +130,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `368` // Estimated: `3642` - // Minimum execution time: 14_117_000 picoseconds. - Weight::from_parts(14_681_000, 0) + // Minimum execution time: 16_381_000 picoseconds. + Weight::from_parts(16_915_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -152,8 +148,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `732` // Estimated: `8799` - // Minimum execution time: 99_057_000 picoseconds. - Weight::from_parts(100_479_000, 0) + // Minimum execution time: 115_726_000 picoseconds. + Weight::from_parts(117_468_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -170,8 +166,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3642` - // Minimum execution time: 35_839_000 picoseconds. - Weight::from_parts(37_327_000, 0) + // Minimum execution time: 41_807_000 picoseconds. + Weight::from_parts(43_512_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -188,8 +184,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `648` // Estimated: `6196` - // Minimum execution time: 66_715_000 picoseconds. - Weight::from_parts(68_687_000, 0) + // Minimum execution time: 78_207_000 picoseconds. + Weight::from_parts(79_832_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -200,8 +196,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `325` // Estimated: `3642` - // Minimum execution time: 11_227_000 picoseconds. - Weight::from_parts(11_605_000, 0) + // Minimum execution time: 13_018_000 picoseconds. + Weight::from_parts(13_492_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -217,11 +213,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + b * (297 ±0)` // Estimated: `1887 + b * (5206 ±0)` - // Minimum execution time: 2_778_000 picoseconds. - Weight::from_parts(2_822_000, 0) + // Minimum execution time: 3_315_000 picoseconds. + Weight::from_parts(952_528, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 20_518 - .saturating_add(Weight::from_parts(32_863_783, 0).saturating_mul(b.into())) + // Standard Error: 129_157 + .saturating_add(Weight::from_parts(37_485_563, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_child_bounties.rs b/relay/paseo/src/weights/pallet_child_bounties.rs index 4cbddcd..7c0d796 100644 --- a/relay/paseo/src/weights/pallet_child_bounties.rs +++ b/relay/paseo/src/weights/pallet_child_bounties.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_child_bounties` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_child_bounties // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -68,11 +64,11 @@ impl pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo pallet_child_bounties::WeightInfo for WeightInfo. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_conviction_voting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_conviction_voting // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,10 +61,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: - // Measured: `13480` + // Measured: `13446` // Estimated: `42428` - // Minimum execution time: 135_170_000 picoseconds. - Weight::from_parts(151_888_000, 0) + // Minimum execution time: 139_930_000 picoseconds. + Weight::from_parts(147_828_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -87,10 +83,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: - // Measured: `14201` + // Measured: `14167` // Estimated: `83866` - // Minimum execution time: 210_510_000 picoseconds. - Weight::from_parts(223_689_000, 0) + // Minimum execution time: 220_313_000 picoseconds. + Weight::from_parts(230_502_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -105,8 +101,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13919` // Estimated: `83866` - // Minimum execution time: 182_641_000 picoseconds. - Weight::from_parts(195_724_000, 0) + // Minimum execution time: 191_326_000 picoseconds. + Weight::from_parts(197_047_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -119,8 +115,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13005` // Estimated: `30706` - // Minimum execution time: 80_827_000 picoseconds. - Weight::from_parts(88_978_000, 0) + // Minimum execution time: 78_962_000 picoseconds. + Weight::from_parts(85_475_000, 0) .saturating_add(Weight::from_parts(0, 30706)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -140,13 +136,13 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// The range of component `r` is `[0, 512]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `29675 + r * (365 ±0)` + // Measured: `29641 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 70_172_000 picoseconds. - Weight::from_parts(1_764_097_330, 0) + // Minimum execution time: 71_927_000 picoseconds. + Weight::from_parts(1_764_881_721, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 159_254 - .saturating_add(Weight::from_parts(43_395_230, 0).saturating_mul(r.into())) + // Standard Error: 183_337 + .saturating_add(Weight::from_parts(48_336_721, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -164,11 +160,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `29556 + r * (365 ±0)` // Estimated: `83866 + r * (3411 ±0)` - // Minimum execution time: 38_933_000 picoseconds. - Weight::from_parts(1_690_655_508, 0) + // Minimum execution time: 40_074_000 picoseconds. + Weight::from_parts(1_855_922_537, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 155_609 - .saturating_add(Weight::from_parts(43_452_998, 0).saturating_mul(r.into())) + // Standard Error: 195_801 + .saturating_add(Weight::from_parts(46_793_153, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -185,10 +181,10 @@ impl pallet_conviction_voting::WeightInfo for WeightInf /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `12252` + // Measured: `12218` // Estimated: `30706` - // Minimum execution time: 104_676_000 picoseconds. - Weight::from_parts(112_870_000, 0) + // Minimum execution time: 101_636_000 picoseconds. + Weight::from_parts(108_166_000, 0) .saturating_add(Weight::from_parts(0, 30706)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs b/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs index 1d4de5c..544fda2 100644 --- a/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs +++ b/relay/paseo/src/weights/pallet_election_provider_multi_phase.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `pallet_election_provider_multi_phase` //! diff --git a/relay/paseo/src/weights/pallet_fast_unstake.rs b/relay/paseo/src/weights/pallet_fast_unstake.rs index 99a6014..cb1c955 100644 --- a/relay/paseo/src/weights/pallet_fast_unstake.rs +++ b/relay/paseo/src/weights/pallet_fast_unstake.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `pallet_fast_unstake` //! diff --git a/relay/paseo/src/weights/pallet_identity.rs b/relay/paseo/src/weights/pallet_identity.rs index 758715c..ffb8844 100644 --- a/relay/paseo/src/weights/pallet_identity.rs +++ b/relay/paseo/src/weights/pallet_identity.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_identity` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_identity // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,11 +54,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 7_733_000 picoseconds. - Weight::from_parts(8_366_649, 0) + // Minimum execution time: 9_168_000 picoseconds. + Weight::from_parts(9_788_078, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_475 - .saturating_add(Weight::from_parts(87_533, 0).saturating_mul(r.into())) + // Standard Error: 1_435 + .saturating_add(Weight::from_parts(90_912, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -70,17 +66,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { + fn set_identity(_r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 27_475_000 picoseconds. - Weight::from_parts(24_816_235, 0) + // Minimum execution time: 31_611_000 picoseconds. + Weight::from_parts(37_116_530, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_842 - .saturating_add(Weight::from_parts(168_829, 0).saturating_mul(r.into())) - // Standard Error: 749 - .saturating_add(Weight::from_parts(461_025, 0).saturating_mul(x.into())) + // Standard Error: 10_148 + .saturating_add(Weight::from_parts(586_610, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -95,11 +89,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 8_375_000 picoseconds. - Weight::from_parts(18_446_361, 0) + // Minimum execution time: 9_753_000 picoseconds. + Weight::from_parts(26_124_406, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_019 - .saturating_add(Weight::from_parts(3_087_659, 0).saturating_mul(s.into())) + // Standard Error: 21_172 + .saturating_add(Weight::from_parts(3_627_282, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -117,11 +111,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `194 + p * (32 ±0)` // Estimated: `11003` - // Minimum execution time: 8_419_000 picoseconds. - Weight::from_parts(19_014_707, 0) + // Minimum execution time: 9_516_000 picoseconds. + Weight::from_parts(23_177_675, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 2_738 - .saturating_add(Weight::from_parts(1_295_234, 0).saturating_mul(p.into())) + // Standard Error: 3_869 + .saturating_add(Weight::from_parts(1_491_585, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -135,19 +129,17 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { + fn clear_identity(_r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 52_441_000 picoseconds. - Weight::from_parts(28_075_401, 0) + // Minimum execution time: 59_811_000 picoseconds. + Weight::from_parts(57_605_796, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_929 - .saturating_add(Weight::from_parts(134_695, 0).saturating_mul(r.into())) - // Standard Error: 2_134 - .saturating_add(Weight::from_parts(1_291_235, 0).saturating_mul(s.into())) - // Standard Error: 2_134 - .saturating_add(Weight::from_parts(259_478, 0).saturating_mul(x.into())) + // Standard Error: 10_262 + .saturating_add(Weight::from_parts(1_421_699, 0).saturating_mul(s.into())) + // Standard Error: 10_262 + .saturating_add(Weight::from_parts(238_788, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -162,13 +154,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 26_848_000 picoseconds. - Weight::from_parts(25_011_542, 0) + // Minimum execution time: 33_619_000 picoseconds. + Weight::from_parts(8_016_306, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_649 - .saturating_add(Weight::from_parts(157_213, 0).saturating_mul(r.into())) - // Standard Error: 712 - .saturating_add(Weight::from_parts(495_951, 0).saturating_mul(x.into())) + // Standard Error: 102_023 + .saturating_add(Weight::from_parts(1_192_071, 0).saturating_mul(r.into())) + // Standard Error: 19_906 + .saturating_add(Weight::from_parts(755_574, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,13 +172,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398 + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 24_370_000 picoseconds. - Weight::from_parts(23_616_593, 0) + // Minimum execution time: 29_031_000 picoseconds. + Weight::from_parts(25_066_080, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 2_838 - .saturating_add(Weight::from_parts(91_214, 0).saturating_mul(r.into())) - // Standard Error: 553 - .saturating_add(Weight::from_parts(472_533, 0).saturating_mul(x.into())) + // Standard Error: 34_931 + .saturating_add(Weight::from_parts(306_513, 0).saturating_mul(r.into())) + // Standard Error: 6_815 + .saturating_add(Weight::from_parts(585_608, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -197,26 +189,24 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_515_000 picoseconds. - Weight::from_parts(6_052_251, 0) + // Minimum execution time: 6_685_000 picoseconds. + Weight::from_parts(8_211_002, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 918 - .saturating_add(Weight::from_parts(73_223, 0).saturating_mul(r.into())) + // Standard Error: 8_581 + .saturating_add(Weight::from_parts(26_535, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:1) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - fn set_account_id(r: u32, ) -> Weight { + fn set_account_id(_r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_911_000 picoseconds. - Weight::from_parts(6_258_125, 0) + // Minimum execution time: 6_932_000 picoseconds. + Weight::from_parts(9_640_024, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 973 - .saturating_add(Weight::from_parts(70_894, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -227,11 +217,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_690_000 picoseconds. - Weight::from_parts(6_049_149, 0) + // Minimum execution time: 6_570_000 picoseconds. + Weight::from_parts(6_887_060, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_039 - .saturating_add(Weight::from_parts(73_621, 0).saturating_mul(r.into())) + // Standard Error: 884 + .saturating_add(Weight::from_parts(72_380, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -245,13 +235,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 19_558_000 picoseconds. - Weight::from_parts(18_348_326, 0) + // Minimum execution time: 22_698_000 picoseconds. + Weight::from_parts(23_342_511, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_288 - .saturating_add(Weight::from_parts(128_899, 0).saturating_mul(r.into())) - // Standard Error: 793 - .saturating_add(Weight::from_parts(761_648, 0).saturating_mul(x.into())) + // Standard Error: 40_423 + .saturating_add(Weight::from_parts(294_270, 0).saturating_mul(r.into())) + // Standard Error: 7_479 + .saturating_add(Weight::from_parts(874_288, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -270,15 +260,15 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 66_002_000 picoseconds. - Weight::from_parts(39_371_039, 0) + // Minimum execution time: 75_440_000 picoseconds. + Weight::from_parts(33_066_227, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 13_673 - .saturating_add(Weight::from_parts(238_248, 0).saturating_mul(r.into())) - // Standard Error: 2_670 - .saturating_add(Weight::from_parts(1_322_628, 0).saturating_mul(s.into())) - // Standard Error: 2_670 - .saturating_add(Weight::from_parts(294_550, 0).saturating_mul(x.into())) + // Standard Error: 148_020 + .saturating_add(Weight::from_parts(1_566_835, 0).saturating_mul(r.into())) + // Standard Error: 28_906 + .saturating_add(Weight::from_parts(1_699_927, 0).saturating_mul(s.into())) + // Standard Error: 28_906 + .saturating_add(Weight::from_parts(203_087, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -294,11 +284,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` // Estimated: `11003` - // Minimum execution time: 24_323_000 picoseconds. - Weight::from_parts(27_243_349, 0) + // Minimum execution time: 28_104_000 picoseconds. + Weight::from_parts(35_085_457, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_483 - .saturating_add(Weight::from_parts(119_971, 0).saturating_mul(s.into())) + // Standard Error: 3_605 + .saturating_add(Weight::from_parts(96_391, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -311,11 +301,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` // Estimated: `11003` - // Minimum execution time: 11_716_000 picoseconds. - Weight::from_parts(15_075_277, 0) + // Minimum execution time: 13_534_000 picoseconds. + Weight::from_parts(17_733_031, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 834 - .saturating_add(Weight::from_parts(41_631, 0).saturating_mul(s.into())) + // Standard Error: 1_391 + .saturating_add(Weight::from_parts(51_894, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -330,11 +320,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` // Estimated: `11003` - // Minimum execution time: 29_421_000 picoseconds. - Weight::from_parts(30_979_411, 0) + // Minimum execution time: 36_477_000 picoseconds. + Weight::from_parts(42_936_754, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 913 - .saturating_add(Weight::from_parts(90_615, 0).saturating_mul(s.into())) + // Standard Error: 9_086 + .saturating_add(Weight::from_parts(37_403, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -349,11 +339,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 22_936_000 picoseconds. - Weight::from_parts(24_517_892, 0) + // Minimum execution time: 26_501_000 picoseconds. + Weight::from_parts(29_298_882, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 879 - .saturating_add(Weight::from_parts(77_322, 0).saturating_mul(s.into())) + // Standard Error: 1_377 + .saturating_add(Weight::from_parts(84_386, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_im_online.rs b/relay/paseo/src/weights/pallet_im_online.rs index 3e20819..eff7348 100644 --- a/relay/paseo/src/weights/pallet_im_online.rs +++ b/relay/paseo/src/weights/pallet_im_online.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_im_online` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_im_online // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,13 +60,13 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `559 + k * (32 ±0)` + // Measured: `394 + k * (32 ±0)` // Estimated: `321487 + k * (1761 ±0)` - // Minimum execution time: 76_514_000 picoseconds. - Weight::from_parts(93_114_641, 0) + // Minimum execution time: 74_758_000 picoseconds. + Weight::from_parts(93_999_287, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 522 - .saturating_add(Weight::from_parts(31_583, 0).saturating_mul(k.into())) + // Standard Error: 691 + .saturating_add(Weight::from_parts(35_893, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 1761).saturating_mul(k.into())) diff --git a/relay/paseo/src/weights/pallet_indices.rs b/relay/paseo/src/weights/pallet_indices.rs index 7b62b08..04161fd 100644 --- a/relay/paseo/src/weights/pallet_indices.rs +++ b/relay/paseo/src/weights/pallet_indices.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_indices` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_indices // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +53,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3534` - // Minimum execution time: 18_413_000 picoseconds. - Weight::from_parts(18_725_000, 0) + // Minimum execution time: 22_167_000 picoseconds. + Weight::from_parts(22_667_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,8 +67,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 28_869_000 picoseconds. - Weight::from_parts(29_383_000, 0) + // Minimum execution time: 34_591_000 picoseconds. + Weight::from_parts(35_552_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,8 +79,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 19_653_000 picoseconds. - Weight::from_parts(19_961_000, 0) + // Minimum execution time: 23_038_000 picoseconds. + Weight::from_parts(25_037_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -97,8 +93,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `203` // Estimated: `3593` - // Minimum execution time: 21_448_000 picoseconds. - Weight::from_parts(21_944_000, 0) + // Minimum execution time: 27_317_000 picoseconds. + Weight::from_parts(41_943_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -109,8 +105,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `3534` - // Minimum execution time: 20_655_000 picoseconds. - Weight::from_parts(21_071_000, 0) + // Minimum execution time: 25_345_000 picoseconds. + Weight::from_parts(35_990_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_message_queue.rs b/relay/paseo/src/weights/pallet_message_queue.rs index dd801c2..8e422ab 100644 --- a/relay/paseo/src/weights/pallet_message_queue.rs +++ b/relay/paseo/src/weights/pallet_message_queue.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_message_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_message_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +55,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 12_343_000 picoseconds. - Weight::from_parts(12_772_000, 0) + // Minimum execution time: 15_288_000 picoseconds. + Weight::from_parts(15_742_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -73,8 +69,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `281` // Estimated: `6050` - // Minimum execution time: 11_195_000 picoseconds. - Weight::from_parts(11_693_000, 0) + // Minimum execution time: 13_623_000 picoseconds. + Weight::from_parts(14_350_000, 0) .saturating_add(Weight::from_parts(0, 6050)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -85,8 +81,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `42` // Estimated: `3520` - // Minimum execution time: 3_701_000 picoseconds. - Weight::from_parts(3_935_000, 0) + // Minimum execution time: 4_658_000 picoseconds. + Weight::from_parts(4_804_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -97,8 +93,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_526_000 picoseconds. - Weight::from_parts(5_764_000, 0) + // Minimum execution time: 6_732_000 picoseconds. + Weight::from_parts(7_027_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -109,8 +105,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `115` // Estimated: `69051` - // Minimum execution time: 5_563_000 picoseconds. - Weight::from_parts(5_795_000, 0) + // Minimum execution time: 6_934_000 picoseconds. + Weight::from_parts(7_278_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -119,8 +115,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 91_091_000 picoseconds. - Weight::from_parts(91_979_000, 0) + // Minimum execution time: 103_616_000 picoseconds. + Weight::from_parts(104_387_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) @@ -131,8 +127,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `220` // Estimated: `3520` - // Minimum execution time: 6_223_000 picoseconds. - Weight::from_parts(6_490_000, 0) + // Minimum execution time: 7_253_000 picoseconds. + Weight::from_parts(7_654_000, 0) .saturating_add(Weight::from_parts(0, 3520)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -149,8 +145,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 55_947_000 picoseconds. - Weight::from_parts(56_791_000, 0) + // Minimum execution time: 69_480_000 picoseconds. + Weight::from_parts(70_836_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -167,8 +163,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 71_122_000 picoseconds. - Weight::from_parts(72_402_000, 0) + // Minimum execution time: 86_857_000 picoseconds. + Weight::from_parts(88_634_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -185,8 +181,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65714` // Estimated: `69051` - // Minimum execution time: 113_425_000 picoseconds. - Weight::from_parts(115_258_000, 0) + // Minimum execution time: 130_288_000 picoseconds. + Weight::from_parts(132_689_000, 0) .saturating_add(Weight::from_parts(0, 69051)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/relay/paseo/src/weights/pallet_multisig.rs b/relay/paseo/src/weights/pallet_multisig.rs index 557ef18..cf53499 100644 --- a/relay/paseo/src/weights/pallet_multisig.rs +++ b/relay/paseo/src/weights/pallet_multisig.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_multisig` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_multisig // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -56,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_662_000 picoseconds. - Weight::from_parts(13_481_934, 0) + // Minimum execution time: 13_891_000 picoseconds. + Weight::from_parts(13_805_132, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(554, 0).saturating_mul(z.into())) + // Standard Error: 37 + .saturating_add(Weight::from_parts(954, 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`) @@ -70,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 41_446_000 picoseconds. - Weight::from_parts(28_224_090, 0) + // Minimum execution time: 45_889_000 picoseconds. + Weight::from_parts(39_499_549, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 923 - .saturating_add(Weight::from_parts(142_413, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_538, 0).saturating_mul(z.into())) + // Standard Error: 5_810 + .saturating_add(Weight::from_parts(97_917, 0).saturating_mul(s.into())) + // Standard Error: 56 + .saturating_add(Weight::from_parts(2_007, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -88,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 25_377_000 picoseconds. - Weight::from_parts(16_607_084, 0) + // Minimum execution time: 28_775_000 picoseconds. + Weight::from_parts(20_967_664, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 782 - .saturating_add(Weight::from_parts(106_377, 0).saturating_mul(s.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_473, 0).saturating_mul(z.into())) + // Standard Error: 4_204 + .saturating_add(Weight::from_parts(123_813, 0).saturating_mul(s.into())) + // Standard Error: 41 + .saturating_add(Weight::from_parts(1_645, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -108,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `392 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 45_986_000 picoseconds. - Weight::from_parts(34_083_317, 0) + // Minimum execution time: 52_547_000 picoseconds. + Weight::from_parts(38_933_896, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_360 - .saturating_add(Weight::from_parts(159_314, 0).saturating_mul(s.into())) - // Standard Error: 13 - .saturating_add(Weight::from_parts(1_495, 0).saturating_mul(z.into())) + // Standard Error: 4_178 + .saturating_add(Weight::from_parts(174_768, 0).saturating_mul(s.into())) + // Standard Error: 40 + .saturating_add(Weight::from_parts(1_830, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -125,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `267 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 25_804_000 picoseconds. - Weight::from_parts(27_560_338, 0) + // Minimum execution time: 29_233_000 picoseconds. + Weight::from_parts(34_332_536, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_414 - .saturating_add(Weight::from_parts(139_434, 0).saturating_mul(s.into())) + // Standard Error: 6_774 + .saturating_add(Weight::from_parts(125_814, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `286` // Estimated: `6811` - // Minimum execution time: 14_894_000 picoseconds. - Weight::from_parts(15_336_125, 0) + // Minimum execution time: 16_485_000 picoseconds. + Weight::from_parts(18_041_032, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 513 - .saturating_add(Weight::from_parts(106_933, 0).saturating_mul(s.into())) + // Standard Error: 1_683 + .saturating_add(Weight::from_parts(114_082, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -155,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `458 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 27_780_000 picoseconds. - Weight::from_parts(30_590_352, 0) + // Minimum execution time: 31_747_000 picoseconds. + Weight::from_parts(34_365_754, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_169 - .saturating_add(Weight::from_parts(129_442, 0).saturating_mul(s.into())) + // Standard Error: 9_080 + .saturating_add(Weight::from_parts(191_673, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/pallet_nomination_pools.rs b/relay/paseo/src/weights/pallet_nomination_pools.rs index 7dc54be..1d00915 100644 --- a/relay/paseo/src/weights/pallet_nomination_pools.rs +++ b/relay/paseo/src/weights/pallet_nomination_pools.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_nomination_pools` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_nomination_pools // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -85,10 +81,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn join() -> Weight { // Proof Size summary in bytes: - // Measured: `3362` + // Measured: `3323` // Estimated: `8877` - // Minimum execution time: 174_388_000 picoseconds. - Weight::from_parts(178_674_000, 0) + // Minimum execution time: 212_767_000 picoseconds. + Weight::from_parts(218_193_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -119,10 +115,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn bond_extra_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `3372` + // Measured: `3333` // Estimated: `8877` - // Minimum execution time: 177_448_000 picoseconds. - Weight::from_parts(181_217_000, 0) + // Minimum execution time: 218_279_000 picoseconds. + Weight::from_parts(275_792_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().writes(13)) @@ -147,7 +143,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Storage: `VoterList::ListNodes` (r:3 w:3) /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`) /// Storage: `VoterList::ListBags` (r:2 w:2) /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) @@ -155,13 +151,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn bond_extra_other() -> Weight { // Proof Size summary in bytes: - // Measured: `3282` - // Estimated: `8799` - // Minimum execution time: 199_890_000 picoseconds. - Weight::from_parts(202_310_000, 0) - .saturating_add(Weight::from_parts(0, 8799)) - .saturating_add(T::DbWeight::get().reads(17)) - .saturating_add(T::DbWeight::get().writes(13)) + // Measured: `3398` + // Estimated: `8877` + // Minimum execution time: 252_687_000 picoseconds. + Weight::from_parts(269_137_000, 0) + .saturating_add(Weight::from_parts(0, 8877)) + .saturating_add(T::DbWeight::get().reads(18)) + .saturating_add(T::DbWeight::get().writes(14)) } /// Storage: `NominationPools::ClaimPermissions` (r:1 w:0) /// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) @@ -179,8 +175,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1137` // Estimated: `4182` - // Minimum execution time: 69_782_000 picoseconds. - Weight::from_parts(71_578_000, 0) + // Minimum execution time: 84_960_000 picoseconds. + Weight::from_parts(86_875_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -219,10 +215,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `NominationPools::CounterForSubPoolsStorage` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn unbond() -> Weight { // Proof Size summary in bytes: - // Measured: `3552` + // Measured: `3540` // Estimated: `8877` - // Minimum execution time: 157_954_000 picoseconds. - Weight::from_parts(161_556_000, 0) + // Minimum execution time: 188_264_000 picoseconds. + Weight::from_parts(192_845_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -244,13 +240,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn pool_withdraw_unbonded(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1816` + // Measured: `1712` // Estimated: `4764` - // Minimum execution time: 64_861_000 picoseconds. - Weight::from_parts(66_636_015, 0) + // Minimum execution time: 76_506_000 picoseconds. + Weight::from_parts(79_008_176, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_180 - .saturating_add(Weight::from_parts(61_338, 0).saturating_mul(s.into())) + // Standard Error: 1_321 + .saturating_add(Weight::from_parts(54_443, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -281,13 +277,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2206` + // Measured: `2102` // Estimated: `4764` - // Minimum execution time: 121_755_000 picoseconds. - Weight::from_parts(125_922_454, 0) + // Minimum execution time: 146_288_000 picoseconds. + Weight::from_parts(144_992_030, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_036 - .saturating_add(Weight::from_parts(79_306, 0).saturating_mul(s.into())) + // Standard Error: 16_708 + .saturating_add(Weight::from_parts(319_264, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -340,10 +336,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(_s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2666` + // Measured: `2357` // Estimated: `8538` - // Minimum execution time: 225_288_000 picoseconds. - Weight::from_parts(232_333_445, 0) + // Minimum execution time: 268_143_000 picoseconds. + Weight::from_parts(310_303_626, 0) .saturating_add(Weight::from_parts(0, 8538)) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(20)) @@ -396,10 +392,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `1067` + // Measured: `1069` // Estimated: `8538` - // Minimum execution time: 167_182_000 picoseconds. - Weight::from_parts(170_727_000, 0) + // Minimum execution time: 195_286_000 picoseconds. + Weight::from_parts(198_468_000, 0) .saturating_add(Weight::from_parts(0, 8538)) .saturating_add(T::DbWeight::get().reads(24)) .saturating_add(T::DbWeight::get().writes(17)) @@ -431,13 +427,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1866` + // Measured: `1678` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 59_258_000 picoseconds. - Weight::from_parts(60_008_870, 0) + // Minimum execution time: 69_864_000 picoseconds. + Weight::from_parts(72_654_153, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 7_414 - .saturating_add(Weight::from_parts(1_499_161, 0).saturating_mul(n.into())) + // Standard Error: 22_836 + .saturating_add(Weight::from_parts(1_693_268, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -451,10 +447,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) fn set_state() -> Weight { // Proof Size summary in bytes: - // Measured: `1401` + // Measured: `1331` // Estimated: `4556` - // Minimum execution time: 30_820_000 picoseconds. - Weight::from_parts(31_524_000, 0) + // Minimum execution time: 35_385_000 picoseconds. + Weight::from_parts(36_886_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -470,11 +466,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3735` - // Minimum execution time: 12_106_000 picoseconds. - Weight::from_parts(12_748_197, 0) + // Minimum execution time: 14_097_000 picoseconds. + Weight::from_parts(14_788_816, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 104 - .saturating_add(Weight::from_parts(1_161, 0).saturating_mul(n.into())) + // Standard Error: 335 + .saturating_add(Weight::from_parts(5_405, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -494,8 +490,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_530_000 picoseconds. - Weight::from_parts(3_782_000, 0) + // Minimum execution time: 4_125_000 picoseconds. + Weight::from_parts(4_587_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -505,8 +501,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 15_534_000 picoseconds. - Weight::from_parts(16_277_000, 0) + // Minimum execution time: 18_460_000 picoseconds. + Weight::from_parts(21_983_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -531,10 +527,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill() -> Weight { // Proof Size summary in bytes: - // Measured: `2035` + // Measured: `1891` // Estimated: `4556` - // Minimum execution time: 58_635_000 picoseconds. - Weight::from_parts(60_271_000, 0) + // Minimum execution time: 68_921_000 picoseconds. + Weight::from_parts(76_581_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -551,8 +547,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `736` // Estimated: `3685` - // Minimum execution time: 30_926_000 picoseconds. - Weight::from_parts(32_075_000, 0) + // Minimum execution time: 40_468_000 picoseconds. + Weight::from_parts(42_234_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -565,8 +561,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `537` // Estimated: `3685` - // Minimum execution time: 15_241_000 picoseconds. - Weight::from_parts(15_969_000, 0) + // Minimum execution time: 18_657_000 picoseconds. + Weight::from_parts(21_457_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -577,8 +573,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `497` // Estimated: `3685` - // Minimum execution time: 15_128_000 picoseconds. - Weight::from_parts(15_851_000, 0) + // Minimum execution time: 18_363_000 picoseconds. + Weight::from_parts(19_781_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -591,8 +587,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `508` // Estimated: `4182` - // Minimum execution time: 13_529_000 picoseconds. - Weight::from_parts(13_982_000, 0) + // Minimum execution time: 16_182_000 picoseconds. + Weight::from_parts(19_155_000, 0) .saturating_add(Weight::from_parts(0, 4182)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -609,8 +605,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `934` // Estimated: `3685` - // Minimum execution time: 58_511_000 picoseconds. - Weight::from_parts(59_408_000, 0) + // Minimum execution time: 75_220_000 picoseconds. + Weight::from_parts(101_950_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -625,10 +621,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn adjust_pool_deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `946` + // Measured: `866` // Estimated: `4764` - // Minimum execution time: 64_007_000 picoseconds. - Weight::from_parts(65_129_000, 0) + // Minimum execution time: 77_947_000 picoseconds. + Weight::from_parts(83_319_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/relay/paseo/src/weights/pallet_offences.rs b/relay/paseo/src/weights/pallet_offences.rs index ceb53fb..f0a9d7d 100644 --- a/relay/paseo/src/weights/pallet_offences.rs +++ b/relay/paseo/src/weights/pallet_offences.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `pallet_offences` //! diff --git a/relay/paseo/src/weights/pallet_preimage.rs b/relay/paseo/src/weights/pallet_preimage.rs index 6b58e5b..6f29788 100644 --- a/relay/paseo/src/weights/pallet_preimage.rs +++ b/relay/paseo/src/weights/pallet_preimage.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_preimage` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_preimage // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,11 +60,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 41_264_000 picoseconds. - Weight::from_parts(115_478_709, 0) + // Minimum execution time: 46_596_000 picoseconds. + Weight::from_parts(101_522_510, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 13 - .saturating_add(Weight::from_parts(2_194, 0).saturating_mul(s.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(2_733, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -83,11 +79,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 14_315_000 picoseconds. - Weight::from_parts(14_443_000, 0) + // Minimum execution time: 15_864_000 picoseconds. + Weight::from_parts(16_694_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_479, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(2_774, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -102,11 +98,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 13_600_000 picoseconds. - Weight::from_parts(13_949_000, 0) + // Minimum execution time: 15_396_000 picoseconds. + Weight::from_parts(15_652_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(2_480, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(2_740, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,8 +118,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `244` // Estimated: `3556` - // Minimum execution time: 55_238_000 picoseconds. - Weight::from_parts(64_350_000, 0) + // Minimum execution time: 61_897_000 picoseconds. + Weight::from_parts(65_378_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -138,8 +134,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 27_749_000 picoseconds. - Weight::from_parts(35_028_000, 0) + // Minimum execution time: 33_842_000 picoseconds. + Weight::from_parts(39_427_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -152,8 +148,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `188` // Estimated: `3556` - // Minimum execution time: 19_990_000 picoseconds. - Weight::from_parts(22_808_000, 0) + // Minimum execution time: 29_030_000 picoseconds. + Weight::from_parts(31_264_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -166,8 +162,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 13_287_000 picoseconds. - Weight::from_parts(16_042_000, 0) + // Minimum execution time: 20_217_000 picoseconds. + Weight::from_parts(21_693_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -180,8 +176,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3556` - // Minimum execution time: 14_047_000 picoseconds. - Weight::from_parts(15_342_000, 0) + // Minimum execution time: 16_547_000 picoseconds. + Weight::from_parts(18_609_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -194,8 +190,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 9_567_000 picoseconds. - Weight::from_parts(10_026_000, 0) + // Minimum execution time: 10_783_000 picoseconds. + Weight::from_parts(11_805_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -210,8 +206,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3556` - // Minimum execution time: 20_373_000 picoseconds. - Weight::from_parts(23_910_000, 0) + // Minimum execution time: 25_399_000 picoseconds. + Weight::from_parts(27_383_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -224,8 +220,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 9_800_000 picoseconds. - Weight::from_parts(10_450_000, 0) + // Minimum execution time: 11_070_000 picoseconds. + Weight::from_parts(11_762_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -238,8 +234,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3556` - // Minimum execution time: 9_735_000 picoseconds. - Weight::from_parts(10_477_000, 0) + // Minimum execution time: 10_430_000 picoseconds. + Weight::from_parts(11_035_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -257,11 +253,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + n * (227 ±0)` // Estimated: `990 + n * (2603 ±0)` - // Minimum execution time: 46_578_000 picoseconds. - Weight::from_parts(46_893_000, 0) + // Minimum execution time: 53_413_000 picoseconds. + Weight::from_parts(53_924_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 54_208 - .saturating_add(Weight::from_parts(49_770_526, 0).saturating_mul(n.into())) + // Standard Error: 187_520 + .saturating_add(Weight::from_parts(57_834_767, 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, 2603).saturating_mul(n.into())) diff --git a/relay/paseo/src/weights/pallet_proxy.rs b/relay/paseo/src/weights/pallet_proxy.rs index 1233c30..b19cbe4 100644 --- a/relay/paseo/src/weights/pallet_proxy.rs +++ b/relay/paseo/src/weights/pallet_proxy.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_proxy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_proxy // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,15 +50,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Storage: `Proxy::Proxies` (r:1 w:0) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { + fn proxy(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 12_025_000 picoseconds. - Weight::from_parts(12_596_335, 0) + // Minimum execution time: 13_452_000 picoseconds. + Weight::from_parts(16_097_177, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 854 - .saturating_add(Weight::from_parts(34_955, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -77,13 +71,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `416 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 32_295_000 picoseconds. - Weight::from_parts(32_939_511, 0) + // Minimum execution time: 38_678_000 picoseconds. + Weight::from_parts(38_002_542, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_384 - .saturating_add(Weight::from_parts(135_401, 0).saturating_mul(a.into())) - // Standard Error: 2_463 - .saturating_add(Weight::from_parts(38_145, 0).saturating_mul(p.into())) + // Standard Error: 15_091 + .saturating_add(Weight::from_parts(171_490, 0).saturating_mul(a.into())) + // Standard Error: 15_592 + .saturating_add(Weight::from_parts(130_713, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -97,13 +91,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `331 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 19_936_000 picoseconds. - Weight::from_parts(20_165_711, 0) + // Minimum execution time: 24_121_000 picoseconds. + Weight::from_parts(26_734_045, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_093 - .saturating_add(Weight::from_parts(145_791, 0).saturating_mul(a.into())) - // Standard Error: 2_163 - .saturating_add(Weight::from_parts(9_018, 0).saturating_mul(p.into())) + // Standard Error: 4_546 + .saturating_add(Weight::from_parts(88_770, 0).saturating_mul(a.into())) + // Standard Error: 4_697 + .saturating_add(Weight::from_parts(7_143, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -117,13 +111,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `331 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 19_872_000 picoseconds. - Weight::from_parts(20_398_560, 0) + // Minimum execution time: 23_443_000 picoseconds. + Weight::from_parts(23_785_662, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_496 - .saturating_add(Weight::from_parts(136_204, 0).saturating_mul(a.into())) - // Standard Error: 2_579 - .saturating_add(Weight::from_parts(9_044, 0).saturating_mul(p.into())) + // Standard Error: 8_777 + .saturating_add(Weight::from_parts(172_749, 0).saturating_mul(a.into())) + // Standard Error: 9_069 + .saturating_add(Weight::from_parts(61_486, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -139,13 +133,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 29_565_000 picoseconds. - Weight::from_parts(29_853_281, 0) + // Minimum execution time: 34_551_000 picoseconds. + Weight::from_parts(34_728_693, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_913 - .saturating_add(Weight::from_parts(139_102, 0).saturating_mul(a.into())) - // Standard Error: 1_977 - .saturating_add(Weight::from_parts(32_951, 0).saturating_mul(p.into())) + // Standard Error: 11_759 + .saturating_add(Weight::from_parts(198_085, 0).saturating_mul(a.into())) + // Standard Error: 12_150 + .saturating_add(Weight::from_parts(31_273, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -156,11 +150,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_634_000 picoseconds. - Weight::from_parts(20_304_683, 0) + // Minimum execution time: 22_738_000 picoseconds. + Weight::from_parts(23_426_323, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 924 - .saturating_add(Weight::from_parts(34_868, 0).saturating_mul(p.into())) + // Standard Error: 1_007 + .saturating_add(Weight::from_parts(48_681, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -171,11 +165,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_497_000 picoseconds. - Weight::from_parts(20_481_952, 0) + // Minimum execution time: 22_499_000 picoseconds. + Weight::from_parts(23_643_958, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_506 - .saturating_add(Weight::from_parts(36_598, 0).saturating_mul(p.into())) + // Standard Error: 1_765 + .saturating_add(Weight::from_parts(50_161, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,26 +180,24 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 17_813_000 picoseconds. - Weight::from_parts(18_486_997, 0) + // Minimum execution time: 21_158_000 picoseconds. + Weight::from_parts(21_983_601, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_239 - .saturating_add(Weight::from_parts(41_601, 0).saturating_mul(p.into())) + // Standard Error: 1_505 + .saturating_add(Weight::from_parts(50_322, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { + fn create_pure(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `4706` - // Minimum execution time: 20_252_000 picoseconds. - Weight::from_parts(21_007_321, 0) + // Minimum execution time: 23_646_000 picoseconds. + Weight::from_parts(24_989_761, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_178 - .saturating_add(Weight::from_parts(16_876, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -216,11 +208,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `126 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 18_774_000 picoseconds. - Weight::from_parts(19_624_167, 0) + // Minimum execution time: 22_150_000 picoseconds. + Weight::from_parts(22_367_724, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_031 - .saturating_add(Weight::from_parts(25_173, 0).saturating_mul(p.into())) + // Standard Error: 7_381 + .saturating_add(Weight::from_parts(129_420, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/pallet_referenda.rs b/relay/paseo/src/weights/pallet_referenda.rs index 6b01a21..9432d4c 100644 --- a/relay/paseo/src/weights/pallet_referenda.rs +++ b/relay/paseo/src/weights/pallet_referenda.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_referenda` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_referenda // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,8 +57,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `42428` - // Minimum execution time: 29_169_000 picoseconds. - Weight::from_parts(30_199_000, 0) + // Minimum execution time: 34_179_000 picoseconds. + Weight::from_parts(35_538_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -75,8 +71,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 42_683_000 picoseconds. - Weight::from_parts(43_679_000, 0) + // Minimum execution time: 50_738_000 picoseconds. + Weight::from_parts(58_407_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -93,8 +89,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3226` // Estimated: `42428` - // Minimum execution time: 58_827_000 picoseconds. - Weight::from_parts(60_473_000, 0) + // Minimum execution time: 69_138_000 picoseconds. + Weight::from_parts(75_368_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,8 +107,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3246` // Estimated: `42428` - // Minimum execution time: 58_025_000 picoseconds. - Weight::from_parts(60_216_000, 0) + // Minimum execution time: 65_081_000 picoseconds. + Weight::from_parts(67_683_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -127,8 +123,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 51_660_000 picoseconds. - Weight::from_parts(52_527_000, 0) + // Minimum execution time: 59_711_000 picoseconds. + Weight::from_parts(61_067_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -143,8 +139,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `83866` - // Minimum execution time: 49_530_000 picoseconds. - Weight::from_parts(50_475_000, 0) + // Minimum execution time: 57_660_000 picoseconds. + Weight::from_parts(59_280_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -155,8 +151,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `4401` - // Minimum execution time: 23_690_000 picoseconds. - Weight::from_parts(24_092_000, 0) + // Minimum execution time: 27_573_000 picoseconds. + Weight::from_parts(28_410_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -167,8 +163,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `269` // Estimated: `4401` - // Minimum execution time: 23_781_000 picoseconds. - Weight::from_parts(24_439_000, 0) + // Minimum execution time: 27_591_000 picoseconds. + Weight::from_parts(28_491_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -181,8 +177,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `83866` - // Minimum execution time: 29_541_000 picoseconds. - Weight::from_parts(30_127_000, 0) + // Minimum execution time: 33_826_000 picoseconds. + Weight::from_parts(34_280_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -197,8 +193,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `588` // Estimated: `83866` - // Minimum execution time: 80_515_000 picoseconds. - Weight::from_parts(81_934_000, 0) + // Minimum execution time: 93_648_000 picoseconds. + Weight::from_parts(95_524_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -211,8 +207,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `102` // Estimated: `5477` - // Minimum execution time: 8_390_000 picoseconds. - Weight::from_parts(8_936_000, 0) + // Minimum execution time: 9_934_000 picoseconds. + Weight::from_parts(10_314_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -227,8 +223,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 42_731_000 picoseconds. - Weight::from_parts(44_633_000, 0) + // Minimum execution time: 49_273_000 picoseconds. + Weight::from_parts(51_293_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -243,8 +239,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3116` // Estimated: `42428` - // Minimum execution time: 43_808_000 picoseconds. - Weight::from_parts(46_328_000, 0) + // Minimum execution time: 52_207_000 picoseconds. + Weight::from_parts(56_128_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -257,8 +253,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 23_217_000 picoseconds. - Weight::from_parts(24_659_000, 0) + // Minimum execution time: 26_144_000 picoseconds. + Weight::from_parts(27_483_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -271,8 +267,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2939` // Estimated: `5477` - // Minimum execution time: 22_404_000 picoseconds. - Weight::from_parts(24_822_000, 0) + // Minimum execution time: 24_352_000 picoseconds. + Weight::from_parts(25_630_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -287,8 +283,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2943` // Estimated: `5477` - // Minimum execution time: 26_067_000 picoseconds. - Weight::from_parts(27_467_000, 0) + // Minimum execution time: 29_829_000 picoseconds. + Weight::from_parts(31_249_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -303,8 +299,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2963` // Estimated: `5477` - // Minimum execution time: 26_529_000 picoseconds. - Weight::from_parts(28_025_000, 0) + // Minimum execution time: 29_620_000 picoseconds. + Weight::from_parts(30_851_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -317,8 +313,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299` // Estimated: `42428` - // Minimum execution time: 19_930_000 picoseconds. - Weight::from_parts(20_495_000, 0) + // Minimum execution time: 22_548_000 picoseconds. + Weight::from_parts(23_336_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -331,8 +327,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 20_146_000 picoseconds. - Weight::from_parts(20_732_000, 0) + // Minimum execution time: 22_357_000 picoseconds. + Weight::from_parts(23_214_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -343,8 +339,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `4401` - // Minimum execution time: 12_239_000 picoseconds. - Weight::from_parts(12_683_000, 0) + // Minimum execution time: 14_414_000 picoseconds. + Weight::from_parts(15_048_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -359,8 +355,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 25_979_000 picoseconds. - Weight::from_parts(26_647_000, 0) + // Minimum execution time: 29_440_000 picoseconds. + Weight::from_parts(30_655_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -375,8 +371,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `42428` - // Minimum execution time: 27_336_000 picoseconds. - Weight::from_parts(28_182_000, 0) + // Minimum execution time: 31_772_000 picoseconds. + Weight::from_parts(32_430_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -389,8 +385,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 25_446_000 picoseconds. - Weight::from_parts(26_330_000, 0) + // Minimum execution time: 29_556_000 picoseconds. + Weight::from_parts(29_895_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -403,8 +399,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `383` // Estimated: `42428` - // Minimum execution time: 25_367_000 picoseconds. - Weight::from_parts(26_296_000, 0) + // Minimum execution time: 29_409_000 picoseconds. + Weight::from_parts(30_060_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -417,8 +413,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 24_458_000 picoseconds. - Weight::from_parts(25_279_000, 0) + // Minimum execution time: 28_317_000 picoseconds. + Weight::from_parts(29_076_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -431,8 +427,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `42428` - // Minimum execution time: 23_750_000 picoseconds. - Weight::from_parts(24_454_000, 0) + // Minimum execution time: 27_300_000 picoseconds. + Weight::from_parts(28_103_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -447,8 +443,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `404` // Estimated: `83866` - // Minimum execution time: 34_731_000 picoseconds. - Weight::from_parts(35_568_000, 0) + // Minimum execution time: 39_999_000 picoseconds. + Weight::from_parts(41_028_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -461,8 +457,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `400` // Estimated: `42428` - // Minimum execution time: 25_328_000 picoseconds. - Weight::from_parts(26_100_000, 0) + // Minimum execution time: 29_128_000 picoseconds. + Weight::from_parts(30_107_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -479,8 +475,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4401` - // Minimum execution time: 17_516_000 picoseconds. - Weight::from_parts(18_338_000, 0) + // Minimum execution time: 20_341_000 picoseconds. + Weight::from_parts(20_993_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -493,8 +489,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `283` // Estimated: `4401` - // Minimum execution time: 13_876_000 picoseconds. - Weight::from_parts(14_399_000, 0) + // Minimum execution time: 15_991_000 picoseconds. + Weight::from_parts(16_446_000, 0) .saturating_add(Weight::from_parts(0, 4401)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_scheduler.rs b/relay/paseo/src/weights/pallet_scheduler.rs index 36061f4..c13511f 100644 --- a/relay/paseo/src/weights/pallet_scheduler.rs +++ b/relay/paseo/src/weights/pallet_scheduler.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_scheduler // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +53,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1489` - // Minimum execution time: 3_119_000 picoseconds. - Weight::from_parts(3_304_000, 0) + // Minimum execution time: 3_476_000 picoseconds. + Weight::from_parts(3_700_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -70,11 +66,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 3_512_000 picoseconds. - Weight::from_parts(5_807_625, 0) + // Minimum execution time: 4_022_000 picoseconds. + Weight::from_parts(6_238_863, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 1_525 - .saturating_add(Weight::from_parts(812_636, 0).saturating_mul(s.into())) + // Standard Error: 2_852 + .saturating_add(Weight::from_parts(923_604, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,8 +78,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_517_000 picoseconds. - Weight::from_parts(3_623_000, 0) + // Minimum execution time: 3_845_000 picoseconds. + Weight::from_parts(4_179_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -97,11 +93,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 16_822_000 picoseconds. - Weight::from_parts(16_920_000, 0) + // Minimum execution time: 19_100_000 picoseconds. + Weight::from_parts(19_418_000, 0) .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_294, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_651, 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())) @@ -112,8 +108,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_746_000 picoseconds. - Weight::from_parts(5_046_000, 0) + // Minimum execution time: 7_657_000 picoseconds. + Weight::from_parts(8_395_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -121,24 +117,24 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_655_000 picoseconds. - Weight::from_parts(4_264_000, 0) + // Minimum execution time: 6_586_000 picoseconds. + Weight::from_parts(7_600_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_290_000 picoseconds. - Weight::from_parts(2_516_000, 0) + // Minimum execution time: 3_327_000 picoseconds. + Weight::from_parts(4_267_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_221_000 picoseconds. - Weight::from_parts(2_429_000, 0) + // Minimum execution time: 3_496_000 picoseconds. + Weight::from_parts(4_350_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -148,11 +144,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 9_935_000 picoseconds. - Weight::from_parts(12_025_044, 0) + // Minimum execution time: 16_739_000 picoseconds. + Weight::from_parts(26_945_521, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 1_898 - .saturating_add(Weight::from_parts(840_406, 0).saturating_mul(s.into())) + // Standard Error: 18_837 + .saturating_add(Weight::from_parts(733_842, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -165,11 +161,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 14_350_000 picoseconds. - Weight::from_parts(12_961_113, 0) + // Minimum execution time: 17_060_000 picoseconds. + Weight::from_parts(14_836_720, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 2_598 - .saturating_add(Weight::from_parts(1_540_140, 0).saturating_mul(s.into())) + // Standard Error: 5_576 + .saturating_add(Weight::from_parts(1_738_548, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -182,11 +178,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `293 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 12_775_000 picoseconds. - Weight::from_parts(15_812_724, 0) + // Minimum execution time: 14_641_000 picoseconds. + Weight::from_parts(17_926_133, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 2_587 - .saturating_add(Weight::from_parts(862_721, 0).saturating_mul(s.into())) + // Standard Error: 6_689 + .saturating_add(Weight::from_parts(1_001_047, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -199,11 +195,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `319 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 16_065_000 picoseconds. - Weight::from_parts(15_269_187, 0) + // Minimum execution time: 18_408_000 picoseconds. + Weight::from_parts(20_751_089, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 1_860 - .saturating_add(Weight::from_parts(1_545_609, 0).saturating_mul(s.into())) + // Standard Error: 18_134 + .saturating_add(Weight::from_parts(1_770_656, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_session.rs b/relay/paseo/src/weights/pallet_session.rs index f119bfb..7df93c0 100644 --- a/relay/paseo/src/weights/pallet_session.rs +++ b/relay/paseo/src/weights/pallet_session.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `pallet_session` //! diff --git a/relay/paseo/src/weights/pallet_staking.rs b/relay/paseo/src/weights/pallet_staking.rs index 8eca02a..437c37f 100644 --- a/relay/paseo/src/weights/pallet_staking.rs +++ b/relay/paseo/src/weights/pallet_staking.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `pallet_staking` //! diff --git a/relay/paseo/src/weights/pallet_timestamp.rs b/relay/paseo/src/weights/pallet_timestamp.rs index 9626be2..98cb8b6 100644 --- a/relay/paseo/src/weights/pallet_timestamp.rs +++ b/relay/paseo/src/weights/pallet_timestamp.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `1493` - // Minimum execution time: 6_413_000 picoseconds. - Weight::from_parts(6_660_000, 0) + // Minimum execution time: 7_454_000 picoseconds. + Weight::from_parts(7_665_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -69,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 3_204_000 picoseconds. - Weight::from_parts(3_415_000, 0) + // Minimum execution time: 3_856_000 picoseconds. + Weight::from_parts(4_024_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/relay/paseo/src/weights/pallet_treasury.rs b/relay/paseo/src/weights/pallet_treasury.rs index d4b34de..0651247 100644 --- a/relay/paseo/src/weights/pallet_treasury.rs +++ b/relay/paseo/src/weights/pallet_treasury.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_treasury` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_treasury // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,8 +57,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `1887` - // Minimum execution time: 10_292_000 picoseconds. - Weight::from_parts(10_755_000, 0) + // Minimum execution time: 12_918_000 picoseconds. + Weight::from_parts(21_195_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -75,8 +71,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `143` // Estimated: `1489` - // Minimum execution time: 21_095_000 picoseconds. - Weight::from_parts(21_734_000, 0) + // Minimum execution time: 25_333_000 picoseconds. + Weight::from_parts(31_773_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -89,8 +85,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `301` // Estimated: `3593` - // Minimum execution time: 31_718_000 picoseconds. - Weight::from_parts(32_646_000, 0) + // Minimum execution time: 37_664_000 picoseconds. + Weight::from_parts(42_560_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -104,11 +100,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `470 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 7_362_000 picoseconds. - Weight::from_parts(9_257_989, 0) + // Minimum execution time: 9_079_000 picoseconds. + Weight::from_parts(14_150_902, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_701 - .saturating_add(Weight::from_parts(104_627, 0).saturating_mul(p.into())) + // Standard Error: 3_131 + .saturating_add(Weight::from_parts(73_638, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -118,8 +114,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `1887` - // Minimum execution time: 5_852_000 picoseconds. - Weight::from_parts(6_141_000, 0) + // Minimum execution time: 6_548_000 picoseconds. + Weight::from_parts(6_993_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -139,11 +135,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `285 + p * (251 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 28_051_000 picoseconds. - Weight::from_parts(23_853_733, 0) + // Minimum execution time: 31_333_000 picoseconds. + Weight::from_parts(77_903_529, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 15_468 - .saturating_add(Weight::from_parts(32_207_413, 0).saturating_mul(p.into())) + // Standard Error: 360_560 + .saturating_add(Weight::from_parts(37_514_620, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -160,8 +156,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115` // Estimated: `4703` - // Minimum execution time: 17_364_000 picoseconds. - Weight::from_parts(17_972_000, 0) + // Minimum execution time: 18_662_000 picoseconds. + Weight::from_parts(19_406_000, 0) .saturating_add(Weight::from_parts(0, 4703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -184,8 +180,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `254` // Estimated: `5318` - // Minimum execution time: 40_883_000 picoseconds. - Weight::from_parts(41_991_000, 0) + // Minimum execution time: 44_538_000 picoseconds. + Weight::from_parts(45_907_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -198,8 +194,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `5318` - // Minimum execution time: 20_488_000 picoseconds. - Weight::from_parts(21_324_000, 0) + // Minimum execution time: 22_907_000 picoseconds. + Weight::from_parts(23_604_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -210,8 +206,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `178` // Estimated: `5318` - // Minimum execution time: 12_268_000 picoseconds. - Weight::from_parts(12_888_000, 0) + // Minimum execution time: 13_455_000 picoseconds. + Weight::from_parts(13_985_000, 0) .saturating_add(Weight::from_parts(0, 5318)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/pallet_utility.rs b/relay/paseo/src/weights/pallet_utility.rs index 6a95486..f554de6 100644 --- a/relay/paseo/src/weights/pallet_utility.rs +++ b/relay/paseo/src/weights/pallet_utility.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_utility // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -56,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_453_000 picoseconds. - Weight::from_parts(5_295_358, 0) + // Minimum execution time: 10_624_000 picoseconds. + Weight::from_parts(12_155_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_024 - .saturating_add(Weight::from_parts(3_453_064, 0).saturating_mul(c.into())) + // Standard Error: 9_482 + .saturating_add(Weight::from_parts(3_961_102, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_264_000 picoseconds. - Weight::from_parts(4_520_000, 0) + // Minimum execution time: 4_974_000 picoseconds. + Weight::from_parts(5_099_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -75,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_360_000 picoseconds. - Weight::from_parts(6_086_702, 0) + // Minimum execution time: 5_010_000 picoseconds. + Weight::from_parts(5_078_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_531 - .saturating_add(Weight::from_parts(3_737_967, 0).saturating_mul(c.into())) + // Standard Error: 9_046 + .saturating_add(Weight::from_parts(4_214_897, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_489_000 picoseconds. - Weight::from_parts(6_811_000, 0) + // Minimum execution time: 7_649_000 picoseconds. + Weight::from_parts(8_105_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -94,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_510_000 picoseconds. - Weight::from_parts(18_022_183, 0) + // Minimum execution time: 4_945_000 picoseconds. + Weight::from_parts(42_325_739, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_452 - .saturating_add(Weight::from_parts(3_425_050, 0).saturating_mul(c.into())) + // Standard Error: 7_025 + .saturating_add(Weight::from_parts(3_794_091, 0).saturating_mul(c.into())) } } diff --git a/relay/paseo/src/weights/pallet_vesting.rs b/relay/paseo/src/weights/pallet_vesting.rs index 41831b8..902caae 100644 --- a/relay/paseo/src/weights/pallet_vesting.rs +++ b/relay/paseo/src/weights/pallet_vesting.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_vesting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_vesting // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -63,13 +59,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 31_405_000 picoseconds. - Weight::from_parts(30_840_736, 0) + // Minimum execution time: 37_782_000 picoseconds. + Weight::from_parts(37_209_164, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_079 - .saturating_add(Weight::from_parts(43_542, 0).saturating_mul(l.into())) - // Standard Error: 1_919 - .saturating_add(Weight::from_parts(68_078, 0).saturating_mul(s.into())) + // Standard Error: 5_763 + .saturating_add(Weight::from_parts(52_944, 0).saturating_mul(l.into())) + // Standard Error: 10_254 + .saturating_add(Weight::from_parts(106_176, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -81,17 +77,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_unlocked(l: u32, s: u32, ) -> Weight { + fn vest_unlocked(_l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 33_688_000 picoseconds. - Weight::from_parts(34_504_027, 0) + // Minimum execution time: 40_415_000 picoseconds. + Weight::from_parts(48_730_072, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_565 - .saturating_add(Weight::from_parts(12_940, 0).saturating_mul(l.into())) - // Standard Error: 2_785 - .saturating_add(Weight::from_parts(51_071, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -109,13 +101,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 33_180_000 picoseconds. - Weight::from_parts(32_321_116, 0) + // Minimum execution time: 39_796_000 picoseconds. + Weight::from_parts(39_991_208, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_426 - .saturating_add(Weight::from_parts(49_121, 0).saturating_mul(l.into())) - // Standard Error: 2_537 - .saturating_add(Weight::from_parts(86_619, 0).saturating_mul(s.into())) + // Standard Error: 4_129 + .saturating_add(Weight::from_parts(39_477, 0).saturating_mul(l.into())) + // Standard Error: 7_347 + .saturating_add(Weight::from_parts(83_697, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -133,13 +125,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 35_454_000 picoseconds. - Weight::from_parts(34_966_137, 0) + // Minimum execution time: 42_209_000 picoseconds. + Weight::from_parts(41_379_744, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_241 - .saturating_add(Weight::from_parts(40_990, 0).saturating_mul(l.into())) - // Standard Error: 2_208 - .saturating_add(Weight::from_parts(73_858, 0).saturating_mul(s.into())) + // Standard Error: 11_512 + .saturating_add(Weight::from_parts(36_983, 0).saturating_mul(l.into())) + // Standard Error: 20_483 + .saturating_add(Weight::from_parts(199_047, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -153,17 +145,15 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. - fn vested_transfer(l: u32, s: u32, ) -> Weight { + fn vested_transfer(_l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `522 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 65_630_000 picoseconds. - Weight::from_parts(66_625_551, 0) + // Minimum execution time: 77_662_000 picoseconds. + Weight::from_parts(84_425_317, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_383 - .saturating_add(Weight::from_parts(37_953, 0).saturating_mul(l.into())) - // Standard Error: 4_239 - .saturating_add(Weight::from_parts(83_215, 0).saturating_mul(s.into())) + // Standard Error: 18_272 + .saturating_add(Weight::from_parts(58_344, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -181,13 +171,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `625 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 66_782_000 picoseconds. - Weight::from_parts(67_144_629, 0) + // Minimum execution time: 79_098_000 picoseconds. + Weight::from_parts(74_973_773, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 1_855 - .saturating_add(Weight::from_parts(58_537, 0).saturating_mul(l.into())) - // Standard Error: 3_301 - .saturating_add(Weight::from_parts(98_271, 0).saturating_mul(s.into())) + // Standard Error: 12_272 + .saturating_add(Weight::from_parts(143_548, 0).saturating_mul(l.into())) + // Standard Error: 21_835 + .saturating_add(Weight::from_parts(276_360, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -205,13 +195,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 34_170_000 picoseconds. - Weight::from_parts(33_344_840, 0) + // Minimum execution time: 40_907_000 picoseconds. + Weight::from_parts(36_294_741, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_452 - .saturating_add(Weight::from_parts(41_128, 0).saturating_mul(l.into())) - // Standard Error: 2_681 - .saturating_add(Weight::from_parts(76_971, 0).saturating_mul(s.into())) + // Standard Error: 15_221 + .saturating_add(Weight::from_parts(190_813, 0).saturating_mul(l.into())) + // Standard Error: 28_109 + .saturating_add(Weight::from_parts(214_102, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -229,13 +219,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 36_360_000 picoseconds. - Weight::from_parts(35_601_232, 0) + // Minimum execution time: 43_928_000 picoseconds. + Weight::from_parts(34_100_621, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_851 - .saturating_add(Weight::from_parts(36_717, 0).saturating_mul(l.into())) - // Standard Error: 3_420 - .saturating_add(Weight::from_parts(84_786, 0).saturating_mul(s.into())) + // Standard Error: 22_781 + .saturating_add(Weight::from_parts(170_121, 0).saturating_mul(l.into())) + // Standard Error: 42_072 + .saturating_add(Weight::from_parts(534_360, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/relay/paseo/src/weights/pallet_whitelist.rs b/relay/paseo/src/weights/pallet_whitelist.rs index 802c551..74e7216 100644 --- a/relay/paseo/src/weights/pallet_whitelist.rs +++ b/relay/paseo/src/weights/pallet_whitelist.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_whitelist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_whitelist // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,8 +57,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `118` // Estimated: `3556` - // Minimum execution time: 16_438_000 picoseconds. - Weight::from_parts(17_010_000, 0) + // Minimum execution time: 19_350_000 picoseconds. + Weight::from_parts(19_846_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -77,8 +73,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `247` // Estimated: `3556` - // Minimum execution time: 15_790_000 picoseconds. - Weight::from_parts(16_296_000, 0) + // Minimum execution time: 18_925_000 picoseconds. + Weight::from_parts(19_435_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,11 +92,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `323 + n * (1 ±0)` // Estimated: `3787 + n * (1 ±0)` - // Minimum execution time: 26_102_000 picoseconds. - Weight::from_parts(28_436_000, 0) + // Minimum execution time: 30_362_000 picoseconds. + Weight::from_parts(30_817_000, 0) .saturating_add(Weight::from_parts(0, 3787)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_349, 0).saturating_mul(n.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_702, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -116,11 +112,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `247` // Estimated: `3556` - // Minimum execution time: 19_423_000 picoseconds. - Weight::from_parts(20_061_587, 0) + // Minimum execution time: 22_714_000 picoseconds. + Weight::from_parts(23_915_095, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_470, 0).saturating_mul(n.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_757, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/pallet_xcm.rs b/relay/paseo/src/weights/pallet_xcm.rs index 6296c77..0a4c648 100644 --- a/relay/paseo/src/weights/pallet_xcm.rs +++ b/relay/paseo/src/weights/pallet_xcm.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_xcm` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -63,8 +59,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 28_308_000 picoseconds. - Weight::from_parts(29_143_000, 0) + // Minimum execution time: 33_065_000 picoseconds. + Weight::from_parts(33_845_000, 0) .saturating_add(Weight::from_parts(0, 3541)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -73,16 +69,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_253_000 picoseconds. - Weight::from_parts(17_815_000, 0) + // Minimum execution time: 20_161_000 picoseconds. + Weight::from_parts(20_523_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_956_000 picoseconds. - Weight::from_parts(17_260_000, 0) + // Minimum execution time: 20_143_000 picoseconds. + Weight::from_parts(20_929_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Benchmark::Override` (r:0 w:0) @@ -101,8 +97,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_620_000 picoseconds. - Weight::from_parts(7_948_000, 0) + // Minimum execution time: 8_574_000 picoseconds. + Weight::from_parts(8_963_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -110,8 +106,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_163_000 picoseconds. - Weight::from_parts(2_292_000, 0) + // Minimum execution time: 2_309_000 picoseconds. + Weight::from_parts(2_555_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1) @@ -132,8 +128,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 31_554_000 picoseconds. - Weight::from_parts(32_308_000, 0) + // Minimum execution time: 36_645_000 picoseconds. + Weight::from_parts(38_032_000, 0) .saturating_add(Weight::from_parts(0, 3541)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -154,8 +150,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `256` // Estimated: `3721` - // Minimum execution time: 37_442_000 picoseconds. - Weight::from_parts(38_651_000, 0) + // Minimum execution time: 44_307_000 picoseconds. + Weight::from_parts(45_937_000, 0) .saturating_add(Weight::from_parts(0, 3721)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -166,8 +162,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_115_000 picoseconds. - Weight::from_parts(2_354_000, 0) + // Minimum execution time: 2_391_000 picoseconds. + Weight::from_parts(2_623_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -177,8 +173,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `26` // Estimated: `10916` - // Minimum execution time: 14_347_000 picoseconds. - Weight::from_parts(14_884_000, 0) + // Minimum execution time: 16_873_000 picoseconds. + Weight::from_parts(17_240_000, 0) .saturating_add(Weight::from_parts(0, 10916)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -189,8 +185,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `30` // Estimated: `10920` - // Minimum execution time: 14_542_000 picoseconds. - Weight::from_parts(14_846_000, 0) + // Minimum execution time: 16_827_000 picoseconds. + Weight::from_parts(17_291_000, 0) .saturating_add(Weight::from_parts(0, 10920)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -201,8 +197,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `13405` - // Minimum execution time: 16_274_000 picoseconds. - Weight::from_parts(16_460_000, 0) + // Minimum execution time: 18_079_000 picoseconds. + Weight::from_parts(19_032_000, 0) .saturating_add(Weight::from_parts(0, 13405)) .saturating_add(T::DbWeight::get().reads(5)) } @@ -220,8 +216,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `112` // Estimated: `6052` - // Minimum execution time: 30_015_000 picoseconds. - Weight::from_parts(30_950_000, 0) + // Minimum execution time: 34_768_000 picoseconds. + Weight::from_parts(35_950_000, 0) .saturating_add(Weight::from_parts(0, 6052)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) @@ -232,8 +228,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `8484` - // Minimum execution time: 9_517_000 picoseconds. - Weight::from_parts(9_811_000, 0) + // Minimum execution time: 10_789_000 picoseconds. + Weight::from_parts(11_535_000, 0) .saturating_add(Weight::from_parts(0, 8484)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -243,8 +239,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `37` // Estimated: `10927` - // Minimum execution time: 14_861_000 picoseconds. - Weight::from_parts(15_225_000, 0) + // Minimum execution time: 17_327_000 picoseconds. + Weight::from_parts(17_825_000, 0) .saturating_add(Weight::from_parts(0, 10927)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -263,8 +259,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `116` // Estimated: `11006` - // Minimum execution time: 37_179_000 picoseconds. - Weight::from_parts(38_146_000, 0) + // Minimum execution time: 43_294_000 picoseconds. + Weight::from_parts(43_963_000, 0) .saturating_add(Weight::from_parts(0, 11006)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/relay/paseo/src/weights/runtime_common_auctions.rs b/relay/paseo/src/weights/runtime_common_auctions.rs index 5be0852..fe14155 100644 --- a/relay/paseo/src/weights/runtime_common_auctions.rs +++ b/relay/paseo/src/weights/runtime_common_auctions.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_common::auctions` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_common::auctions // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +55,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 7_727_000 picoseconds. - Weight::from_parts(8_026_000, 0) + // Minimum execution time: 15_487_000 picoseconds. + Weight::from_parts(16_211_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,8 +79,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `695` // Estimated: `6060` - // Minimum execution time: 84_718_000 picoseconds. - Weight::from_parts(91_673_000, 0) + // Minimum execution time: 93_120_000 picoseconds. + Weight::from_parts(105_213_000, 0) .saturating_add(Weight::from_parts(0, 6060)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -113,10 +109,10 @@ impl runtime_common::auctions::WeightInfo for WeightInf /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: - // Measured: `6946955` + // Measured: `6946951` // Estimated: `15822990` - // Minimum execution time: 7_298_217_000 picoseconds. - Weight::from_parts(7_924_190_000, 0) + // Minimum execution time: 7_863_664_000 picoseconds. + Weight::from_parts(8_515_161_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3687)) .saturating_add(T::DbWeight::get().writes(3682)) @@ -133,8 +129,8 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_676_822_000 picoseconds. - Weight::from_parts(6_267_314_000, 0) + // Minimum execution time: 5_968_033_000 picoseconds. + Weight::from_parts(6_372_198_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3673)) .saturating_add(T::DbWeight::get().writes(3673)) diff --git a/relay/paseo/src/weights/runtime_common_claims.rs b/relay/paseo/src/weights/runtime_common_claims.rs index 1fb3ad9..4462b3c 100644 --- a/relay/paseo/src/weights/runtime_common_claims.rs +++ b/relay/paseo/src/weights/runtime_common_claims.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_common::claims` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_common::claims // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -69,10 +65,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim() -> Weight { // Proof Size summary in bytes: - // Measured: `578` + // Measured: `620` // Estimated: `4764` - // Minimum execution time: 202_961_000 picoseconds. - Weight::from_parts(233_627_000, 0) + // Minimum execution time: 230_256_000 picoseconds. + Weight::from_parts(260_822_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -89,8 +85,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `182` // Estimated: `1667` - // Minimum execution time: 12_352_000 picoseconds. - Weight::from_parts(15_063_000, 0) + // Minimum execution time: 14_592_000 picoseconds. + Weight::from_parts(15_621_000, 0) .saturating_add(Weight::from_parts(0, 1667)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -113,10 +109,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn claim_attest() -> Weight { // Proof Size summary in bytes: - // Measured: `578` + // Measured: `620` // Estimated: `4764` - // Minimum execution time: 204_842_000 picoseconds. - Weight::from_parts(227_728_000, 0) + // Minimum execution time: 231_228_000 picoseconds. + Weight::from_parts(263_872_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -141,10 +137,10 @@ impl runtime_common::claims::WeightInfo for WeightInfo< /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) fn attest() -> Weight { // Proof Size summary in bytes: - // Measured: `652` + // Measured: `694` // Estimated: `4764` - // Minimum execution time: 105_101_000 picoseconds. - Weight::from_parts(130_265_000, 0) + // Minimum execution time: 118_201_000 picoseconds. + Weight::from_parts(141_675_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -161,8 +157,8 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `406` // Estimated: `3871` - // Minimum execution time: 32_946_000 picoseconds. - Weight::from_parts(36_670_000, 0) + // Minimum execution time: 35_234_000 picoseconds. + Weight::from_parts(47_044_000, 0) .saturating_add(Weight::from_parts(0, 3871)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/relay/paseo/src/weights/runtime_common_crowdloan.rs b/relay/paseo/src/weights/runtime_common_crowdloan.rs index 11f0bab..5b28167 100644 --- a/relay/paseo/src/weights/runtime_common_crowdloan.rs +++ b/relay/paseo/src/weights/runtime_common_crowdloan.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_common::crowdloan` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_common::crowdloan // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -65,8 +61,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `415` // Estimated: `3880` - // Minimum execution time: 49_379_000 picoseconds. - Weight::from_parts(66_396_000, 0) + // Minimum execution time: 59_578_000 picoseconds. + Weight::from_parts(64_274_000, 0) .saturating_add(Weight::from_parts(0, 3880)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -89,8 +85,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `497` // Estimated: `3962` - // Minimum execution time: 137_292_000 picoseconds. - Weight::from_parts(144_195_000, 0) + // Minimum execution time: 169_303_000 picoseconds. + Weight::from_parts(173_974_000, 0) .saturating_add(Weight::from_parts(0, 3962)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -105,8 +101,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `687` // Estimated: `6196` - // Minimum execution time: 92_857_000 picoseconds. - Weight::from_parts(99_607_000, 0) + // Minimum execution time: 95_037_000 picoseconds. + Weight::from_parts(107_518_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -118,11 +114,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `125 + k * (189 ±0)` // Estimated: `138 + k * (189 ±0)` - // Minimum execution time: 76_640_000 picoseconds. - Weight::from_parts(80_548_000, 0) + // Minimum execution time: 80_938_000 picoseconds. + Weight::from_parts(86_900_000, 0) .saturating_add(Weight::from_parts(0, 138)) - // Standard Error: 23_577 - .saturating_add(Weight::from_parts(40_454_538, 0).saturating_mul(k.into())) + // Standard Error: 46_926 + .saturating_add(Weight::from_parts(46_902_741, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -137,8 +133,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `515` // Estimated: `6196` - // Minimum execution time: 49_925_000 picoseconds. - Weight::from_parts(58_641_000, 0) + // Minimum execution time: 59_022_000 picoseconds. + Weight::from_parts(61_191_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -149,8 +145,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `235` // Estimated: `3700` - // Minimum execution time: 22_397_000 picoseconds. - Weight::from_parts(28_269_000, 0) + // Minimum execution time: 28_409_000 picoseconds. + Weight::from_parts(31_897_000, 0) .saturating_add(Weight::from_parts(0, 3700)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -163,8 +159,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(42_988_000, 0) + // Minimum execution time: 51_910_000 picoseconds. + Weight::from_parts(58_611_000, 0) .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -177,8 +173,8 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `239` // Estimated: `3704` - // Minimum execution time: 24_470_000 picoseconds. - Weight::from_parts(31_209_000, 0) + // Minimum execution time: 29_243_000 picoseconds. + Weight::from_parts(32_172_000, 0) .saturating_add(Weight::from_parts(0, 3704)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -208,11 +204,11 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `164 + n * (356 ±0)` // Estimated: `5385 + n * (2832 ±0)` - // Minimum execution time: 121_731_000 picoseconds. - Weight::from_parts(14_348_244, 0) + // Minimum execution time: 143_769_000 picoseconds. + Weight::from_parts(12_748_655, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 48_878 - .saturating_add(Weight::from_parts(55_109_373, 0).saturating_mul(n.into())) + // Standard Error: 119_020 + .saturating_add(Weight::from_parts(63_546_710, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/runtime_common_paras_registrar.rs b/relay/paseo/src/weights/runtime_common_paras_registrar.rs index 42d14e6..4e172b1 100644 --- a/relay/paseo/src/weights/runtime_common_paras_registrar.rs +++ b/relay/paseo/src/weights/runtime_common_paras_registrar.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_common::paras_registrar` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_common::paras_registrar // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -61,8 +57,8 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `70` // Estimated: `3535` - // Minimum execution time: 22_997_000 picoseconds. - Weight::from_parts(23_646_000, 0) + // Minimum execution time: 26_787_000 picoseconds. + Weight::from_parts(28_307_000, 0) .saturating_add(Weight::from_parts(0, 3535)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -87,11 +83,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`) fn register() -> Weight { // Proof Size summary in bytes: - // Measured: `390` - // Estimated: `3855` - // Minimum execution time: 6_962_183_000 picoseconds. - Weight::from_parts(7_350_365_000, 0) - .saturating_add(Weight::from_parts(0, 3855)) + // Measured: `353` + // Estimated: `3818` + // Minimum execution time: 8_559_329_000 picoseconds. + Weight::from_parts(8_685_268_000, 0) + .saturating_add(Weight::from_parts(0, 3818)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -115,11 +111,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_register() -> Weight { // Proof Size summary in bytes: - // Measured: `280` - // Estimated: `3745` - // Minimum execution time: 6_834_072_000 picoseconds. - Weight::from_parts(7_204_347_000, 0) - .saturating_add(Weight::from_parts(0, 3745)) + // Measured: `243` + // Estimated: `3708` + // Minimum execution time: 8_340_129_000 picoseconds. + Weight::from_parts(8_504_314_000, 0) + .saturating_add(Weight::from_parts(0, 3708)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -139,11 +135,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `504` - // Estimated: `3969` - // Minimum execution time: 56_112_000 picoseconds. - Weight::from_parts(62_891_000, 0) - .saturating_add(Weight::from_parts(0, 3969)) + // Measured: `500` + // Estimated: `3965` + // Minimum execution time: 67_832_000 picoseconds. + Weight::from_parts(71_166_000, 0) + .saturating_add(Weight::from_parts(0, 3965)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -163,11 +159,11 @@ impl runtime_common::paras_registrar::WeightInfo for We /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`) fn swap() -> Weight { // Proof Size summary in bytes: - // Measured: `775` - // Estimated: `6715` - // Minimum execution time: 66_400_000 picoseconds. - Weight::from_parts(77_994_000, 0) - .saturating_add(Weight::from_parts(0, 6715)) + // Measured: `771` + // Estimated: `6711` + // Minimum execution time: 72_375_000 picoseconds. + Weight::from_parts(78_797_000, 0) + .saturating_add(Weight::from_parts(0, 6711)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -192,13 +188,13 @@ impl runtime_common::paras_registrar::WeightInfo for We /// The range of component `b` is `[1, 3145728]`. fn schedule_code_upgrade(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `238` - // Estimated: `3703` - // Minimum execution time: 33_122_000 picoseconds. - Weight::from_parts(203_059_387, 0) - .saturating_add(Weight::from_parts(0, 3703)) - // Standard Error: 13 - .saturating_add(Weight::from_parts(2_018, 0).saturating_mul(b.into())) + // Measured: `201` + // Estimated: `3666` + // Minimum execution time: 38_786_000 picoseconds. + Weight::from_parts(343_116_696, 0) + .saturating_add(Weight::from_parts(0, 3666)) + // Standard Error: 22 + .saturating_add(Weight::from_parts(2_417, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -209,11 +205,11 @@ impl runtime_common::paras_registrar::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_614_000 picoseconds. - Weight::from_parts(5_881_578, 0) + // Minimum execution time: 7_653_000 picoseconds. + Weight::from_parts(7_723_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(980, 0).saturating_mul(b.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_223, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/paseo/src/weights/runtime_common_slots.rs b/relay/paseo/src/weights/runtime_common_slots.rs index aad7121..1527cc2 100644 --- a/relay/paseo/src/weights/runtime_common_slots.rs +++ b/relay/paseo/src/weights/runtime_common_slots.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_common::slots` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_common::slots // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,8 +55,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `557 + c * (20 ±0) + t * (234 ±0)` - // Estimated: `4028 + c * (2496 ±0) + t * (2709 ±0)` - // Minimum execution time: 709_290_000 picoseconds. - Weight::from_parts(721_642_000, 0) - .saturating_add(Weight::from_parts(0, 4028)) - // Standard Error: 86_997 - .saturating_add(Weight::from_parts(2_876_796, 0).saturating_mul(c.into())) - // Standard Error: 86_997 - .saturating_add(Weight::from_parts(9_088_187, 0).saturating_mul(t.into())) + // Measured: `553 + c * (20 ±0) + t * (234 ±0)` + // Estimated: `4024 + c * (2496 ±0) + t * (2709 ±0)` + // Minimum execution time: 801_460_000 picoseconds. + Weight::from_parts(809_874_000, 0) + .saturating_add(Weight::from_parts(0, 4024)) + // Standard Error: 96_620 + .saturating_add(Weight::from_parts(3_236_613, 0).saturating_mul(c.into())) + // Standard Error: 96_620 + .saturating_add(Weight::from_parts(9_930_496, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) @@ -105,8 +101,8 @@ impl runtime_common::slots::WeightInfo for WeightInfo runtime_common::slots::WeightInfo for WeightInfo Weight { // Proof Size summary in bytes: - // Measured: `550` - // Estimated: `4015` - // Minimum execution time: 28_188_000 picoseconds. - Weight::from_parts(34_661_000, 0) - .saturating_add(Weight::from_parts(0, 4015)) + // Measured: `546` + // Estimated: `4011` + // Minimum execution time: 29_884_000 picoseconds. + Weight::from_parts(32_515_000, 0) + .saturating_add(Weight::from_parts(0, 4011)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/relay/paseo/src/weights/runtime_parachains_configuration.rs b/relay/paseo/src/weights/runtime_parachains_configuration.rs index c35f148..9f75eb1 100644 --- a/relay/paseo/src/weights/runtime_parachains_configuration.rs +++ b/relay/paseo/src/weights/runtime_parachains_configuration.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::configuration` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::configuration // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,11 +55,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_block_number() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 7_858_000 picoseconds. - Weight::from_parts(8_405_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 8_720_000 picoseconds. + Weight::from_parts(9_112_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -75,11 +71,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 7_704_000 picoseconds. - Weight::from_parts(8_276_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 8_744_000 picoseconds. + Weight::from_parts(8_951_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -91,11 +87,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_option_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 7_854_000 picoseconds. - Weight::from_parts(8_141_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 8_753_000 picoseconds. + Weight::from_parts(9_168_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -117,11 +113,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 7_745_000 picoseconds. - Weight::from_parts(8_117_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 8_695_000 picoseconds. + Weight::from_parts(9_077_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -133,11 +129,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_executor_params() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 9_780_000 picoseconds. - Weight::from_parts(10_108_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_980_000 picoseconds. + Weight::from_parts(11_289_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +145,11 @@ impl runtime_parachains::configuration::WeightInfo for /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_perbill() -> Weight { // Proof Size summary in bytes: - // Measured: `155` - // Estimated: `1640` - // Minimum execution time: 7_778_000 picoseconds. - Weight::from_parts(7_994_000, 0) - .saturating_add(Weight::from_parts(0, 1640)) + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 8_888_000 picoseconds. + Weight::from_parts(9_055_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/runtime_parachains_disputes.rs b/relay/paseo/src/weights/runtime_parachains_disputes.rs index 887d949..c144e27 100644 --- a/relay/paseo/src/weights/runtime_parachains_disputes.rs +++ b/relay/paseo/src/weights/runtime_parachains_disputes.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::disputes` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::disputes // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -57,8 +53,8 @@ impl runtime_parachains::disputes::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_118_000 picoseconds. - Weight::from_parts(2_288_000, 0) + // Minimum execution time: 2_416_000 picoseconds. + Weight::from_parts(2_779_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs b/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs index 05e4797..bd3812f 100644 --- a/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs +++ b/relay/paseo/src/weights/runtime_parachains_disputes_slashing.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! diff --git a/relay/paseo/src/weights/runtime_parachains_hrmp.rs b/relay/paseo/src/weights/runtime_parachains_hrmp.rs index 49c03a7..6279854 100644 --- a/relay/paseo/src/weights/runtime_parachains_hrmp.rs +++ b/relay/paseo/src/weights/runtime_parachains_hrmp.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::hrmp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::hrmp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -71,8 +67,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383` // Estimated: `3848` - // Minimum execution time: 31_833_000 picoseconds. - Weight::from_parts(32_774_000, 0) + // Minimum execution time: 36_910_000 picoseconds. + Weight::from_parts(37_613_000, 0) .saturating_add(Weight::from_parts(0, 3848)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -91,8 +87,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `373` // Estimated: `3838` - // Minimum execution time: 30_175_000 picoseconds. - Weight::from_parts(31_047_000, 0) + // Minimum execution time: 34_407_000 picoseconds. + Weight::from_parts(35_492_000, 0) .saturating_add(Weight::from_parts(0, 3838)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -111,8 +107,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `486` // Estimated: `3951` - // Minimum execution time: 30_960_000 picoseconds. - Weight::from_parts(31_882_000, 0) + // Minimum execution time: 35_889_000 picoseconds. + Weight::from_parts(37_339_000, 0) .saturating_add(Weight::from_parts(0, 3951)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -135,13 +131,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `231 + e * (100 ±0) + i * (100 ±0)` // Estimated: `3693 + e * (2575 ±0) + i * (2575 ±0)` - // Minimum execution time: 1_191_776_000 picoseconds. - Weight::from_parts(1_208_323_000, 0) + // Minimum execution time: 1_350_496_000 picoseconds. + Weight::from_parts(1_361_960_000, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 112_675 - .saturating_add(Weight::from_parts(3_778_292, 0).saturating_mul(i.into())) - // Standard Error: 112_675 - .saturating_add(Weight::from_parts(3_675_422, 0).saturating_mul(e.into())) + // Standard Error: 130_537 + .saturating_add(Weight::from_parts(4_099_149, 0).saturating_mul(i.into())) + // Standard Error: 130_537 + .saturating_add(Weight::from_parts(4_422_961, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(e.into()))) @@ -172,11 +168,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `459 + c * (136 ±0)` // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 5_905_000 picoseconds. - Weight::from_parts(5_998_000, 0) + // Minimum execution time: 7_417_000 picoseconds. + Weight::from_parts(17_914_687, 0) .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 20_615 - .saturating_add(Weight::from_parts(21_192_166, 0).saturating_mul(c.into())) + // Standard Error: 120_447 + .saturating_add(Weight::from_parts(23_713_659, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -200,11 +196,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `302 + c * (124 ±0)` // Estimated: `1762 + c * (2600 ±0)` - // Minimum execution time: 5_206_000 picoseconds. - Weight::from_parts(5_369_000, 0) + // Minimum execution time: 5_939_000 picoseconds. + Weight::from_parts(6_083_000, 0) .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 14_972 - .saturating_add(Weight::from_parts(13_053_974, 0).saturating_mul(c.into())) + // Standard Error: 37_097 + .saturating_add(Weight::from_parts(14_867_885, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -222,11 +218,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `993 + c * (13 ±0)` // Estimated: `4262 + c * (15 ±0)` - // Minimum execution time: 17_426_000 picoseconds. - Weight::from_parts(26_106_849, 0) + // Minimum execution time: 20_702_000 picoseconds. + Weight::from_parts(34_731_147, 0) .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 3_736 - .saturating_add(Weight::from_parts(178_806, 0).saturating_mul(c.into())) + // Standard Error: 7_762 + .saturating_add(Weight::from_parts(157_831, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(c.into())) @@ -240,11 +236,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `210 + c * (63 ±0)` // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 3_609_000 picoseconds. - Weight::from_parts(3_888_793, 0) + // Minimum execution time: 4_221_000 picoseconds. + Weight::from_parts(10_164_001, 0) .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 6_285 - .saturating_add(Weight::from_parts(3_345_275, 0).saturating_mul(c.into())) + // Standard Error: 18_501 + .saturating_add(Weight::from_parts(3_704_856, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -276,11 +272,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383 + c * (235 ±0)` // Estimated: `6323 + c * (235 ±0)` - // Minimum execution time: 44_625_000 picoseconds. - Weight::from_parts(46_553_391, 0) + // Minimum execution time: 51_616_000 picoseconds. + Weight::from_parts(53_530_702, 0) .saturating_add(Weight::from_parts(0, 6323)) - // Standard Error: 115_564 - .saturating_add(Weight::from_parts(13_044_408, 0).saturating_mul(c.into())) + // Standard Error: 127_887 + .saturating_add(Weight::from_parts(15_625_397, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 235).saturating_mul(c.into())) @@ -309,8 +305,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `383` // Estimated: `6323` - // Minimum execution time: 45_093_000 picoseconds. - Weight::from_parts(46_061_000, 0) + // Minimum execution time: 51_271_000 picoseconds. + Weight::from_parts(52_617_000, 0) .saturating_add(Weight::from_parts(0, 6323)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -321,8 +317,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `230` // Estimated: `3695` - // Minimum execution time: 12_021_000 picoseconds. - Weight::from_parts(12_673_000, 0) + // Minimum execution time: 13_778_000 picoseconds. + Weight::from_parts(14_342_000, 0) .saturating_add(Weight::from_parts(0, 3695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/runtime_parachains_inclusion.rs b/relay/paseo/src/weights/runtime_parachains_inclusion.rs index 01749dd..44d49e1 100644 --- a/relay/paseo/src/weights/runtime_parachains_inclusion.rs +++ b/relay/paseo/src/weights/runtime_parachains_inclusion.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::inclusion` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::inclusion // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,11 +60,11 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Proof Size summary in bytes: // Measured: `65761` // Estimated: `69051` - // Minimum execution time: 115_958_000 picoseconds. - Weight::from_parts(116_536_000, 0) + // Minimum execution time: 137_610_000 picoseconds. + Weight::from_parts(146_970_000, 0) .saturating_add(Weight::from_parts(0, 69051)) - // Standard Error: 73_958 - .saturating_add(Weight::from_parts(104_854_920, 0).saturating_mul(i.into())) + // Standard Error: 116_303 + .saturating_add(Weight::from_parts(122_019_644, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) diff --git a/relay/paseo/src/weights/runtime_parachains_initializer.rs b/relay/paseo/src/weights/runtime_parachains_initializer.rs index 11c2bc8..c6fa0e2 100644 --- a/relay/paseo/src/weights/runtime_parachains_initializer.rs +++ b/relay/paseo/src/weights/runtime_parachains_initializer.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::initializer` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::initializer // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,11 +54,11 @@ impl runtime_parachains::initializer::WeightInfo for We // Proof Size summary in bytes: // Measured: `0 + d * (11 ±0)` // Estimated: `1480 + d * (11 ±0)` - // Minimum execution time: 2_807_000 picoseconds. - Weight::from_parts(3_029_000, 0) + // Minimum execution time: 3_373_000 picoseconds. + Weight::from_parts(3_540_000, 0) .saturating_add(Weight::from_parts(0, 1480)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(2_845, 0).saturating_mul(d.into())) + // Standard Error: 24 + .saturating_add(Weight::from_parts(3_040, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 11).saturating_mul(d.into())) diff --git a/relay/paseo/src/weights/runtime_parachains_paras.rs b/relay/paseo/src/weights/runtime_parachains_paras.rs index 6679e32..10819b9 100644 --- a/relay/paseo/src/weights/runtime_parachains_paras.rs +++ b/relay/paseo/src/weights/runtime_parachains_paras.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::paras` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::paras // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -68,11 +64,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `8309` // Estimated: `11774` - // Minimum execution time: 27_533_000 picoseconds. - Weight::from_parts(182_880_491, 0) + // Minimum execution time: 31_492_000 picoseconds. + Weight::from_parts(139_897_361, 0) .saturating_add(Weight::from_parts(0, 11774)) - // Standard Error: 15 - .saturating_add(Weight::from_parts(2_106, 0).saturating_mul(c.into())) + // Standard Error: 18 + .saturating_add(Weight::from_parts(2_405, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -83,11 +79,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_199_000 picoseconds. - Weight::from_parts(1_090_465, 0) + // Minimum execution time: 7_207_000 picoseconds. + Weight::from_parts(7_634_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(989, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Paras::MostRecentContext` (r:0 w:1) @@ -96,8 +92,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_078_000 picoseconds. - Weight::from_parts(3_324_000, 0) + // Minimum execution time: 3_436_000 picoseconds. + Weight::from_parts(3_817_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -122,13 +118,13 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// The range of component `c` is `[1, 3145728]`. fn force_schedule_code_upgrade(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `8489` - // Estimated: `11954` - // Minimum execution time: 40_192_000 picoseconds. - Weight::from_parts(40_857_000, 0) - .saturating_add(Weight::from_parts(0, 11954)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(2_617, 0).saturating_mul(c.into())) + // Measured: `8452` + // Estimated: `11917` + // Minimum execution time: 46_159_000 picoseconds. + Weight::from_parts(47_385_000, 0) + .saturating_add(Weight::from_parts(0, 11917)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_715, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -147,11 +143,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `137` // Estimated: `3602` - // Minimum execution time: 14_795_000 picoseconds. - Weight::from_parts(13_935_047, 0) + // Minimum execution time: 16_876_000 picoseconds. + Weight::from_parts(46_282_638, 0) .saturating_add(Weight::from_parts(0, 3602)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_001, 0).saturating_mul(s.into())) + // Standard Error: 20 + .saturating_add(Weight::from_parts(1_276, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -161,11 +157,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_queue_action() -> Weight { // Proof Size summary in bytes: - // Measured: `4316` - // Estimated: `7781` - // Minimum execution time: 16_330_000 picoseconds. - Weight::from_parts(17_420_000, 0) - .saturating_add(Weight::from_parts(0, 7781)) + // Measured: `4312` + // Estimated: `7777` + // Minimum execution time: 19_078_000 picoseconds. + Weight::from_parts(19_899_000, 0) + .saturating_add(Weight::from_parts(0, 7777)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -182,11 +178,11 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `683` // Estimated: `4148` - // Minimum execution time: 75_830_000 picoseconds. - Weight::from_parts(90_916_387, 0) + // Minimum execution time: 84_721_000 picoseconds. + Weight::from_parts(92_001_769, 0) .saturating_add(Weight::from_parts(0, 4148)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_838, 0).saturating_mul(c.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_081, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -198,8 +194,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `28` // Estimated: `3493` - // Minimum execution time: 5_484_000 picoseconds. - Weight::from_parts(5_831_000, 0) + // Minimum execution time: 6_196_000 picoseconds. + Weight::from_parts(6_517_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -214,8 +210,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 117_087_000 picoseconds. - Weight::from_parts(123_396_000, 0) + // Minimum execution time: 120_340_000 picoseconds. + Weight::from_parts(125_764_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -238,8 +234,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `27360` // Estimated: `30825` - // Minimum execution time: 676_418_000 picoseconds. - Weight::from_parts(695_817_000, 0) + // Minimum execution time: 790_964_000 picoseconds. + Weight::from_parts(845_596_000, 0) .saturating_add(Weight::from_parts(0, 30825)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(104)) @@ -254,8 +250,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `27338` // Estimated: `30803` - // Minimum execution time: 112_738_000 picoseconds. - Weight::from_parts(123_853_000, 0) + // Minimum execution time: 113_886_000 picoseconds. + Weight::from_parts(122_601_000, 0) .saturating_add(Weight::from_parts(0, 30803)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -274,8 +270,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26728` // Estimated: `30193` - // Minimum execution time: 531_484_000 picoseconds. - Weight::from_parts(544_896_000, 0) + // Minimum execution time: 625_871_000 picoseconds. + Weight::from_parts(640_987_000, 0) .saturating_add(Weight::from_parts(0, 30193)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -290,8 +286,8 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 106_905_000 picoseconds. - Weight::from_parts(115_573_000, 0) + // Minimum execution time: 112_652_000 picoseconds. + Weight::from_parts(121_202_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs b/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs index e62d5ca..dfeeb9e 100644 --- a/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/paseo/src/weights/runtime_parachains_paras_inherent.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `runtime_parachains::paras_inherent` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=runtime_parachains::paras_inherent // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -118,13 +114,13 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// The range of component `v` is `[10, 200]`. fn enter_variable_disputes(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `50688` - // Estimated: `56628 + v * (23 ±0)` - // Minimum execution time: 999_695_000 picoseconds. - Weight::from_parts(471_453_373, 0) - .saturating_add(Weight::from_parts(0, 56628)) - // Standard Error: 16_808 - .saturating_add(Weight::from_parts(56_410_136, 0).saturating_mul(v.into())) + // Measured: `50548` + // Estimated: `56488 + v * (23 ±0)` + // Minimum execution time: 932_953_000 picoseconds. + Weight::from_parts(526_795_302, 0) + .saturating_add(Weight::from_parts(0, 56488)) + // Standard Error: 72_522 + .saturating_add(Weight::from_parts(46_746_979, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(28)) .saturating_add(T::DbWeight::get().writes(16)) .saturating_add(Weight::from_parts(0, 23).saturating_mul(v.into())) @@ -193,11 +189,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`) fn enter_bitfields() -> Weight { // Proof Size summary in bytes: - // Measured: `42490` - // Estimated: `48430` - // Minimum execution time: 463_424_000 picoseconds. - Weight::from_parts(498_761_000, 0) - .saturating_add(Weight::from_parts(0, 48430)) + // Measured: `42382` + // Estimated: `48322` + // Minimum execution time: 494_300_000 picoseconds. + Weight::from_parts(528_096_000, 0) + .saturating_add(Weight::from_parts(0, 48322)) .saturating_add(T::DbWeight::get().reads(26)) .saturating_add(T::DbWeight::get().writes(17)) } @@ -270,13 +266,13 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// The range of component `v` is `[101, 200]`. fn enter_backed_candidates_variable(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `42562` - // Estimated: `48502` - // Minimum execution time: 6_803_855_000 picoseconds. - Weight::from_parts(1_241_293_919, 0) - .saturating_add(Weight::from_parts(0, 48502)) - // Standard Error: 29_086 - .saturating_add(Weight::from_parts(55_587_595, 0).saturating_mul(v.into())) + // Measured: `42454` + // Estimated: `48394` + // Minimum execution time: 5_947_455_000 picoseconds. + Weight::from_parts(1_374_173_170, 0) + .saturating_add(Weight::from_parts(0, 48394)) + // Standard Error: 190_770 + .saturating_add(Weight::from_parts(46_394_740, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(29)) .saturating_add(T::DbWeight::get().writes(16)) } @@ -352,11 +348,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for /// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`) fn enter_backed_candidate_code_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `42589` - // Estimated: `48529` - // Minimum execution time: 36_855_906_000 picoseconds. - Weight::from_parts(39_589_210_000, 0) - .saturating_add(Weight::from_parts(0, 48529)) + // Measured: `42481` + // Estimated: `48421` + // Minimum execution time: 38_853_623_000 picoseconds. + Weight::from_parts(42_860_796_000, 0) + .saturating_add(Weight::from_parts(0, 48421)) .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().writes(16)) } diff --git a/relay/paseo/src/weights/xcm/mod.rs b/relay/paseo/src/weights/xcm/mod.rs index 98c12fa..ffee002 100644 --- a/relay/paseo/src/weights/xcm/mod.rs +++ b/relay/paseo/src/weights/xcm/mod.rs @@ -1,18 +1,18 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . mod pallet_xcm_benchmarks_fungible; mod pallet_xcm_benchmarks_generic; @@ -25,265 +25,272 @@ use xcm::{latest::prelude::*, DoubleEncoded}; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmBalancesWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -/// Types of asset supported by the Polkadot runtime. +/// Types of asset supported by the Paseo runtime. pub enum AssetTypes { - /// An asset backed by `pallet-balances`. - Balances, - /// Unknown asset. - Unknown, + /// An asset backed by `pallet-balances`. + Balances, + /// Unknown asset. + Unknown, } impl From<&MultiAsset> for AssetTypes { - fn from(asset: &MultiAsset) -> Self { - match asset { - MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), .. } => - AssetTypes::Balances, - _ => AssetTypes::Unknown, - } - } + fn from(asset: &MultiAsset) -> Self { + match asset { + MultiAsset { + id: + Concrete(MultiLocation { + parents: 0, + interior: Here, + }), + .. + } => AssetTypes::Balances, + _ => AssetTypes::Unknown, + } + } } trait WeighMultiAssets { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; } -// Polkadot only knows about one asset, the balances pallet. +// Paseo only knows about one asset, the balances pallet. const MAX_ASSETS: u64 = 1; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { - match self { - Self::Definite(assets) => assets - .inner() - .into_iter() - .map(From::from) - .map(|t| match t { - AssetTypes::Balances => balances_weight, - AssetTypes::Unknown => Weight::MAX, - }) - .fold(Weight::zero(), |acc, x| acc.saturating_add(x)), - // We don't support any NFTs on Polkadot, so these two variants will always match - // only 1 kind of fungible asset. - Self::Wild(AllOf { .. } | AllOfCounted { .. }) => balances_weight, - Self::Wild(AllCounted(count)) => - balances_weight.saturating_mul(MAX_ASSETS.min(*count as u64)), - Self::Wild(All) => balances_weight.saturating_mul(MAX_ASSETS), - } - } + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { + match self { + Self::Definite(assets) => assets + .inner() + .into_iter() + .map(From::from) + .map(|t| match t { + AssetTypes::Balances => balances_weight, + AssetTypes::Unknown => Weight::MAX, + }) + .fold(Weight::zero(), |acc, x| acc.saturating_add(x)), + // We don't support any NFTs on Paseo, so these two variants will always match + // only 1 kind of fungible asset. + Self::Wild(AllOf { .. } | AllOfCounted { .. }) => balances_weight, + Self::Wild(AllCounted(count)) => { + balances_weight.saturating_mul(MAX_ASSETS.min(*count as u64)) + } + Self::Wild(All) => balances_weight.saturating_mul(MAX_ASSETS), + } + } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { - self.inner() - .into_iter() - .map(|m| >::from(m)) - .map(|t| match t { - AssetTypes::Balances => balances_weight, - AssetTypes::Unknown => Weight::MAX, - }) - .fold(Weight::zero(), |acc, x| acc.saturating_add(x)) - } + fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { + self.inner() + .into_iter() + .map(|m| >::from(m)) + .map(|t| match t { + AssetTypes::Balances => balances_weight, + AssetTypes::Unknown => Weight::MAX, + }) + .fold(Weight::zero(), |acc, x| acc.saturating_add(x)) + } } pub struct PolkadotXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for PolkadotXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) - } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) - } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) - } - fn query_response( - _query_id: &u64, - _response: &Response, - _max_weight: &Weight, - _querier: &Option, - ) -> Weight { - XcmGeneric::::query_response() - } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) - } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) - } - fn transact( - _origin_kind: &OriginKind, - _require_weight_at_most: &Weight, - _call: &DoubleEncoded, - ) -> Weight { - XcmGeneric::::transact() - } - fn hrmp_new_channel_open_request( - _sender: &u32, - _max_message_size: &u32, - _max_capacity: &u32, - ) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn hrmp_channel_accepted(_recipient: &u32) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { - // XCM Executor does not currently support HRMP channel operations - Weight::MAX - } - fn clear_origin() -> Weight { - XcmGeneric::::clear_origin() - } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { - XcmGeneric::::descend_origin() - } - fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::report_error() - } + fn withdraw_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) + } + fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) + } + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) + } + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() + } + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) + } + fn transfer_reserve_asset( + assets: &MultiAssets, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) + } + fn transact( + _origin_kind: &OriginKind, + _require_weight_at_most: &Weight, + _call: &DoubleEncoded, + ) -> Weight { + XcmGeneric::::transact() + } + fn hrmp_new_channel_open_request( + _sender: &u32, + _max_message_size: &u32, + _max_capacity: &u32, + ) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() + } + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() + } + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() + } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) - } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) - } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { - // Polkadot does not currently support exchange asset operations - Weight::MAX - } - fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, - _reserve: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) - } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { - assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) - } - fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { - XcmGeneric::::report_holding() - } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { - XcmGeneric::::buy_execution() - } - fn refund_surplus() -> Weight { - XcmGeneric::::refund_surplus() - } - fn set_error_handler(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_error_handler() - } - fn set_appendix(_xcm: &Xcm) -> Weight { - XcmGeneric::::set_appendix() - } - fn clear_error() -> Weight { - XcmGeneric::::clear_error() - } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { - XcmGeneric::::claim_asset() - } - fn trap(_code: &u64) -> Weight { - XcmGeneric::::trap() - } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { - XcmGeneric::::subscribe_version() - } - fn unsubscribe_version() -> Weight { - XcmGeneric::::unsubscribe_version() - } - fn burn_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmGeneric::::burn_asset()) - } - fn expect_asset(assets: &MultiAssets) -> Weight { - assets.weigh_multi_assets(XcmGeneric::::expect_asset()) - } - fn expect_origin(_origin: &Option) -> Weight { - XcmGeneric::::expect_origin() - } - fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { - XcmGeneric::::expect_error() - } - fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { - XcmGeneric::::expect_transact_status() - } - fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::query_pallet() - } - fn expect_pallet( - _index: &u32, - _name: &Vec, - _module_name: &Vec, - _crate_major: &u32, - _min_crate_minor: &u32, - ) -> Weight { - XcmGeneric::::expect_pallet() - } - fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { - XcmGeneric::::report_transact_status() - } - fn clear_transact_status() -> Weight { - XcmGeneric::::clear_transact_status() - } - fn universal_origin(_: &Junction) -> Weight { - // Polkadot does not currently support universal origin operations - Weight::MAX - } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { - // Polkadot relay should not support export message operations - Weight::MAX - } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Polkadot does not currently support asset locking operations - Weight::MAX - } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Polkadot does not currently support asset locking operations - Weight::MAX - } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Polkadot does not currently support asset locking operations - Weight::MAX - } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { - // Polkadot does not currently support asset locking operations - Weight::MAX - } - fn set_fees_mode(_: &bool) -> Weight { - XcmGeneric::::set_fees_mode() - } - fn set_topic(_topic: &[u8; 32]) -> Weight { - XcmGeneric::::set_topic() - } - fn clear_topic() -> Weight { - XcmGeneric::::clear_topic() - } - fn alias_origin(_: &MultiLocation) -> Weight { - // XCM Executor does not currently support alias origin operations - Weight::MAX - } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { - XcmGeneric::::unpaid_execution() - } + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) + } + fn deposit_reserve_asset( + assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) + } + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + // Paseo does not currently support exchange asset operations + Weight::MAX + } + fn initiate_reserve_withdraw( + assets: &MultiAssetFilter, + _reserve: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) + } + fn initiate_teleport( + assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) + } + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { + XcmGeneric::::expect_transact_status() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + // Paseo does not currently support universal origin operations + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + // Paseo relay should not support export message operations + Weight::MAX + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Paseo does not currently support asset locking operations + Weight::MAX + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Paseo does not currently support asset locking operations + Weight::MAX + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Paseo does not currently support asset locking operations + Weight::MAX + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + // Paseo does not currently support asset locking operations + Weight::MAX + } + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() + } + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() + } + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() + } + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX + } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() + } } #[test] fn all_counted_has_a_sane_weight_upper_limit() { - let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); - let weight = Weight::from_parts(1000, 1000); + let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); + let weight = Weight::from_parts(1000, 1000); - assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); + assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); } diff --git a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index ee7d6d2..474f9b4 100644 --- a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -1,44 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../polkadot-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../polkadot-sdk/target/production/polkadot +// ./target/production/polkadot // benchmark // pallet -// --chain=../polkadot-chain-spec.json -// --steps -// 50 -// --repeat -// 20 +// --chain=./paseo-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output -// ./polkadot-weights/ -// --header -// ./file_header.txt +// --output=./paseo-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -53,24 +49,24 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - pub(crate) fn withdraw_asset() -> Weight { + pub fn withdraw_asset() -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 18_964_000 picoseconds. - Weight::from_parts(19_310_000, 0) + // Minimum execution time: 26_107_000 picoseconds. + Weight::from_parts(26_841_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`) - pub(crate) fn transfer_asset() -> Weight { + pub fn transfer_asset() -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `6196` - // Minimum execution time: 41_557_000 picoseconds. - Weight::from_parts(42_146_000, 0) + // Minimum execution time: 51_518_000 picoseconds. + Weight::from_parts(52_458_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -85,19 +81,19 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn transfer_reserve_asset() -> Weight { + pub fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `177` // Estimated: `6196` - // Minimum execution time: 75_309_000 picoseconds. - Weight::from_parts(77_079_000, 0) + // Minimum execution time: 92_794_000 picoseconds. + Weight::from_parts(95_103_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn reserve_asset_deposited() -> Weight { + pub fn reserve_asset_deposited() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -115,62 +111,60 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn initiate_reserve_withdraw() -> Weight { + pub fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3642` - // Minimum execution time: 48_100_000 picoseconds. - Weight::from_parts(49_079_000, 0) + // Minimum execution time: 59_659_000 picoseconds. + Weight::from_parts(60_912_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(5)) .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`) - pub(crate) fn receive_teleported_asset() -> Weight { + pub fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 18_172_000 picoseconds. - Weight::from_parts(18_611_000, 0) + // Minimum execution time: 22_610_000 picoseconds. + Weight::from_parts(23_172_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`) - pub(crate) fn deposit_asset() -> Weight { + pub fn deposit_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 17_593_000 picoseconds. - Weight::from_parts(18_409_000, 0) + // Minimum execution time: 22_878_000 picoseconds. + Weight::from_parts(23_789_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`) /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn deposit_reserve_asset() -> Weight { + pub fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3593` - // Minimum execution time: 51_112_000 picoseconds. - Weight::from_parts(52_489_000, 0) + // Minimum execution time: 69_305_000 picoseconds. + Weight::from_parts(70_037_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .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: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) @@ -179,12 +173,14 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn initiate_teleport() -> Weight { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + pub fn initiate_teleport() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3593` - // Minimum execution time: 52_328_000 picoseconds. - Weight::from_parts(53_541_000, 0) + // Minimum execution time: 48_797_000 picoseconds. + Weight::from_parts(49_966_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 0b61e7c..e3d3cfd 100644 --- a/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/relay/paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -1,167 +1,176 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `p-ch-hmb-vm-vapas-002`, CPU: `Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet +// --chain=./paseo-chain-spec.json // --steps=50 // --repeat=20 +// --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --pallet=pallet_xcm_benchmarks::generic -// --chain=polkadot-dev +// --output=./paseo-weights/xcm/pallet_xcm_benchmarks_generic.rs // --header=./file_header.txt -// --template=./xcm/pallet-xcm-benchmarks/template.hbs -// --output=./runtime/polkadot/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; -/// Weights for `pallet_xcm_benchmarks::generic`. +/// Weight functions for `pallet_xcm_benchmarks::generic`. pub struct WeightInfo(PhantomData); impl WeightInfo { - // Storage: Configuration ActiveConfig (r:1 w:0) - // Proof Skipped: Configuration ActiveConfig (max_values: Some(1), 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: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `17934` - // Minimum execution time: 33_813_000 picoseconds. - Weight::from_parts(34_357_000, 17934) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `177` + // Estimated: `3642` + // Minimum execution time: 58_483_000 picoseconds. + Weight::from_parts(66_541_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_067_000 picoseconds. - Weight::from_parts(3_153_000, 0) + // Minimum execution time: 2_429_000 picoseconds. + Weight::from_parts(2_504_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: XcmPallet Queries (r:1 w:0) - // Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `XcmPallet::Queries` (r:1 w:0) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `169` - // Estimated: `3634` - // Minimum execution time: 12_236_000 picoseconds. - Weight::from_parts(12_725_000, 3634) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 7_393_000 picoseconds. + Weight::from_parts(7_782_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_193_000 picoseconds. - Weight::from_parts(13_427_000, 0) + // Minimum execution time: 9_688_000 picoseconds. + Weight::from_parts(10_149_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_393_000 picoseconds. - Weight::from_parts(3_464_000, 0) + // Minimum execution time: 5_195_000 picoseconds. + Weight::from_parts(5_421_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_955_000 picoseconds. - Weight::from_parts(3_068_000, 0) + // Minimum execution time: 2_260_000 picoseconds. + Weight::from_parts(2_427_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_004_000 picoseconds. - Weight::from_parts(3_107_000, 0) + // Minimum execution time: 2_274_000 picoseconds. + Weight::from_parts(2_400_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_981_000 picoseconds. - Weight::from_parts(3_039_000, 0) + // Minimum execution time: 2_256_000 picoseconds. + Weight::from_parts(2_396_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_814_000 picoseconds. - Weight::from_parts(3_897_000, 0) + // Minimum execution time: 2_993_000 picoseconds. + Weight::from_parts(3_143_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_921_000 picoseconds. - Weight::from_parts(3_010_000, 0) + // Minimum execution time: 2_241_000 picoseconds. + Weight::from_parts(2_397_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Configuration ActiveConfig (r:1 w:0) - // Proof Skipped: Configuration ActiveConfig (max_values: Some(1), 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: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `17934` - // Minimum execution time: 28_324_000 picoseconds. - Weight::from_parts(28_690_000, 17934) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `177` + // Estimated: `3642` + // Minimum execution time: 51_239_000 picoseconds. + Weight::from_parts(53_166_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: XcmPallet AssetTraps (r:1 w:1) - // Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured) + /// Storage: `XcmPallet::AssetTraps` (r:1 w:1) + /// Proof: `XcmPallet::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `226` - // Estimated: `3691` - // Minimum execution time: 16_430_000 picoseconds. - Weight::from_parts(16_774_000, 3691) + // Measured: `23` + // Estimated: `3488` + // Minimum execution time: 12_269_000 picoseconds. + Weight::from_parts(12_772_000, 0) + .saturating_add(Weight::from_parts(0, 3488)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -169,159 +178,167 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_916_000 picoseconds. - Weight::from_parts(3_035_000, 0) + // Minimum execution time: 2_214_000 picoseconds. + Weight::from_parts(2_368_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: XcmPallet VersionNotifyTargets (r:1 w:1) - // Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, 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: 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::VersionNotifyTargets` (r:1 w:1) + /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `21913` - // Minimum execution time: 35_915_000 picoseconds. - Weight::from_parts(36_519_000, 21913) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `76` + // Estimated: `3541` + // Minimum execution time: 31_593_000 picoseconds. + Weight::from_parts(32_632_000, 0) + .saturating_add(Weight::from_parts(0, 3541)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: XcmPallet VersionNotifyTargets (r:0 w:1) - // Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `XcmPallet::VersionNotifyTargets` (r:0 w:1) + /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn unsubscribe_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_344_000 picoseconds. - Weight::from_parts(5_487_000, 0) + // Minimum execution time: 4_890_000 picoseconds. + Weight::from_parts(5_143_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_684_000 picoseconds. - Weight::from_parts(4_801_000, 0) + // Minimum execution time: 3_547_000 picoseconds. + Weight::from_parts(3_684_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_228_000 picoseconds. - Weight::from_parts(3_325_000, 0) + // Minimum execution time: 2_356_000 picoseconds. + Weight::from_parts(2_485_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_059_000 picoseconds. - Weight::from_parts(3_153_000, 0) + // Minimum execution time: 2_436_000 picoseconds. + Weight::from_parts(2_498_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_037_000 picoseconds. - Weight::from_parts(3_128_000, 0) + // Minimum execution time: 2_298_000 picoseconds. + Weight::from_parts(2_418_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_287_000 picoseconds. - Weight::from_parts(3_360_000, 0) + // Minimum execution time: 2_532_000 picoseconds. + Weight::from_parts(2_668_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Configuration ActiveConfig (r:1 w:0) - // Proof Skipped: Configuration ActiveConfig (max_values: Some(1), 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: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `17934` - // Minimum execution time: 35_467_000 picoseconds. - Weight::from_parts(36_011_000, 17934) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `177` + // Estimated: `3642` + // Minimum execution time: 61_374_000 picoseconds. + Weight::from_parts(63_966_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_630_000 picoseconds. - Weight::from_parts(8_870_000, 0) + // Minimum execution time: 9_452_000 picoseconds. + Weight::from_parts(9_747_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: Configuration ActiveConfig (r:1 w:0) - // Proof Skipped: Configuration ActiveConfig (max_values: Some(1), 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: `Dmp::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) + /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueues` (`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: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `17934` - // Minimum execution time: 28_630_000 picoseconds. - Weight::from_parts(29_085_000, 17934) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `177` + // Estimated: `3642` + // Minimum execution time: 50_591_000 picoseconds. + Weight::from_parts(52_265_000, 0) + .saturating_add(Weight::from_parts(0, 3642)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } pub fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_997_000 picoseconds. - Weight::from_parts(3_096_000, 0) + // Minimum execution time: 2_324_000 picoseconds. + Weight::from_parts(2_470_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_984_000 picoseconds. - Weight::from_parts(3_059_000, 0) + // Minimum execution time: 2_287_000 picoseconds. + Weight::from_parts(2_390_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_969_000 picoseconds. - Weight::from_parts(3_006_000, 0) + // Minimum execution time: 2_309_000 picoseconds. + Weight::from_parts(2_424_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_045_000 picoseconds. - Weight::from_parts(3_087_000, 0) + // Minimum execution time: 2_280_000 picoseconds. + Weight::from_parts(2_379_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_141_000 picoseconds. - Weight::from_parts(3_251_000, 0) + // Minimum execution time: 2_370_000 picoseconds. + Weight::from_parts(2_508_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/relay/paseo/src/xcm_config.rs b/relay/paseo/src/xcm_config.rs index 3df859e..8a611eb 100644 --- a/relay/paseo/src/xcm_config.rs +++ b/relay/paseo/src/xcm_config.rs @@ -1,83 +1,83 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Paseo. -// Polkadot is free software: you can redistribute it and/or modify +// Paseo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Polkadot is distributed in the hope that it will be useful, +// Paseo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// along with Paseo. If not, see . -//! XCM configuration for Polkadot. +//! XCM configuration for Paseo. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, - GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, - TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, + GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, + TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, }; use frame_support::{ - match_types, parameter_types, - traits::{Contains, Equals, Everything, Nothing}, - weights::Weight, + match_types, parameter_types, + traits::{Contains, Equals, Everything, Nothing}, + weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use polkadot_runtime_constants::{ - currency::CENTS, - system_parachain::*, - xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX}, +use paseo_runtime_constants::{ + currency::CENTS, + system_parachain::*, + xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX}, }; use runtime_common::{ - crowdloan, paras_registrar, - xcm_sender::{ChildParachainRouter, ExponentialPrice}, - ToAuthor, + crowdloan, paras_registrar, + xcm_sender::{ChildParachainRouter, ExponentialPrice}, + ToAuthor, }; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, + DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; use xcm_executor::traits::WithOriginFilter; parameter_types! { - pub const RootLocation: MultiLocation = Here.into_location(); - /// The location of the DOT token, from the context of this chain. Since this token is native to this - /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to - /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); - /// The Polkadot network ID. This is named. - pub const ThisNetwork: NetworkId = NetworkId::Polkadot; - /// Our location in the universe of consensus systems. - pub const UniversalLocation: InteriorMultiLocation = X1(GlobalConsensus(ThisNetwork::get())); - /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). - pub CheckAccount: AccountId = XcmPallet::check_account(); - /// The Checking Account along with the indication that the local chain is able to mint tokens. - pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); - /// Account of the treasury pallet. - pub TreasuryAccount: AccountId = Treasury::account_id(); + pub const RootLocation: MultiLocation = Here.into_location(); + /// The location of the PAS token, from the context of this chain. Since this token is native to this + /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to + /// the context". + pub const TokenLocation: MultiLocation = Here.into_location(); + /// The Polkadot network ID. This is named. TODO To rename to Paseo. + pub const ThisNetwork: NetworkId = NetworkId::Polkadot; + /// Our location in the universe of consensus systems. + pub const UniversalLocation: InteriorMultiLocation = X1(GlobalConsensus(ThisNetwork::get())); + /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). + pub CheckAccount: AccountId = XcmPallet::check_account(); + /// The Checking Account along with the indication that the local chain is able to mint tokens. + pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local); + /// Account of the treasury pallet. + pub TreasuryAccount: AccountId = Treasury::account_id(); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to /// determine the sovereign account controlled by a location. pub type SovereignAccountOf = ( - // We can convert a child parachain using the standard `AccountId` conversion. - ChildParachainConvertsVia, - // We can directly alias an `AccountId32` into a local account. - AccountId32Aliases, - // Foreign locations alias into accounts according to a hash of their standard description. - HashedDescription>, + // We can convert a child parachain using the standard `AccountId` conversion. + ChildParachainConvertsVia, + // We can directly alias an `AccountId32` into a local account. + AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Our asset transactor. This is what allows us to interact with the runtime assets from the point @@ -85,106 +85,106 @@ pub type SovereignAccountOf = ( /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = XcmCurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // We can convert the MultiLocations with our converter above: - SovereignAccountOf, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We track our teleports in/out to keep total issuance correct. - LocalCheckAccount, + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // We can convert the MultiLocations with our converter above: + SovereignAccountOf, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We track our teleports in/out to keep total issuance correct. + LocalCheckAccount, >; /// The means that we convert an XCM origin `MultiLocation` into the runtime's `Origin` type for /// local dispatch. This is a conversion function from an `OriginKind` type along with the /// `MultiLocation` value and returns an `Origin` value or an error. type LocalOriginConverter = ( - // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined - // by the `SovereignAccountOf` converter. - SovereignSignedViaLocation, - // If the origin kind is `Native` and the XCM origin is a child parachain, then we can express - // it with the special `parachains_origin::Origin` origin variant. - ChildParachainAsNative, - // If the origin kind is `Native` and the XCM origin is the `AccountId32` location, then it can - // be expressed using the `Signed` origin variant. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined + // by the `SovereignAccountOf` converter. + SovereignSignedViaLocation, + // If the origin kind is `Native` and the XCM origin is a child parachain, then we can express + // it with the special `parachains_origin::Origin` origin variant. + ChildParachainAsNative, + // If the origin kind is `Native` and the XCM origin is the `AccountId32` location, then it can + // be expressed using the `Signed` origin variant. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, ); parameter_types! { - /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024); - /// Maximum number of instructions in a single XCM fragment. A sanity check against weight - /// calculations getting too crazy. - pub const MaxInstructions: u32 = 100; - /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); - /// The base fee for the message delivery fees. - pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); + /// The amount of weight an XCM operation takes. This is a safe overestimate. + pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024); + /// Maximum number of instructions in a single XCM fragment. A sanity check against weight + /// calculations getting too crazy. + pub const MaxInstructions: u32 = 100; + /// The asset ID for the asset that we use to pay for message delivery fees. + pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); + /// The base fee for the message delivery fees. + pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } pub type PriceForChildParachainDelivery = - ExponentialPrice; + ExponentialPrice; /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. pub type XcmRouter = WithUniqueTopic<( - // Only one router so far - use DMP to communicate with child parachains. - ChildParachainRouter, + // Only one router so far - use DMP to communicate with child parachains. + ChildParachainRouter, )>; parameter_types! { - pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); - pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); - pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); - pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); - pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); - pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); - pub const MaxAssetsIntoHolding: u32 = 64; + pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); + pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); + pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); + pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); + pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); + pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); + pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); + pub const MaxAssetsIntoHolding: u32 = 64; } -/// Polkadot Relay recognizes/respects AssetHub, Collectives, and BridgeHub chains as teleporters. +/// Paseo Relay recognizes/respects AssetHub, Collectives, and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( - xcm_builder::Case, - xcm_builder::Case, - xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, ); match_types! { - pub type OnlyParachains: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(_)) } - }; - pub type CollectivesOrFellows: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | - MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } - }; - pub type LocalPlurality: impl Contains = { - MultiLocation { parents: 0, interior: X1(Plurality { .. }) } - }; + pub type OnlyParachains: impl Contains = { + MultiLocation { parents: 0, interior: X1(Parachain(_)) } + }; + pub type CollectivesOrFellows: impl Contains = { + MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | + MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } + }; + pub type LocalPlurality: impl Contains = { + MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + }; } /// The barriers one of which must be passed for an XCM message to be executed. pub type Barrier = TrailingSetTopicAsId<( - // Weight that is paid for may be consumed. - TakeWeightCredit, - // Expected responses are OK. - AllowKnownQueryResponses, - WithComputedOrigin< - ( - // If the message is one that immediately attempts to pay for execution, then allow it. - AllowTopLevelPaidExecutionFrom, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - // Collectives and Fellows plurality get free execution. - AllowExplicitUnpaidExecutionFrom, - ), - UniversalLocation, - ConstU32<8>, - >, + // Weight that is paid for may be consumed. + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + // Collectives and Fellows plurality get free execution. + AllowExplicitUnpaidExecutionFrom, + ), + UniversalLocation, + ConstU32<8>, + >, )>; /// A call filter for the XCM Transact instruction. This is a temporary measure until we @@ -196,136 +196,139 @@ pub type Barrier = TrailingSetTopicAsId<( /// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. pub struct SafeCallFilter; impl Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - #[cfg(feature = "runtime-benchmarks")] - { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true - } - } + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!( + call, + RuntimeCall::System(frame_system::Call::remark_with_event { .. }) + ) { + return true; + } + } - match call { - RuntimeCall::System( - frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, - ) | - RuntimeCall::Babe(..) | - RuntimeCall::Timestamp(..) | - RuntimeCall::Indices(..) | - RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan( - crowdloan::Call::create { .. } | - crowdloan::Call::contribute { .. } | - crowdloan::Call::withdraw { .. } | - crowdloan::Call::refund { .. } | - crowdloan::Call::dissolve { .. } | - crowdloan::Call::edit { .. } | - crowdloan::Call::poke { .. } | - crowdloan::Call::contribute_all { .. }, - ) | - RuntimeCall::Staking( - pallet_staking::Call::bond { .. } | - pallet_staking::Call::bond_extra { .. } | - pallet_staking::Call::unbond { .. } | - pallet_staking::Call::withdraw_unbonded { .. } | - pallet_staking::Call::validate { .. } | - pallet_staking::Call::nominate { .. } | - pallet_staking::Call::chill { .. } | - pallet_staking::Call::set_payee { .. } | - pallet_staking::Call::set_controller { .. } | - pallet_staking::Call::set_validator_count { .. } | - pallet_staking::Call::increase_validator_count { .. } | - pallet_staking::Call::scale_validator_count { .. } | - pallet_staking::Call::force_no_eras { .. } | - pallet_staking::Call::force_new_era { .. } | - pallet_staking::Call::set_invulnerables { .. } | - pallet_staking::Call::force_unstake { .. } | - pallet_staking::Call::force_new_era_always { .. } | - pallet_staking::Call::payout_stakers { .. } | - pallet_staking::Call::rebond { .. } | - pallet_staking::Call::reap_stash { .. } | - pallet_staking::Call::set_staking_configs { .. } | - pallet_staking::Call::chill_other { .. } | - pallet_staking::Call::force_apply_min_commission { .. }, - ) | - RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::Grandpa(..) | - RuntimeCall::ImOnline(..) | - RuntimeCall::Treasury(..) | - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda( - pallet_referenda::Call::place_decision_deposit { .. } | - pallet_referenda::Call::refund_decision_deposit { .. } | - pallet_referenda::Call::cancel { .. } | - pallet_referenda::Call::kill { .. } | - pallet_referenda::Call::nudge_referendum { .. } | - pallet_referenda::Call::one_fewer_deciding { .. }, - ) | - RuntimeCall::Claims( - super::claims::Call::claim { .. } | - super::claims::Call::mint_claim { .. } | - super::claims::Call::move_claim { .. }, - ) | - RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | - RuntimeCall::Identity( - pallet_identity::Call::add_registrar { .. } | - pallet_identity::Call::set_identity { .. } | - pallet_identity::Call::clear_identity { .. } | - pallet_identity::Call::request_judgement { .. } | - pallet_identity::Call::cancel_request { .. } | - pallet_identity::Call::set_fee { .. } | - pallet_identity::Call::set_account_id { .. } | - pallet_identity::Call::set_fields { .. } | - pallet_identity::Call::provide_judgement { .. } | - pallet_identity::Call::kill_identity { .. } | - pallet_identity::Call::add_sub { .. } | - pallet_identity::Call::rename_sub { .. } | - pallet_identity::Call::remove_sub { .. } | - pallet_identity::Call::quit_sub { .. }, - ) | - RuntimeCall::Vesting(..) | - RuntimeCall::Bounties( - pallet_bounties::Call::propose_bounty { .. } | - pallet_bounties::Call::approve_bounty { .. } | - pallet_bounties::Call::propose_curator { .. } | - pallet_bounties::Call::unassign_curator { .. } | - pallet_bounties::Call::accept_curator { .. } | - pallet_bounties::Call::award_bounty { .. } | - pallet_bounties::Call::claim_bounty { .. } | - pallet_bounties::Call::close_bounty { .. }, - ) | - RuntimeCall::ChildBounties(..) | - RuntimeCall::ElectionProviderMultiPhase(..) | - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools( - pallet_nomination_pools::Call::join { .. } | - pallet_nomination_pools::Call::bond_extra { .. } | - pallet_nomination_pools::Call::claim_payout { .. } | - pallet_nomination_pools::Call::unbond { .. } | - pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } | - pallet_nomination_pools::Call::withdraw_unbonded { .. } | - pallet_nomination_pools::Call::create { .. } | - pallet_nomination_pools::Call::create_with_pool_id { .. } | - pallet_nomination_pools::Call::set_state { .. } | - pallet_nomination_pools::Call::set_configs { .. } | - pallet_nomination_pools::Call::update_roles { .. } | - pallet_nomination_pools::Call::chill { .. }, - ) | - RuntimeCall::Hrmp(..) | - RuntimeCall::Registrar( - paras_registrar::Call::deregister { .. } | - paras_registrar::Call::swap { .. } | - paras_registrar::Call::remove_lock { .. } | - paras_registrar::Call::reserve { .. } | - paras_registrar::Call::add_lock { .. }, - ) | - RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { - .. - }) | - RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) | - RuntimeCall::Proxy(..) => true, - _ => false, - } - } + match call { + RuntimeCall::System( + frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, + ) + | RuntimeCall::Babe(..) + | RuntimeCall::Timestamp(..) + | RuntimeCall::Indices(..) + | RuntimeCall::Balances(..) + | RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } + | crowdloan::Call::contribute { .. } + | crowdloan::Call::withdraw { .. } + | crowdloan::Call::refund { .. } + | crowdloan::Call::dissolve { .. } + | crowdloan::Call::edit { .. } + | crowdloan::Call::poke { .. } + | crowdloan::Call::contribute_all { .. }, + ) + | RuntimeCall::Staking( + pallet_staking::Call::bond { .. } + | pallet_staking::Call::bond_extra { .. } + | pallet_staking::Call::unbond { .. } + | pallet_staking::Call::withdraw_unbonded { .. } + | pallet_staking::Call::validate { .. } + | pallet_staking::Call::nominate { .. } + | pallet_staking::Call::chill { .. } + | pallet_staking::Call::set_payee { .. } + | pallet_staking::Call::set_controller { .. } + | pallet_staking::Call::set_validator_count { .. } + | pallet_staking::Call::increase_validator_count { .. } + | pallet_staking::Call::scale_validator_count { .. } + | pallet_staking::Call::force_no_eras { .. } + | pallet_staking::Call::force_new_era { .. } + | pallet_staking::Call::set_invulnerables { .. } + | pallet_staking::Call::force_unstake { .. } + | pallet_staking::Call::force_new_era_always { .. } + | pallet_staking::Call::payout_stakers { .. } + | pallet_staking::Call::rebond { .. } + | pallet_staking::Call::reap_stash { .. } + | pallet_staking::Call::set_staking_configs { .. } + | pallet_staking::Call::chill_other { .. } + | pallet_staking::Call::force_apply_min_commission { .. }, + ) + | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) + | RuntimeCall::Grandpa(..) + | RuntimeCall::ImOnline(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::ConvictionVoting(..) + | RuntimeCall::Referenda( + pallet_referenda::Call::place_decision_deposit { .. } + | pallet_referenda::Call::refund_decision_deposit { .. } + | pallet_referenda::Call::cancel { .. } + | pallet_referenda::Call::kill { .. } + | pallet_referenda::Call::nudge_referendum { .. } + | pallet_referenda::Call::one_fewer_deciding { .. }, + ) + | RuntimeCall::Claims( + super::claims::Call::claim { .. } + | super::claims::Call::mint_claim { .. } + | super::claims::Call::move_claim { .. }, + ) + | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) + | RuntimeCall::Identity( + pallet_identity::Call::add_registrar { .. } + | pallet_identity::Call::set_identity { .. } + | pallet_identity::Call::clear_identity { .. } + | pallet_identity::Call::request_judgement { .. } + | pallet_identity::Call::cancel_request { .. } + | pallet_identity::Call::set_fee { .. } + | pallet_identity::Call::set_account_id { .. } + | pallet_identity::Call::set_fields { .. } + | pallet_identity::Call::provide_judgement { .. } + | pallet_identity::Call::kill_identity { .. } + | pallet_identity::Call::add_sub { .. } + | pallet_identity::Call::rename_sub { .. } + | pallet_identity::Call::remove_sub { .. } + | pallet_identity::Call::quit_sub { .. }, + ) + | RuntimeCall::Vesting(..) + | RuntimeCall::Bounties( + pallet_bounties::Call::propose_bounty { .. } + | pallet_bounties::Call::approve_bounty { .. } + | pallet_bounties::Call::propose_curator { .. } + | pallet_bounties::Call::unassign_curator { .. } + | pallet_bounties::Call::accept_curator { .. } + | pallet_bounties::Call::award_bounty { .. } + | pallet_bounties::Call::claim_bounty { .. } + | pallet_bounties::Call::close_bounty { .. }, + ) + | RuntimeCall::ChildBounties(..) + | RuntimeCall::ElectionProviderMultiPhase(..) + | RuntimeCall::VoterList(..) + | RuntimeCall::NominationPools( + pallet_nomination_pools::Call::join { .. } + | pallet_nomination_pools::Call::bond_extra { .. } + | pallet_nomination_pools::Call::claim_payout { .. } + | pallet_nomination_pools::Call::unbond { .. } + | pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } + | pallet_nomination_pools::Call::withdraw_unbonded { .. } + | pallet_nomination_pools::Call::create { .. } + | pallet_nomination_pools::Call::create_with_pool_id { .. } + | pallet_nomination_pools::Call::set_state { .. } + | pallet_nomination_pools::Call::set_configs { .. } + | pallet_nomination_pools::Call::update_roles { .. } + | pallet_nomination_pools::Call::chill { .. }, + ) + | RuntimeCall::Hrmp(..) + | RuntimeCall::Registrar( + paras_registrar::Call::deregister { .. } + | paras_registrar::Call::swap { .. } + | paras_registrar::Call::remove_lock { .. } + | paras_registrar::Call::reserve { .. } + | paras_registrar::Call::add_lock { .. }, + ) + | RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { + .. + }) + | RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) + | RuntimeCall::Proxy(..) => true, + _ => false, + } + } } /// Locations that will not be charged fees in the executor, neither for execution nor delivery. @@ -334,76 +337,76 @@ pub type WaivedLocations = (SystemParachains, Equals, LocalPlurali pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = LocalOriginConverter; - // Polkadot Relay recognises no chains which act as reserves. - type IsReserve = (); - type IsTeleporter = TrustedTeleporters; - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = WeightInfoBounds< - crate::weights::xcm::PolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - // The weight trader piggybacks on the existing transaction-fee conversion logic. - type Trader = - UsingComponents>; - type ResponseHandler = XcmPallet; - type AssetTrap = XcmPallet; - type AssetLocker = (); - type AssetExchanger = (); - type AssetClaims = XcmPallet; - type SubscriptionService = XcmPallet; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; - // No bridges yet... - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = WithOriginFilter; - type SafeCallFilter = SafeCallFilter; - type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = LocalAssetTransactor; + type OriginConverter = LocalOriginConverter; + // Paseo Relay recognises no chains which act as reserves. + type IsReserve = (); + type IsTeleporter = TrustedTeleporters; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = WeightInfoBounds< + crate::weights::xcm::PolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + // The weight trader piggybacks on the existing transaction-fee conversion logic. + type Trader = + UsingComponents>; + type ResponseHandler = XcmPallet; + type AssetTrap = XcmPallet; + type AssetLocker = (); + type AssetExchanger = (); + type AssetClaims = XcmPallet; + type SubscriptionService = XcmPallet; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type FeeManager = XcmFeesToAccount; + // No bridges yet... + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { - // `GeneralAdmin` pluralistic body. - pub const GeneralAdminBodyId: BodyId = BodyId::Administration; - // StakingAdmin pluralistic body. - pub const StakingAdminBodyId: BodyId = BodyId::Defense; - // FellowshipAdmin pluralistic body. - pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); - // `Treasurer` pluralistic body. - pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); + // `GeneralAdmin` pluralistic body. + pub const GeneralAdminBodyId: BodyId = BodyId::Administration; + // StakingAdmin pluralistic body. + pub const StakingAdminBodyId: BodyId = BodyId::Defense; + // FellowshipAdmin pluralistic body. + pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); + // `Treasurer` pluralistic body. + pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); + pub ReachableDest: Option = Some(Parachain(1000).into()); } /// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. pub type GeneralAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( - GeneralAdminToPlurality, - // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + GeneralAdminToPlurality, + // And a usual Signed origin to be used in XCM as a corresponding AccountId32 + SignedToAccountId32, ); /// Type to convert the `StakingAdmin` origin to a Plurality `MultiLocation` value. pub type StakingAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert the `FellowshipAdmin` origin to a Plurality `MultiLocation` value. pub type FellowshipAdminToPlurality = - OriginToPluralityVoice; + OriginToPluralityVoice; /// Type to convert the `Treasurer` origin to a Plurality `MultiLocation` value. pub type TreasurerToPlurality = OriginToPluralityVoice; @@ -411,48 +414,48 @@ pub type TreasurerToPlurality = OriginToPluralityVoice; - type XcmRouter = XcmRouter; - // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - // ...but they must match our filter, which rejects all. - type XcmExecuteFilter = Nothing; // == Deny All - type XcmExecutor = xcm_executor::XcmExecutor; - type XcmTeleportFilter = Everything; // == Allow All - type XcmReserveTransferFilter = Everything; // == Allow All - type Weigher = WeightInfoBounds< - crate::weights::xcm::PolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = SovereignAccountOf; - type MaxLockers = ConstU32<8>; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); - type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + // We only allow the root, the general admin, the fellowship admin and the staking admin to send + // messages. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally... + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + // ...but they must match our filter, which rejects all. + type XcmExecuteFilter = Nothing; // == Deny All + type XcmExecutor = xcm_executor::XcmExecutor; + type XcmTeleportFilter = Everything; // == Allow All + type XcmReserveTransferFilter = Everything; // == Allow All + type Weigher = WeightInfoBounds< + crate::weights::xcm::PolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = SovereignAccountOf; + type MaxLockers = ConstU32<8>; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; + type AdminOrigin = EnsureRoot; } From 22fb5c5e3f117433af90f02fd1c274cc210d3a28 Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Wed, 3 Apr 2024 08:51:41 -0300 Subject: [PATCH 3/4] reset missing file --- relay/paseo/src/weights/pallet_sudo.rs | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 relay/paseo/src/weights/pallet_sudo.rs diff --git a/relay/paseo/src/weights/pallet_sudo.rs b/relay/paseo/src/weights/pallet_sudo.rs new file mode 100644 index 0000000..4a04727 --- /dev/null +++ b/relay/paseo/src/weights/pallet_sudo.rs @@ -0,0 +1,85 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `pallet_sudo` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-11-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=pallet_sudo +// --chain=rococo-dev +// --header=./polkadot/file_header.txt +// --output=./polkadot/runtime/rococo/src/weights/ + +#![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: `132` + // Estimated: `1517` + // Minimum execution time: 8_432_000 picoseconds. + Weight::from_parts(8_757_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: `132` + // Estimated: `1517` + // Minimum execution time: 9_167_000 picoseconds. + Weight::from_parts(9_397_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: `132` + // Estimated: `1517` + // Minimum execution time: 9_133_000 picoseconds. + Weight::from_parts(9_573_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } +} \ No newline at end of file From fec38491e5b53b639522244001bf5b7f2a220e9a Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Wed, 3 Apr 2024 08:57:23 -0300 Subject: [PATCH 4/4] update cargo lock --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af9dabd..c0710a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5851,9 +5851,9 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "25.0.0" +version = "25.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" +checksum = "d6829cbaae2a8d23d4a7db159192297728df40d51f4555bd8a6ea4374aad62f5" dependencies = [ "frame-benchmarking", "frame-election-provider-support",